-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInspectorOptions.cs
109 lines (94 loc) · 3.33 KB
/
InspectorOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
using IS4.SFI.RDF;
using IS4.SFI.Services;
using System;
using System.Collections.Generic;
namespace IS4.SFI.Application
{
/// <summary>
/// Additional options and configuration of <see cref="Inspector"/>.
/// </summary>
public class InspectorOptions
{
/// <summary>
/// Whether to write the output directly or use an intermediate graph.
/// </summary>
public bool DirectOutput {
get => Buffering != BufferingLevel.Full;
[Obsolete("Set " + nameof(Buffering) + " instead to the appropriate level.")]
set {
if(value)
{
if(Buffering == BufferingLevel.Full)
{
Buffering = BufferingLevel.None;
}
}else{
Buffering = BufferingLevel.Full;
}
}
}
/// <summary>
/// Specifies the level of buffering for output.
/// </summary>
public BufferingLevel Buffering { get; set; }
/// <summary>
/// Whether to compress the output file with gzip.
/// </summary>
public bool CompressedOutput { get; set; }
/// <summary>
/// Whether to hide metadata properties, such as
/// <see cref="Vocabulary.Properties.Visited"/>, from the output.
/// </summary>
public bool HideMetadata { get; set; }
/// <summary>
/// Whether to prettify the text output.
/// </summary>
public bool PrettyPrint { get; set; }
/// <summary>
/// Input SPARQL queries to be used to search in the description.
/// </summary>
public IEnumerable<IFileInfo> Queries { get; set; } = Array.Empty<IFileInfo>();
/// <summary>
/// Whether the output file should be used to write SPARQL results.
/// </summary>
public bool OutputIsSparqlResults { get; set; }
/// <summary>
/// The root of the URI hierarchy; by default <see cref="LinkedNodeHandler.BlankUriScheme"/>.
/// </summary>
public string Root { get; set; } = LinkedNodeHandler.BlankUriScheme + ":";
/// <summary>
/// The sequence of characters used for separating lines in text output.
/// </summary>
public string NewLine { get; set; } = Environment.NewLine;
/// <summary>
/// The URI of the described node.
/// </summary>
public Uri? Node { get; set; }
/// <summary>
/// Contains the desired output format, as a file extension.
/// </summary>
public string? Format { get; set; }
/// <summary>
/// Whether to shorten blank node IDs in the resulting graph.
/// </summary>
public bool SimplifyBlankNodes { get; set; }
}
/// <summary>
/// The degree of buffering of triples.
/// </summary>
public enum BufferingLevel
{
/// <summary>
/// No triples are buffered.
/// </summary>
None = 0,
/// <summary>
/// Trimples are buffered in a temporary graph, storing a view of the output graph.
/// </summary>
Temporary = 1,
/// <summary>
/// Triples are buffered in a single graph which is then serialized to the output.
/// </summary>
Full = 2
}
}