Droids
  1. Droids
  2. DROIDS-44

[PATCH] Refactor Parse and ParseData

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.1.0
    • Fix Version/s: 0.1.0
    • Component/s: core
    • Labels:
      None

      Description

      this issue has been mentioned a couple of times in the mail list and another JIRA issue (DROIDS-11). It seems there is no actual issue for this, so i create one.

      issues:

      • reduce number of depth in the API
      • Parse should support holding custom data or a parsed DOM document or whatever parsing result other than outlinks

        Issue Links

          Activity

          Hide
          Mingfai Ma added a comment -

          I attempt to make the change to get a feeling of how it looks like. Attached is a patch that do:

          • Parse and ParseImpl
          • changed ParseData getData to Object getData
          • added getOutlinks()
          • ParseImpl, changed to match Parse' new interface, and added a no argument constructor. when use as a JavaBean, it's better to have a no-argument constructor. e.g. if we use Spring to construct the ParseImpl, it's easier to set every attribute like JavaBean and not to use constructor. The attributes are not final anyway.
          • renamed Parser.getParse() to Parser.parse() to better reflect the action
          • changed other classes that are affected by the above changes.
          Show
          Mingfai Ma added a comment - I attempt to make the change to get a feeling of how it looks like. Attached is a patch that do: Parse and ParseImpl changed ParseData getData to Object getData added getOutlinks() ParseImpl, changed to match Parse' new interface, and added a no argument constructor. when use as a JavaBean, it's better to have a no-argument constructor. e.g. if we use Spring to construct the ParseImpl, it's easier to set every attribute like JavaBean and not to use constructor. The attributes are not final anyway. renamed Parser.getParse() to Parser.parse() to better reflect the action changed other classes that are affected by the above changes.
          Hide
          Mingfai Ma added a comment -

          the previous patch missed one change and has broken the test cases. attached is an updated one.

          Show
          Mingfai Ma added a comment - the previous patch missed one change and has broken the test cases. attached is an updated one.
          Hide
          Thorsten Scherler added a comment -

          Committed revision 762982.

          thx Mia

          Show
          Thorsten Scherler added a comment - Committed revision 762982. thx Mia

            People

            • Assignee:
              Unassigned
              Reporter:
              Mingfai Ma
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development