throw new RepositoryException("VirtuosoRepositoryConnection().castValue() Invalid value from Virtuoso: \"" + valueString + "\", STRTYPE = " + ves.getIriType(), iaex);
}
}
}
else if (val instanceof RdfBox) {
RdfBox rb = (RdfBox) val;
if (rb.getLang() != null) {
return getRepository().getValueFactory().createLiteral(rb.toString(), rb.getLang());
}
else if (rb.getType() != null) {
return getRepository().getValueFactory().createLiteral(rb.toString(), this.getRepository().getValueFactory().createURI(rb.getType()));
}
else {
return getRepository().getValueFactory().createLiteral(rb.toString());
}
}
else if (val instanceof java.lang.Long) {
return getRepository().getValueFactory().createLiteral(((Long) val).longValue());
}