Table of Contents

Class Preview

Namespace
ROCrates.Models
Assembly
ROCrates.Net.dll
public class Preview : File
Inheritance
Preview
Inherited Members

Constructors

Preview()

public Preview()

Preview(ROCrate?, string?, JsonObject?, string?, string?, bool, bool)

public Preview(ROCrate? crate = null, string? identifier = null, JsonObject? properties = null, string? source = null, string? destPath = null, bool fetchRemote = false, bool validateUrl = false)

Parameters

crate ROCrate
identifier string
properties JsonObject
source string
destPath string
fetchRemote bool
validateUrl bool

Fields

FileName

protected const string FileName = "ro-crate-preview.html"

Field Value

string

Methods

Deserialize(string, ROCrate)

Create a Preview from JSON properties.

public static Preview? Deserialize(string entityJson, ROCrate roCrate)

Parameters

entityJson string

The JSON representing the Preview

roCrate ROCrate

The RO-Crate for the Preview

Returns

Preview

The deserialised Preview

Serialize()

Convert Preview to JSON string.

public override string Serialize()

Returns

string

The Preview as a JSON string.

Write(string)

Write the HTML preview of the RO-Crate.

public override void Write(string basePath)

Parameters

basePath string

The directory where the preview file will be written.

_empty()

protected JsonObject _empty()

Returns

JsonObject