public RepositoryObject createOldObject(
ActivatedVariablePolicy policy, Variant variant,
InternalDevice device) {
// Convert the variant into an asset.
TextMetaData metaData = (TextMetaData) variant.getMetaData();
TextAsset asset = new TextAsset();
setAssetIdentity(policy, asset);
asset.setEncoding(ENCODING.get(metaData.getTextEncoding()));
asset.setLanguage(metaData.getLanguage());
setValue(asset, variant);
return asset;
}