public function addResource(ResourceInterface $resource, array $options=[]) {
		if ($resource->getResource()->isEmpty()) {
			throw new InputException('does not make sense to add empty resources to a collection');
		}
		
		$options = array_merge(self::$defaults, $options);
		
		$this->validator->claimUsedResourceIdentifier($resource);
		
		$this->resources[] = $resource;
		
		if ($options['includeContainedResources'] && $resource instanceof RecursiveResourceContainerInterface) {
			$this->addIncludedResourceObject(...$resource->getNestedContainedResourceObjects());
		}
	}