@staticmethod
def _compare_rdf_triples(t1, t2):
    """
        Compares two RDF triples for equality.

        :param t1: the first triple.
        :param t2: the second triple.

        :return: True if the triples are the same, False if not.
        """
    for attr in ['subject', 'predicate', 'object']:
        if t1[attr]['type'] != t2[attr]['type'] or t1[attr]['value'] != t2[attr
            ]['value']:
            return False
    if t1['object'].get('language') != t2['object'].get('language'):
        return False
    if t1['object'].get('datatype') != t2['object'].get('datatype'):
        return False
    return True
