'Check the source is well constructed.'

def Validate(self):

    if (self.type == 'COMMAND'):
        args = self.attributes.GetItem('args')
        if (args and (len(args) == 1) and ('    ' in args[0])):
            raise ArtifactDefinitionError(('Cannot    specify    a    single    argument    containing    a    space:    %s.' % args))
    if self.attributes.GetItem('paths'):
        if (not isinstance(self.attributes.GetItem('paths'), list)):
            raise ArtifactDefinitionError("Arg    'paths'    that    is    not    a    list.")
    if self.attributes.GetItem('path'):
        if (not isinstance(self.attributes.GetItem('path'), basestring)):
            raise ArtifactDefinitionError("Arg    'path'    is    not    a    string.")
    if self.returned_types:
        for rdf_type in self.returned_types:
            if (rdf_type not in rdfvalue.RDFValue.classes):
                raise ArtifactDefinitionError(('Invalid    return    type    %s' % rdf_type))
    src_type = self.TYPE_MAP.get(str(self.type))
    if (src_type is None):
        raise ArtifactDefinitionError(('Invalid    type    %s.' % self.type))
    required_attributes = src_type.get('required_attributes', [])
    missing_attributes = set(required_attributes).difference(self.attributes.keys())
    if missing_attributes:
        raise ArtifactDefinitionError(('Missing    required    attributes:    %s.' % missing_attributes))
