Class BlockParser<T extends ParseInfo<?>>

java.lang.Object
org.orekit.files.sinex.BlockParser<T>
Type Parameters:
T - type of the sinex files parse info
All Implemented Interfaces:
LineParser<T>
Direct Known Subclasses:
IgnoredBlockParser

public class BlockParser<T extends ParseInfo<?>> extends Object implements LineParser<T>
Parser for SINEX block.
Since:
13.0
Author:
Luc Maisonobe
  • Constructor Details

    • BlockParser

      public BlockParser(String blockId, List<Predicate<T>> predicates)
      Simple constructor.
      Parameters:
      blockId - regular expression for block name
      predicates - predicates for parsing block content lines
  • Method Details

    • setSiblingParsers

      public void setSiblingParsers(List<LineParser<T>> siblingParsers)
      Set allowed parsers when leaving this block.
      Parameters:
      siblingParsers - allowed parsers when leaving this block
    • parseIfRecognized

      public boolean parseIfRecognized(T parseInfo)
      Parse a line if recognized.
      Specified by:
      parseIfRecognized in interface LineParser<T extends ParseInfo<?>>
      Parameters:
      parseInfo - holder for transient data
      Returns:
      true if line was recognized
    • allowedNextParsers

      public Iterable<LineParser<T>> allowedNextParsers(T parseInfo)
      Get allowed next line parsers.
      Specified by:
      allowedNextParsers in interface LineParser<T extends ParseInfo<?>>
      Parameters:
      parseInfo - holder for transient data
      Returns:
      allowed parszers for next lines
    • outsideBlock

      protected boolean outsideBlock()
      Check if we are outside block.
      Returns:
      true if we are at block end
    • checkEntering

      protected boolean checkEntering(T parseInfo)
      Check if we are at the start marker.
      Parameters:
      parseInfo - holder for transient data
      Returns:
      true if we are at block start
    • checkLeaving

      protected boolean checkLeaving(T parseInfo)
      Check if we are at the end marker.
      Parameters:
      parseInfo - holder for transient data
      Returns:
      true if we are at block end