Class Reading.Record<D,T,A>

java.lang.Object
eu.bandm.tools.ramus.ogma.Reading.Record<D,T,A>
Type Parameters:
D - the type of document identifiers
T - the type of token types
A - the type of parsing results
Enclosing class:
Reading<D,T,A>

public static class Reading.Record<D,T,A> extends Object
Queriable summary of the outcomes of processing input with a reading.
See Also:
  • Method Details

    • getSyntacticObstructions

      public SortedSet<Reading.Item<D,Input<D,T>>> getSyntacticObstructions()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the set of input states rejected as obstructions.

      Elements of the set are sorted in ascending order of progress through the input stream; the earliest state comes first, the latest last.

      Returns:
      the set of input states rejected as obstructions
    • getLastObstructionToken

      public Optional<Token<D,T>> getLastObstructionToken()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the last input token rejected as an obstruction if available.

      The returned token designates the furthest progress that parsing has made through the input stream before failing.

      Returns:
      the last input token rejected as an obstruction, or Optional.empty() if there is no obstruction
    • getSemanticObstructions

      public Set<Reading.Item<D,State>> getSemanticObstructions()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getSuccesses

      public List<Reading.Item<D,A>> getSuccesses()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the list of successful interpretations.
      Returns:
      the list of successful interpretations
    • getFirstResult

      public Optional<A> getFirstResult(MessageReceiver<? super SimpleMessage<D>> msg)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the first successful interpretation if available, posting associated diagnostic messages to a receiver.

      If the input has been ambiguous, further interpretations are ignored.

      Parameters:
      msg - a receiver for the diagnostic messages associated with the result
      Returns:
      the first successful interpretation, or Optional.empty() if there is none
      Throws:
      NullPointerException - if msg is null
    • getUniqueResult

      public Optional<A> getUniqueResult(MessageReceiver<? super SimpleMessage<D>> msg)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the unique successful interpretation if available, posting associated diagnostic messages to a receiver.
      Parameters:
      msg - a receiver for the diagnostic messages associated with the result
      Returns:
      the unique successful interpretation, or Optional.empty() if there is either none or more than one
      Throws:
      NullPointerException - if msg is null