Add a resource or an iterable collection of resources.

        Will throw a ValueError if the resource (ie. same uri) already
        exists in the ResourceList, unless replace=True.

def add(self, resource, replace=False):
        """Add a resource or an iterable collection of resources.

        Will throw a ValueError if the resource (ie. same uri) already
        exists in the ResourceList, unless replace=True.
        """
        if isinstance(resource, collections.Iterable):
            for r in resource:
                self.resources.add(r, replace)
        else:
            self.resources.add(resource, replace)