1 5 6 package com.hp.hpl.jena.joseki; 7 8 import org.apache.commons.logging.* ; 9 10 import com.hp.hpl.jena.rdf.model.* ; 11 12 23 24 public class HttpFetch extends HttpQuery 25 { 26 static final Log logger = LogFactory.getLog(HttpFetch.class.getName()) ; 27 28 33 34 public HttpFetch(String url, Resource resource) 35 { 36 super(url, "fetch") ; 37 addParam("r", resource.getURI()) ; 38 } 39 40 45 public HttpFetch(String url, String resourceURI) 46 { 47 super(url, "fetch") ; 48 addParam("r", resourceURI) ; 49 } 50 51 57 public HttpFetch(String url, Property predicate, RDFNode value) 58 { 59 super(url, "fetch") ; 60 addParam("p", predicate.getURI()) ; 61 if ( value instanceof Resource) 62 addParam("o", ((Resource)value).getURI() ) ; 63 else 64 addParam("v", ((Literal)value).getLexicalForm()) ; 65 } 66 67 74 75 public HttpFetch(String url, String predicateURI, String objURIorValue, boolean isURI) 76 { 77 super(url, "fetch") ; 78 addParam("p", predicateURI) ; 79 if ( isURI ) 80 addParam("o", objURIorValue) ; 81 else 82 addParam("v", objURIorValue) ; 83 } 84 85 86 } 87 88 114 | Popular Tags |