public static function getFileAttribute(Application $app, $name, $serialized)
    {
        switch ($name)
        {
            case AttributeInterface::NAME_METADATA:
                return Metadata::loadFromString($app, $serialized);
            case AttributeInterface::NAME_STORY:
                return Story::loadFromString($app, $serialized);
            case AttributeInterface::NAME_METAFIELD:
                return MetaField::loadFromString($app, $serialized);
            case AttributeInterface::NAME_STATUS:
                return Status::loadFromString($app, $serialized);
        }

        throw new \InvalidArgumentException(sprintf('Unknown attribute %s', $name));
    }