private IEnumerable <Triple> GetFilteredResourceStatements(string storeId, string resourceUri) { if (DataSetGraphUris == null) { return(_serverCore.GetResourceStatements(storeId, resourceUri)); } return(_serverCore.GetResourceStatements(storeId, resourceUri) .Where(t => DataSetGraphUris.Contains(t.Graph) || (_optimisticLockingEnabled && t.Predicate.Equals(Constants.VersionPredicateUri) && t.Graph.Equals(VersionGraphUri)))); }
public override IDataObject GetDataObject(string identity) { if (identity == null) { throw new ArgumentNullException("identity"); } var resolvedIdentity = ResolveIdentity(identity); DataObject registeredDataObject = RegisterDataObject(new DataObject(this, resolvedIdentity)); if (!registeredDataObject.IsLoaded) { IEnumerable <Triple> triples = _serverCore.GetResourceStatements(_storeName, resolvedIdentity).Union( AddTriples.Where(p => p.Subject.Equals(resolvedIdentity))); registeredDataObject.BindTriples(triples); } return(registeredDataObject); }