'Validate the RDFMaps.'

def testRDFMaps(self):

    for (rdf_name, dat) in artifact.GRRArtifactMappings.rdf_map.items():
        (_, aff4_type, aff4_attribute, operator) = dat
        if (operator not in ['Append', 'Overwrite']):
            raise artifact_registry.ArtifactDefinitionError(('Bad    RDFMapping,    unknown    operator    %s    in    %s' % (operator, rdf_name)))
        if (aff4_type not in aff4.AFF4Object.classes):
            raise artifact_registry.ArtifactDefinitionError(('Bad    RDFMapping,    invalid    AFF4    Object    %s    in    %s' % (aff4_type, rdf_name)))
        attr = getattr(aff4.AFF4Object.classes[aff4_type].SchemaCls, aff4_attribute)()
        if (not isinstance(attr, rdfvalue.RDFValue)):
            raise artifact_registry.ArtifactDefinitionError(('Bad    RDFMapping,    bad    attribute    %s    for    %s' % (aff4_attribute, rdf_name)))
