Java Examples for virtuoso.jdbc4.VirtuosoDataSource

The following java examples will help you to understand the usage of virtuoso.jdbc4.VirtuosoDataSource. These source code samples are taken from different open source projects.

Example 1
Project: virt-jena-master  File: VirtDataSource.java View source code
/** Get a graph by name as a Jena Model */
public Model getNamedModel(String name) {
    try {
        VirtuosoDataSource _ds = getDataSource();
        if (_ds != null)
            return new VirtModel(new VirtGraph(name, _ds));
        else
            return new VirtModel(new VirtGraph(name, this.getGraphUrl(), this.getGraphUser(), this.getGraphPassword()));
    } catch (Exception e) {
        throw new JenaException(e);
    }
}