Package de.fuberlin.wiwiss.pubby.sources

Examples of de.fuberlin.wiwiss.pubby.sources.DataSource


 

  private DataSource buildDataSource(Configuration configuration) {
    requireExactlyOneOf(CONF.sparqlEndpoint, CONF.loadRDF);

    DataSource result;
    if (hasProperty(CONF.sparqlEndpoint)) {
     
      // SPARQL data source
      String endpointURL = getIRI(CONF.sparqlEndpoint);
      String defaultGraphURI = getIRI(CONF.sparqlDefaultGraph);
View Full Code Here


    dataSource = buildDataSource();

    // Vocabulary data source contains our normal data sources plus
    // the configuration model, so that we can read labels etc from
    // the configuration file
    DataSource vocabularyDataSource = new MergeDataSource(
        new ModelDataSource(getModel()), getDataSource());
    vocabularyStore.setDataSource(vocabularyDataSource);
    vocabularyStore.setDefaultLanguage(getDefaultLanguage());

    // Sanity check to spot typical configuration problem
View Full Code Here

  private DataSource buildDataSource() {
    List<DataSource> sources = new ArrayList<DataSource>(datasets.size());
    for (Dataset dataset: datasets) {
      sources.add(dataset.getDataSource());
    }
    DataSource result = new MergeDataSource(sources, prefixes);
    // If we don't have an indexResource, and there is no resource
    // at the home URL in any of the datasets, then add an
    // index builder. It will be responsible for handling the
    // homepage/index resource.
    // TODO: Shouldn't we make the index data source available even if there
    //       is an indexResource?
    String indexIRI = webBase + getWebResourcePrefix();
    if (!hasProperty(CONF.indexResource) &&
        result.describeResource(indexIRI).isEmpty()) {
      result = new IndexDataSource(indexIRI, result);
    }
    return result;
  }
View Full Code Here

 
  /**
   * @return A description of the resource that allows interrogation of the data
   */
  public ResourceDescription getResourceDescription() {
    DataSource source = config.getDataSource();
    Model model = source.describeResource(absoluteIRI);
    if (model.isEmpty()) return null;
    return new ResourceDescription(this, model,
        source.getHighIndegreeProperties(absoluteIRI),
        source.getHighOutdegreeProperties(absoluteIRI),
        config);
  }
View Full Code Here

TOP

Related Classes of de.fuberlin.wiwiss.pubby.sources.DataSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.