/** * Removes data from the given SMWSemanticData. * If the subject of the data that is to be removed is not equal to the * subject of this SMWSemanticData, it will just be ignored (nothing to * remove). Likewise, removing data that is not present does not change * anything. * * @since 1.8 * * @param SemanticData $semanticData */ public function removeDataFrom(SemanticData $semanticData) { if (!$this->mSubject->equals($semanticData->getSubject())) { return; } foreach ($semanticData->getProperties() as $property) { $values = $semanticData->getPropertyValues($property); foreach ($values as $dataItem) { $this->removePropertyObjectValue($property, $dataItem); } } foreach ($semanticData->getSubSemanticData() as $semData) { $this->removeSubSemanticData($semData); } }