Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.uima.resource.metadata
Interface Precondition

All Superinterfaces:
  Cloneable, MetaDataObject, Serializable, XMLizable

All Known Subinterfaces:
  LanguagePrecondition, MimeTypePrecondition, SimplePrecondition

    public interface Precondition

extends MetaDataObject

A `Precondition` of a Resource is a condition that an Entity and/or its analysis in the `CAS` must satisfy before that Entity can be processed by the Resource.

Currently the framework does not fully support Preconditions. Only the `LanguagePrecondition` subinterface is used.

As with all `MetaDataObject`s, a `Precondition` may or may not be modifiable. An application can find out by calling the `MetaDataObject.isModifiable()` method.

Method Summary
`boolean` | `evaluate(CAS aCAS)` Determines if this precondition is satisfied by a CAS.
`String` | `getPreconditionType()` Gets the type of this precondition.

Methods inherited from interface org.apache.uima.resource.metadata.MetaDataObject
`clone, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrl`

Methods inherited from interface org.apache.uima.util.XMLizable
`buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML`

Method Detail

### getPreconditionType

    String getPreconditionType()

  Gets the type of this precondition. Each sub-interface of `Precondition` has its own standard type identifier String. These identifier Strings are used instead of Java class names in order to ease portability of metadata to other languages.

  Returns:
    the type identifier String for this precondition

### evaluate

    boolean evaluate(CAS aCAS)

  Determines if this precondition is satisfied by a CAS.

  Parameters:
    `aCAS` - the CAS against which to evaluate this precondition
  Returns:
    true if and only if the CAS satisfies this precondition.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007 The Apache Software Foundation. All Rights Reserved.