Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-29

Create abstract base class for sequencers that process streamed contents and generate simple data

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 0.1
    • None
    • Sequencers
    • None

      A number of sequencers are simple enough that most of the logic for the sequencer lies in the processing of the stream and the definition of what properties are to be set on various nodes. There should be an abstract base class implementation of the Sequencer interface that does all of the other work: obtain the stream to the changed property, find the node(s) where the sequencer output is to be written; then after the stream is processed, close the stream, and ensure that each output node reflects the sequencer-determined structure. The latter includes some reusable logic to handle the case of updating a subgraph.

      The abstract class would have a method to which is passed the InputStream to the changed property and a container into which the output properties are to be placed. Subclasses only need to implement this method, and all else is done for them.

      The collection could be a Map<Path,Object>, where the keys are the relative paths to the properties and the values the property values. This collection essentially becomes a container for the subject-predicate-object triples of the output subgraph, where the path defines the "subject" (the path to the node) and "predicate" (the property on the node), and the value defines the "object".

            rhauch Randall Hauch (Inactive)
            rhauch Randall Hauch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: