![JAR search and dependency download from the Maven repository](/logo.png)
net.intelie.liverig.witsml.etp.EML Maven / Gradle / Ivy
The newest version!
package net.intelie.liverig.witsml.etp;
import com.google.common.base.Joiner;
import java.util.ArrayList;
import java.util.List;
public class EML {
private static final String BASE_URI = "eml://witsml20";
private List tokens;
private EML(Builder builder) {
tokens = builder.tokens;
}
public String getURI() {
if (tokens == null) return "";
else
return Joiner.on("").join(tokens);
}
public static final class Builder {
private List tokens;
public Builder() {
tokens = new ArrayList<>();
tokens.add(BASE_URI);
}
public Builder tokens(List val) {
tokens = val;
return this;
}
public Builder addPath(String path) {
tokens.add("/");
tokens.add(path);
return this;
}
public Builder addPath(String path, String id) {
tokens.add("/");
tokens.add(path);
tokens.add("(");
tokens.add(id);
tokens.add(")");
return this;
}
public Builder addWell(String id) {
addPath("Well", id);
return this;
}
public Builder addWellbore(String id) {
addPath("Wellbore", id);
return this;
}
public Builder addLog(String id) {
addPath("Log", id);
return this;
}
public Builder addChannelSet(String id) {
addPath("ChannelSet", id);
return this;
}
public EML build() {
return new EML(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy