![JAR search and dependency download from the Maven repository](/logo.png)
net.intelie.liverig.witsml.query.WellboreListQuery131 Maven / Gradle / Ivy
The newest version!
package net.intelie.liverig.witsml.query;
import net.intelie.liverig.parser.ParseException;
import net.intelie.liverig.witsml.WITSMLResult;
import net.intelie.liverig.witsml.objects.WellboreUidName;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import java.util.ArrayList;
import java.util.List;
class WellboreListQuery131 extends AbstractQuery131 implements WellboreListQuery {
private final String uidWell;
WellboreListQuery131(String uidWell) {
this.uidWell = uidWell;
}
@Override
public String type() {
return "wellbore";
}
@Override
public String options() {
return RETURN_ELEMENTS_REQUESTED;
}
@Override
void query(XMLStreamWriter writer) throws XMLStreamException {
writeRootElement(writer, "wellbores");
writer.writeStartElement(WITSML_NS, "wellbore");
writer.writeAttribute("uidWell", uidWell);
writer.writeAttribute("uid", "");
writer.writeEmptyElement(WITSML_NS, "nameWell");
writer.writeEmptyElement(WITSML_NS, "name");
writer.writeEndElement();
}
@Override
public List parse(WITSMLResult witsmlResult) throws ParseException {
String xml = witsmlResult.getXml();
List result = new ArrayList<>();
parse(xml, new Parser(result));
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy