org.eclipse.viatra.query.runtime.matchers.psystem.queries

## Class PQueries

- java.lang.Object
- - org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQueries

-     public final class PQueries
      extends java.lang.Object

  Utility class for using PQueries in functional/streaming collection operations effectively

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `calculateSimpleName(java.lang.String qualifiedName)` Calculates the simple name related from a given qualified name by finding the part after the last '.' character.
    `static java.util.function.Function<PBody,java.util.stream.Stream<PQuery>>` | `directlyReferencedQueriesFunction()` Enumerates referred queries (without duplicates) for the given body
    `static java.util.stream.Stream<IInputKey>` | `directlyRequiredTypesOfDisjunction(PDisjunction disjunctBodies, boolean enumerablesOnly)` Enumerates directly referred extensional relations (without duplicates) for the given formulation of a query.
    `static java.util.stream.Stream<IInputKey>` | `directlyRequiredTypesOfQuery(PQuery query, boolean enumerablesOnly)` Enumerates directly referred extensional relations (without duplicates) in the canonical form of the given query
    `static java.util.Set<PTraceable>` | `getTraceables(PQuery query)` Returns all `PTraceable`s contained in the given `PQuery`: itself, its bodies and their constraints.
    `static java.util.function.Predicate<PParameter>` | `parameterDirectionPredicate(PParameterDirection direction)`
    `static java.util.function.Predicate<PQuery>` | `queryStatusPredicate(PQuery.PQueryStatus status)` Predicate checking for the status of selected queries

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

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

- - ### Method Detail

    - #### queryStatusPredicate

          public static java.util.function.Predicate<PQuery> queryStatusPredicate(PQuery.PQueryStatus status)

      Predicate checking for the status of selected queries

    - #### directlyReferencedQueriesFunction

          public static java.util.function.Function<PBody,java.util.stream.Stream<PQuery>> directlyReferencedQueriesFunction()

      Enumerates referred queries (without duplicates) for the given body

    - #### directlyRequiredTypesOfQuery

          public static java.util.stream.Stream<IInputKey> directlyRequiredTypesOfQuery(PQuery query,
                                                                                        boolean enumerablesOnly)

      Enumerates directly referred extensional relations (without duplicates) in the canonical form of the given query
      Parameters:
        `enumerablesOnly` - only enumerable type constraints are considered
      Since:
        2.0

    - #### directlyRequiredTypesOfDisjunction

          public static java.util.stream.Stream<IInputKey> directlyRequiredTypesOfDisjunction(PDisjunction disjunctBodies,
                                                                                              boolean enumerablesOnly)

      Enumerates directly referred extensional relations (without duplicates) for the given formulation of a query.
      Parameters:
        `enumerablesOnly` - only enumerable type constraints are considered
      Since:
        2.0

    - #### parameterDirectionPredicate

          public static java.util.function.Predicate<PParameter> parameterDirectionPredicate(PParameterDirection direction)

      Since:
        1.4

    - #### getTraceables

          public static java.util.Set<PTraceable> getTraceables(PQuery query)

      Returns all `PTraceable`s contained in the given `PQuery`: itself, its bodies and their constraints.
      Since:
        1.6

    - #### calculateSimpleName

          public static java.lang.String calculateSimpleName(java.lang.String qualifiedName)

      Calculates the simple name related from a given qualified name by finding the part after the last '.' character.
      Since:
        2.0