use of org.openrdf.model.util.GraphUtilException in project incubator-rya by apache.
the class RyaAccumuloSailConfig method parse.
@Override
public void parse(final Graph graph, final Resource implNode) throws SailConfigException {
super.parse(graph, implNode);
System.out.println("parsing");
try {
final Literal userLit = GraphUtil.getOptionalObjectLiteral(graph, implNode, USER);
if (userLit != null) {
setUser(userLit.getLabel());
}
final Literal pwdLit = GraphUtil.getOptionalObjectLiteral(graph, implNode, PASSWORD);
if (pwdLit != null) {
setPassword(pwdLit.getLabel());
}
final Literal instLit = GraphUtil.getOptionalObjectLiteral(graph, implNode, INSTANCE);
if (instLit != null) {
setInstance(instLit.getLabel());
}
final Literal zooLit = GraphUtil.getOptionalObjectLiteral(graph, implNode, ZOOKEEPERS);
if (zooLit != null) {
setZookeepers(zooLit.getLabel());
}
final Literal mockLit = GraphUtil.getOptionalObjectLiteral(graph, implNode, IS_MOCK);
if (mockLit != null) {
setMock(Boolean.parseBoolean(mockLit.getLabel()));
}
} catch (final GraphUtilException e) {
throw new SailConfigException(e.getMessage(), e);
}
}
Aggregations