public function TripalWebServiceResource::setID

3.x TripalWebServiceResource.inc public TripalWebServiceResource::setID($id)

Set's the unique identifier for the resource.

Every resource must have a unique Idientifer. In JSON-LD the '@id' element identifies the IRI for the resource which will include the unique identifier. The TraiplWebService to which a resource is added will build the IRIs but it needs the unique ID of each resource.

Parameters

$id: The unique identifier for the resource.

File

tripal_ws/includes/TripalWebServiceResource.inc, line 217

Class

TripalWebServiceResource

Code

public function setID($id) {
  $this->id = $id;
  $this->data['@id'] = $this->getURI($id);
}