Open Semantic Framework PHP API  3.0
 All Data Structures Namespaces Files Functions Variables Pages
SconesQuery.php
Go to the documentation of this file.
1 <?php
2 
5 
11 
65  class SconesQuery extends \StructuredDynamics\osf\php\api\framework\WebServiceQuery
66  {
75  function __construct($network, $appID, $apiKey, $userID)
76  {
77  // Set the OSF network & credentials to use for this query.
78  $this->setNetwork($network);
79  $this->appID = $appID;
80  $this->apiKey = $apiKey;
81  $this->userID = $userID;
82 
83  // Set default configarations for this web service query
84  $this->setSupportedMimes(array("text/xml",
85  "application/json",
86  "application/rdf+xml",
87  "application/rdf+n3",
88  "application/iron+json",
89  "application/iron+csv"));
90 
91  $this->setMethodPost();
92 
93  $this->mime("text/xml");
94 
95  $this->setEndpoint("scones/");
96 
97  // Set default parameters for this query
98  $this->params["docmime"] = "text/plain";
99 
100  $this->application("defaultApplication");
101  $this->sourceInterface("default");
102  }
103 
125  public function document($document)
126  {
127  $this->params["document"] = urlencode($document);
128 
129  return($this);
130  }
131 
145  public function application($application)
146  {
147  $this->params["application"] = urlencode($application);
148 
149  return($this);
150  }
151  }
152 
154 ?>
__construct($network, $appID, $apiKey, $userID)
Constructor.
Definition: SconesQuery.php:75
Scones to a OSF Scones web service endpoint.
Definition: SconesQuery.php:65
document($document)
Document content to process; or URL of a document accessible on the web to extract/process.
application($application)
Specifies the application to use to tag the content of the input document.