public Model add(Statement[] sarr) { foreach (Statement stmt in sarr) { this._g.Assert(JenaConverter.FromJena(stmt, this._mapping)); } return(this); }
public Model add(Model m) { Graph h = new Graph(); JenaConverter.FromJena(m, h); this._g.Merge(h); return(this); }
public Model add(StmtIterator si) { while (si.hasNext()) { Statement stmt = si.nextStatement(); this._g.Assert(JenaConverter.FromJena(stmt, this._mapping)); } return(this); }
public Model add(Model m, bool b) { Graph h = new Graph(); JenaConverter.FromJena(m, h); if (b) { //TODO: Suppress reification triples } this._g.Merge(h); return(this); }
private IEnumerable <Triple> GetTriples(Resource r, Property p, RDFNode rdfn) { if (r == null) { if (p == null) { //Object specified return(this._g.GetTriplesWithObject(JenaConverter.FromJenaNode(rdfn, this._mapping))); } else if (rdfn == null) { //Predicate specified return(this._g.GetTriplesWithPredicate(JenaConverter.FromJenaProperty(p, this._mapping))); } else { //Object and Predicate specified return(this._g.GetTriplesWithPredicateObject(JenaConverter.FromJenaProperty(p, this._mapping), JenaConverter.FromJenaNode(rdfn, this._mapping))); } } else if (p == null) { if (rdfn == null) { //Subject specified return(this._g.GetTriplesWithSubject(JenaConverter.FromJenaResource(r, this._mapping))); } else { //Subject and Object specified return(this._g.GetTriplesWithSubjectObject(JenaConverter.FromJenaResource(r, this._mapping), JenaConverter.FromJenaNode(rdfn, this._mapping))); } } else if (rdfn == null) { //Subject and Predicate specified return(this._g.GetTriplesWithSubjectPredicate(JenaConverter.FromJenaResource(r, this._mapping), JenaConverter.FromJenaProperty(p, this._mapping))); } else { Triple t = new Triple(JenaConverter.FromJenaResource(r, this._mapping), JenaConverter.FromJenaProperty(p, this._mapping), JenaConverter.FromJenaNode(rdfn, this._mapping)); if (this._g.ContainsTriple(t)) { return(t.AsEnumerable()); } else { return(Enumerable.Empty <Triple>()); } } }
public Model add(List l) { ListIterator iter = l.listIterator(); while (iter.hasNext()) { Object obj = iter.next(); if (obj is Statement) { this._g.Assert(JenaConverter.FromJena((Statement)obj, this._mapping)); } } return(this); }
protected override void Delete(Triple t) { this._m.remove(JenaConverter.ToJena(t, this._mapping)); }
public override bool Contains(Triple t) { return(this._m.contains(JenaConverter.ToJena(t, this._mapping))); }
protected override void Add(Triple t) { this._m.add(JenaConverter.ToJena(t, this._mapping)); }
public bool contains(Resource r, Property p) { return(this._g.GetTriplesWithSubjectPredicate(JenaConverter.FromJenaResource(r, this._mapping), JenaConverter.FromJenaProperty(p, this._mapping)).Any()); }
public bool contains(Statement s) { return(this._g.ContainsTriple(JenaConverter.FromJena(s, this._mapping))); }
public Model add(Statement s) { this._g.Assert(JenaConverter.FromJena(s, this._mapping)); return(this); }