@classmethod
def check_new_graph(cls, service, uri, parameters, new_graph, resource=None,
    added=None, removed=None):
    """I check that a graph is a valid representation for a resource.

        This hook method is to be called when a resource of this class is
        either created and updated, to verify if `new_graph` is acceptable.

        :param service:    the service to which `new_graph` has been posted
        :type  service:    :class:`Service`
        :param uri:        the URI of the resource described by `new_graph`
        :type  uri:        :class:`rdflib.URIRef`
        :param parameters: the query string parameters passed to `edit` if any
        :type  parameters: dict or None
        :type  new_graph:  :class:`rdflib.Graph`
        :param new_graph:  graph to check
        :type  new_graph:  :class:`rdflib.Graph`

        The following parameter will always be set when `check_new_graph` is
        used to update and *existing* resource; for creating a new resource, it
        will always be `None`.

        :param resource:  the resource to be updated

        The following parameters only make sense when updating an existing
        resource. They are *not* automatically set by `edit`:meth:, as they may
        not be used. However, any implementation may set them by using
        :func:`compute_added_and_removed` and should therefore pass them along
        the `super` calls.

        :param added:     if not None, an RDF graph containg triples to be
                          added
        :param removed:   if not None, an RDF graph containg triples to be
                          removed

        The return value should be an empty `~.util.Diagnosis`:class: if the
        new graph is acceptable, else it should contain a description of the
        problem(s).

        :rtype: `~.util.Diagnosis`:class:
        """
    raise NotImplementedError
