VersionedObject 0.0.2
See the version list below for details.
dotnet add package VersionedObject --version 0.0.2
NuGet\Install-Package VersionedObject -Version 0.0.2
<PackageReference Include="VersionedObject" Version="0.0.2" />
paket add VersionedObject --version 0.0.2
#r "nuget: VersionedObject, 0.0.2"
// Install VersionedObject as a Cake Addin #addin nuget:?package=VersionedObject&version=0.0.2 // Install VersionedObject as a Cake Tool #tool nuget:?package=VersionedObject&version=0.0.2
versioned-object
Library for handling and creating versioned objects and IRIs for use with the Aspect API
IRIReference
Drop-in replacement for System.Uri for use with RDF. This is needed because URIs per definition and implementation do not take into account the fragment, especially for equality comparison
#VersionedIRIReference This is used for IRIs that refer to immutable versioned objects. It is useful to separate this in a subclass of IRIReference since parsing of the IRI itself is not always enough. These IRIs are of the following form: {persistent base IRI}/version/{bytes of hash of object}/{arbitrary version numbering system} The method for calculating the hash is in JsonLdHelper.GetHash. This hashing must be done in the same way everyhwere. The algorithm is this:
- Translate to n-triples (if ambiguous, in the same way as the default in dotnetrdf)
- Split the non-empty lines of n-triples into an array of lines. Each entry is a triple
- Run CRC64 on each such line, resulting in a byte array for each line
- Run xor of all these byte arrays
- Put all elements in the array after each other as string (String.Join in C#)
#EntityGraphComparer Library for comparing unversioned (persistent) input graph with versioned (existing) graph and creates update command for the aspect api. The versioned objects that are created have only persistent IRIs inside them.
The methods HandleGraphCompleteUpdate can be called on the new/incoming data (in JSON-LD representation) with the single parameter being the existing data (in JSON-LD representation)
The assumption is that the existing data will usually be taken from some local storage or API, while the new data will be coming in from a different, not local storage.
Example usage is in TestVersionedObject/VersionedObjectTests/TestFullTranslation
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- dotNetRDF (>= 2.7.4)
- Newtonsoft.Json (>= 13.0.1)
- System.Data.HashFunction.CRC (>= 2.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release without edge reification