'Get an instance of a DAO object given a document'

@classmethod
def parse(cls, document):

    entity_cls = cls.get_entity_class_from_doc(document)
    if (entity_cls is not None):
        entity = entity_cls(document)
        metadata = EntityMetadata(document)
        entity.entity_metadata = metadata
        return entity
    return None
