Skip to content

Commit

Permalink
Remove skip parsing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
avazirna committed Jul 27, 2023
1 parent 34ed460 commit 91a601d
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/main/java/org/commcare/data/xml/DataModelPullParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Vector;

/**
Expand All @@ -29,33 +28,31 @@ public class DataModelPullParser extends ElementParser<Boolean> {
private final InputStream is;
private final String requiredRootEnvelope = null;
private final CommCareOTARestoreListener rListener;
private List<String> blocksToSkipParsing;

public DataModelPullParser(InputStream is, TransactionParserFactory factory) throws InvalidStructureException, IOException {
this(is, factory, false);
}

public DataModelPullParser(InputStream is, TransactionParserFactory factory, CommCareOTARestoreListener rl) throws InvalidStructureException, IOException {
this(is, factory, false, false, rl, null);
this(is, factory, false, false, rl);
}

public DataModelPullParser(InputStream is, TransactionParserFactory factory, boolean deep) throws InvalidStructureException, IOException {
this(is, factory, false, deep);
}

public DataModelPullParser(InputStream is, TransactionParserFactory factory, boolean failfast, boolean deep) throws InvalidStructureException, IOException {
this(is, factory, failfast, deep, null, null);
this(is, factory, failfast, deep, null);
}

public DataModelPullParser(InputStream is, TransactionParserFactory factory, boolean failfast, boolean deep, CommCareOTARestoreListener rListener, List<String> blocksToSkipParsing) throws InvalidStructureException, IOException {
public DataModelPullParser(InputStream is, TransactionParserFactory factory, boolean failfast, boolean deep, CommCareOTARestoreListener rListener) throws InvalidStructureException, IOException {
super(ElementParser.instantiateParser(is));
this.is = is;
this.failfast = failfast;
this.factory = factory;
errors = new Vector<>();
this.deep = deep;
this.rListener = rListener;
this.blocksToSkipParsing = blocksToSkipParsing;
}

@Override
Expand Down Expand Up @@ -129,11 +126,6 @@ private void parseBlock(String root, LinkedHashSet<TransactionParser> parsers) t
continue;
}

if (blocksToSkipParsing != null && blocksToSkipParsing.contains(name)) {
this.skipBlock(name);
continue;
}

TransactionParser transaction = factory.getParser(parser);
if (transaction == null) {
if (deep) {
Expand Down

0 comments on commit 91a601d

Please sign in to comment.