com.giffing.easyxml.stax.reader.StaxReader Maven / Gradle / Ivy
package com.giffing.easyxml.stax.reader;
import java.util.ArrayList;
import java.util.List;
import javax.xml.stream.XMLStreamReader;
import com.giffing.easyxml.context.TransformContext;
import com.giffing.easyxml.context.TransformResult;
import com.giffing.easyxml.reader.Reader;
import com.giffing.easyxml.reader.item.ItemReader;
import com.giffing.easyxml.stax.reader.context.StaxTransformerResult;
public abstract class StaxReader implements Reader {
private List> readers = new ArrayList<>();
public StaxReader(List> readers) {
this.readers = readers;
}
@Override
public List> getItemReaders() {
return readers;
}
@Override
public TransformResult transform(TransformContext transformContext) {
return new StaxTransformerResult(transformContext.getStreamReader());
}
}