private static Triple MakeVdsTriple(Model.Triple triple) { if (triple.IsLiteral) { LiteralNode literalNode = BrightstarLiteralNode.Create(triple.Object, triple.DataType, triple.LangCode); return(new Triple(MakeVdsNode(triple.Subject), MakeVdsNode(triple.Predicate), literalNode)); } return(new Triple(MakeVdsNode(triple.Subject), MakeVdsNode(triple.Predicate), MakeVdsNode(triple.Object))); }
private INode MakeVdsNode(IResource resource) { if (resource.IsLiteral) { var dataTypeResource = resource.DataTypeId == StoreConstants.NullUlong ? null : _store.Resolve(resource.DataTypeId); var langResource = resource.LanguageCodeId == StoreConstants.NullUlong ? null : _store.Resolve(resource.LanguageCodeId); return(BrightstarLiteralNode.Create(resource.Value, dataTypeResource == null ? null : _store.ResolvePrefixedUri(dataTypeResource.Value), langResource == null ? null : langResource.Value)); } var uri = _store.ResolvePrefixedUri(resource.Value); return(new BrightstarUriNode(new Uri(uri))); }