org.apache.uima.cas.impl

## Class ConstraintFactoryImpl

- java.lang.Object
- - org.apache.uima.cas.ConstraintFactory
  - - org.apache.uima.cas.impl.ConstraintFactoryImpl

-     public class ConstraintFactoryImpl
      extends ConstraintFactory

  Implementation of the ConstraintFactory interface.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConstraintFactoryImpl()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FSMatchConstraint` | `and(FSMatchConstraint c1, FSMatchConstraint c2)` Conjoin two constraints.
    `FSBooleanConstraint` | `createBooleanConstraint()` Create a new boolean constraint.
    `FSFloatConstraint` | `createFloatConstraint()` Create a new float constraint.
    `FSIntConstraint` | `createIntConstraint()` Create a new int constraint.
    `FSStringConstraint` | `createStringConstraint()` Create a new String constraint.
    `FSTypeConstraint` | `createTypeConstraint()` Create a new type constraint.
    `FSMatchConstraint` | `embedConstraint(ArrayList<String> path, FSConstraint constraint)` Embed a constraint under a path.
    `FSMatchConstraint` | `embedConstraint(FeaturePath featPath, FSConstraint constraint)` Combine a constraint test with a path from a feature structure instance to the value to be tested.
    `FSMatchConstraint` | `or(FSMatchConstraint c1, FSMatchConstraint c2)` Disjoin two constraints.

    - ### Methods inherited from class org.apache.uima.cas.ConstraintFactory

      `instance`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConstraintFactoryImpl

          public ConstraintFactoryImpl()

  - ### Method Detail

    - #### createTypeConstraint

          public FSTypeConstraint createTypeConstraint()

      Description copied from class: `ConstraintFactory`
      Create a new type constraint. A type constraint contains one or more types to test against. A type constraint must be initialized by adding one or more types to it. The match is true if any of the types are the same or a super type of the feature structure being tested by the constraint.
      Specified by:
        `createTypeConstraint` in class `ConstraintFactory`
      Returns:
        A new type constraint with the type set to the top type.

    - #### createIntConstraint

          public FSIntConstraint createIntConstraint()

      Description copied from class: `ConstraintFactory`
      Create a new int constraint. An int constraint must be initialized after it's created by adding one or more tests to it.
      Specified by:
        `createIntConstraint` in class `ConstraintFactory`
      Returns:
        A new int constraint, completely unconstrained.

    - #### createFloatConstraint

          public FSFloatConstraint createFloatConstraint()

      Description copied from class: `ConstraintFactory`
      Create a new float constraint. A float constraint must be initialized after it's created by adding one or more tests to it.
      Specified by:
        `createFloatConstraint` in class `ConstraintFactory`
      Returns:
        A new float constraint, completely unconstrained.

    - #### createStringConstraint

          public FSStringConstraint createStringConstraint()

      Description copied from class: `ConstraintFactory`
      Create a new String constraint. A String constraint must be initialized after it's created by adding one or more tests to it.
      Specified by:
        `createStringConstraint` in class `ConstraintFactory`
      Returns:
        A new String constraint, completely unconstrained.

    - #### createBooleanConstraint

          public FSBooleanConstraint createBooleanConstraint()

      Description copied from class: `ConstraintFactory`
      Create a new boolean constraint. A boolean constraint must be initialized after it's created by adding one or more tests to it.
      Specified by:
        `createBooleanConstraint` in class `ConstraintFactory`
      Returns:
        A new boolean constraint, completely unconstrained.

    - #### embedConstraint

          public FSMatchConstraint embedConstraint(FeaturePath featPath,
                                                   FSConstraint constraint)

      Description copied from class: `ConstraintFactory`
      Combine a constraint test with a path from a feature structure instance to the value to be tested. This is called "embedding" a constraint under a path. For example, create an int constraint, and then embed it under some int valued feature, such as the start feature of an annotation.
      Specified by:
        `embedConstraint` in class `ConstraintFactory`
      Parameters:
        `featPath` - The path to embed the constraint under. Create a new path with `CAS.createFeaturePath()`.
        `constraint` - The constraint to be embedded.
      Returns:
        A new FSMatchConstraint.

    - #### embedConstraint

          public FSMatchConstraint embedConstraint(ArrayList<String> path,
                                                   FSConstraint constraint)

      Description copied from class: `ConstraintFactory`
      Embed a constraint under a path. For example, create an int constraint, and then embed it under some int valued feature, such as the start feature of an annotation.
      Specified by:
        `embedConstraint` in class `ConstraintFactory`
      Parameters:
        `path` - The path to embed the constraint under. This is a list of `Feature` names.
        `constraint` - The constraint to be embedded.
      Returns:
        A new FSMatchConstraint.

    - #### and

          public FSMatchConstraint and(FSMatchConstraint c1,
                                       FSMatchConstraint c2)

      Description copied from class: `ConstraintFactory`
      Conjoin two constraints.
      Specified by:
        `and` in class `ConstraintFactory`
      Parameters:
        `c1` - The first conjunct.
        `c2` - The second conjunct.
      Returns:
        A new FSMatchConstraint, representing the conjunction of `c1` and `c2`.

    - #### or

          public FSMatchConstraint or(FSMatchConstraint c1,
                                      FSMatchConstraint c2)

      Description copied from class: `ConstraintFactory`
      Disjoin two constraints.
      Specified by:
        `or` in class `ConstraintFactory`
      Parameters:
        `c1` - The first disjunct.
        `c2` - The second disjunct.
      Returns:
        A new FSMatchConstraint, representing the disjunction of `c1` and `c2`.

Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.