public static synchronized DefaultConjunctiveQueryFactory instance() { if (instance == null) instance = new DefaultConjunctiveQueryFactory(); return instance; }
public static synchronized DefaultPredicateFactory instance() { if (instance == null) instance = new DefaultPredicateFactory(); return instance; }
@Override public Atom createEquality(Term t1, Term t2) { return this.create(Predicate.EQUALITY, t1, t2); }
public IrisDtgWriter(Writer out) { super(out, DefaultAtomFactory.instance()); }
public Substitution getAssociatedSubstitution() { if (associatedSubstitution == null) { associatedSubstitution = TermPartitionUtils.getAssociatedSubstitution(partition, query); } return DefaultSubstitutionFactory.instance().createSubstitution(associatedSubstitution); }
@Override public InMemoryAtomSet create(InMemoryAtomSet src) { try { return create((AtomSet) src); } catch (IteratorException e) { throw new Error("Should never happen"); } }
@Override public Store create(InMemoryAtomSet src) { try { return create((AtomSet) src); } catch (IteratorException e) { throw new Error("Should never happen"); } }
@Override public Substitution aggregate(Substitution s) { Substitution newSub = DefaultSubstitutionFactory.instance().createSubstitution(this); for (Variable term : s.getTerms()) { if (!newSub.aggregate(term, s.createImageOf(term))) { return null; } } return newSub; }
@Override public InMemoryAtomSet create(Atom... atoms) { InMemoryAtomSet atomset = this.create(); for (Atom a : atoms) { atomset.add(a); } return atomset; }
@Override public Store create(Atom atom) { DefaultInMemoryGraphStore atomset = this.create(); atomset.add(atom); return atomset; } }
public static Substitution aggregate(Substitution s1, Substitution s2) { Substitution newSub = DefaultSubstitutionFactory.instance().createSubstitution(s1); for (Variable term : s2.getTerms()) { if (!newSub.aggregate(term, s2.createImageOf(term))) { return null; } } return newSub; }
@Override public Substitution compose(Substitution s) { Substitution newSub = DefaultSubstitutionFactory.instance().createSubstitution(this); for (Variable term : s.getTerms()) { if (!newSub.compose(term, s.createImageOf(term))) { return null; } } return newSub; }