/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package org.apache.uima.cas.text;

import org.apache.uima.cas.AnnotationBaseFS;

/**
 * Interface for Annotation Feature Structures.
 * 
 * 
 */
public interface AnnotationFS extends AnnotationBaseFS {

  /**
   * Get the start position of the annotation as character offset into the text. The smallest
   * possible start position is <code>0</code>, the offset of the first character in the text.
   * 
   * @return The start position.
   */
  int getBegin();

  /**
   * Get the end position of the annotation as character offset into the text. The end position
   * points at the first character after the annotation, such that
   * <code>(getEnd()-getBegin()) == getCoveredText().length()</code>.
   * 
   * @return The end position.
   */
  int getEnd();

  /**
   * Get the text covered by an annotation as a string. If <code>docText</code> is your document
   * text and <code>annot</code> an annotation, then <code>
   * annot.getCoveredText().equals(docText.substring(annot.getBegin(), 
   * annot.getEnd()))</code>.
   * 
   * @return String
   */
  String getCoveredText();

}

@@ -1561,24 +1561,607 @@
  getEnd();%0A%0A
+  /**%0A   * Set the start position of the annotation as character offset into the text. The smallest%0A   * possible start position is %3Ccode%3E0%3C/code%3E, the offset of the first character in the text.%0A   * %0A   * @param The start position.%0A   */%0A  void setBegin(int begin);%0A%0A  /**%0A   * Set the end position of the annotation as character offset into the text. The end position%0A   * points at the first character after the annotation, such that%0A   * %3Ccode%3E(getEnd()-getBegin()) == getCoveredText().length()%3C/code%3E.%0A   * %0A   * @param The end position position.%0A   */%0A  void setEnd(int end);%0A%0A
   /**%0A   * G

add the setBegin, setEnd APIs to the AnnotationFS interface