All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.elsci.signals.mock.assets.AssetFactory Maven / Gradle / Ivy

The newest version!
package io.elsci.signals.mock.assets;

import io.elsci.signals.sdk.assets.Asset;
import io.elsci.signals.sdk.assets.AssetType;
import org.bson.types.ObjectId;

import java.time.LocalDateTime;

import static io.qala.datagen.RandomShortApi.numeric;

public class AssetFactory {

    public static Asset protein() {
        LocalDateTime createdAt = LocalDateTime.now();
        return new Asset("asset:" + new ObjectId().toHexString(),
                "ELSCI-PRT-" + numeric(6),
                AssetType.PROTEIN,
                createdAt, createdAt
        );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy