C# Class Chronozoom.Entities.Storage

Storage implementation for ChronoZoom based on Entity Framework.
Inheritance: DbContext
Mostrar archivo Open project: JayBeavers/ChronoZoom Class Usage Examples

Public Methods

Method Description
DeletePrefix ( string prefixStr, string fullStr ) : bool

Delete prefix and associated namespace with it.

DeleteTriplet ( TripleName subjectName, TripleName predicateName, TripleName objectName ) : bool

Delete triple with specified parameters.

EnsurePrefix ( TripleName name ) : TripleName

Ensures that triple name has prefix. If triple name has namespace, it is converted to prefix

GetIncomingTriplets ( string predicate, string obj ) : List

Build list of triples that reference specified object

GetTimelineShortcut ( Timeline timeline ) : TimelineShortcut

Get TimelineShortctu from Timeline

GetTriplet ( string subject, string predicate = null, string obj = null, bool expandPrefixes = false ) : List

Get triple by specified parameters.

PutTriplet ( TripleName subjectName, TripleName predicateName, TripleName objectName ) : bool

Add triple with specified parameters.

SetPrefix ( string prefixStr, string fullStr ) : bool

Add new prefix and associated namespace with it.

TryEnsureNamespace ( TripleName name ) : TripleName

Private Methods

Method Description
GetTimelineImageUrl ( Timeline timeline ) : string

Method Details

DeletePrefix() public method

Delete prefix and associated namespace with it.
public DeletePrefix ( string prefixStr, string fullStr ) : bool
prefixStr string Prefix
fullStr string Namespace
return bool

DeleteTriplet() public method

Delete triple with specified parameters.
public DeleteTriplet ( TripleName subjectName, TripleName predicateName, TripleName objectName ) : bool
subjectName TripleName Subject
predicateName TripleName Predicate
objectName TripleName Object
return bool

EnsurePrefix() public method

Ensures that triple name has prefix. If triple name has namespace, it is converted to prefix
public EnsurePrefix ( TripleName name ) : TripleName
name TripleName Name of the triple
return TripleName

GetIncomingTriplets() public method

Build list of triples that reference specified object
public GetIncomingTriplets ( string predicate, string obj ) : List
predicate string Optional predicate name
obj string Object full name
return List

GetTimelineShortcut() public method

Get TimelineShortctu from Timeline
public GetTimelineShortcut ( Timeline timeline ) : TimelineShortcut
timeline Timeline Timeline object
return TimelineShortcut

GetTriplet() public method

Get triple by specified parameters.
public GetTriplet ( string subject, string predicate = null, string obj = null, bool expandPrefixes = false ) : List
subject string Subject name with prefix
predicate string Predicate name with prefix or null
obj string Object name with prefix or null
expandPrefixes bool If 'True' returns namespaces, else - prefixes.
return List

PutTriplet() public method

Add triple with specified parameters.
public PutTriplet ( TripleName subjectName, TripleName predicateName, TripleName objectName ) : bool
subjectName TripleName
predicateName TripleName
objectName TripleName
return bool

SetPrefix() public method

Add new prefix and associated namespace with it.
public SetPrefix ( string prefixStr, string fullStr ) : bool
prefixStr string Prefix
fullStr string Namespace
return bool

TryEnsureNamespace() public method

public TryEnsureNamespace ( TripleName name ) : TripleName
name TripleName
return TripleName