Open Semantic Framework PHP API  3.0
 All Data Structures Namespaces Files Functions Variables Pages
RevisionUpdateQuery.php
Go to the documentation of this file.
1 <?php
2 
5 
11 
57  class RevisionUpdateQuery extends \StructuredDynamics\osf\php\api\framework\WebServiceQuery
58  {
67  function __construct($network, $appID, $apiKey, $userID)
68  {
69  // Set the OSF network & credentials to use for this query.
70  $this->setNetwork($network);
71  $this->appID = $appID;
72  $this->apiKey = $apiKey;
73  $this->userID = $userID;
74 
75  // Set default configarations for this web service query
76  $this->setSupportedMimes(array("text/xml",
77  "application/json",
78  "application/rdf+xml",
79  "application/rdf+n3",
80  "application/iron+json",
81  "application/iron+csv"));
82 
83  $this->setMethodGet();
84 
85  $this->mime("resultset");
86 
87  $this->setEndpoint("revision/update");
88 
89  // Set default parameters for this query
90  $this->sourceInterface("default");
91  }
92 
103  public function revisionUri($uri)
104  {
105  $this->params["revuri"] = urlencode($uri);
106 
107  return($this);
108  }
109 
120  public function dataset($dataset)
121  {
122  $this->params["dataset"] = urlencode($dataset);
123 
124  return($this);
125  }
126 
136  public function isPublished()
137  {
138  $this->params["lifecycle"] = 'published';
139 
140  return($this);
141  }
142 
152  public function isArchive()
153  {
154  $this->params["lifecycle"] = 'archive';
155 
156  return($this);
157  }
158 
168  public function isExperimental()
169  {
170  $this->params["lifecycle"] = 'experimental';
171 
172  return($this);
173  }
174 
184  public function isPreRelease()
185  {
186  $this->params["lifecycle"] = 'pre_release';
187 
188  return($this);
189  }
190 
200  public function isStaging()
201  {
202  $this->params["lifecycle"] = 'staging';
203 
204  return($this);
205  }
206 
216  public function isHarvesting()
217  {
218  $this->params["lifecycle"] = 'harvesting';
219 
220  return($this);
221  }
222 
232  public function isUnspecified()
233  {
234  $this->params["lifecycle"] = 'unspecified';
235 
236  return($this);
237  }
238  }
239 
241 ?>
isArchive()
Specify that the record being updated has a lifecycle stage status 'archive'.
isPublished()
Specify that the record being updated has a lifecycle stage status 'published'.
isStaging()
Specify that the record being updated has a lifecycle stage status 'staging'.
isExperimental()
Specify that the record being updated has a lifecycle stage status 'experimental'.
isUnspecified()
Specify that the record being updated has a lifecycle stage status 'unspecified'. ...
__construct($network, $appID, $apiKey, $userID)
Constructor.
isHarvesting()
Specify that the record being updated has a lifecycle stage status 'harvesting'.
dataset($dataset)
Specifies the dataset URI where the record is indexed.
revisionUri($uri)
Specifies the URI of the revision record to delete.
Revision Update Query to a OSF Revision Update web service endpoint.
isPreRelease()
Specify that the record being updated has a lifecycle stage status 'pre-release'. ...