Examples of downloadMapResources()


Examples of de.fuberlin.wiwiss.d2rq.map.Mapping.downloadMapResources()

 
  public void testGenerateDownloadMap() {
    Mapping m = MappingHelper.readFromTestFile("parser/download-map.ttl");
    MappingHelper.connectToDummyDBs(m);
    Resource name = ResourceFactory.createResource("http://example.org/dm");
    assertTrue(m.downloadMapResources().contains(name));
    DownloadMap d = m.downloadMap(name);
    assertNotNull(d);
    assertEquals("image/png",
        d.getMediaTypeValueMaker().makeValue(
            new ResultRow() {public String get(ProjectionSpec column) {return null;}}));
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.map.Mapping.downloadMapResources()

        "303 See Other: For a description of this item, see " + location);
  }

  private boolean handleDownload(String resourceURI, HttpServletResponse response, D2RServer server) throws IOException {
    Mapping m = D2RServer.retrieveSystemLoader(getServletContext()).getMapping();
    for (Resource r: m.downloadMapResources()) {
      DownloadMap d = m.downloadMap(r);
      DownloadContentQuery q = new DownloadContentQuery(d, resourceURI);
      if (q.hasContent()) {
        response.setContentType(q.getMediaType() != null ? q.getMediaType() : "application/octet-stream");
        InputStream is = q.getContentStream();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.