@Override public ABoxImpl copy(final KnowledgeBase kb) { return new ABoxImpl(kb, this, null, true); }
@Override public ABoxImpl copy(final ATermAppl extraIndividual, final boolean copyIndividuals) { return new ABoxImpl(_kb, this, extraIndividual, copyIndividuals); }
@Override public ABoxImpl copy(final KnowledgeBase kb) { return new ABoxImpl(kb, this, null, true); }
@Override public ABoxImpl copy(final ATermAppl extraIndividual, final boolean copyIndividuals) { return new ABoxImpl(_kb, this, extraIndividual, copyIndividuals); }
@Override public void clearABox() { _aboxAssertions.clear(); _annotations.clear(); if (OpenlletOptions.USE_INCREMENTAL_DELETION) { _deletedAssertions.clear(); _syntacticAssertions.clear(); _dependencyIndex = new DependencyIndex(this); } _abox = new ABoxImpl(this, true); // copy abox & cache. _individuals.clear(); _changes = EnumSet.of(ChangeType.ABOX_DEL); prepare(); // even though we don't copy the _individuals over to the new KB // we should still create _individuals for the for (final ATermAppl nominal : getExpressivity().getNominals()) addIndividual(nominal); }
@Override public void clearABox() { _aboxAssertions.clear(); _annotations.clear(); if (OpenlletOptions.USE_INCREMENTAL_DELETION) { _deletedAssertions.clear(); _syntacticAssertions.clear(); _dependencyIndex = new DependencyIndex(this); } _abox = new ABoxImpl(this, true); // copy abox & cache. _individuals.clear(); _changes = EnumSet.of(ChangeType.ABOX_DEL); prepare(); // even though we don't copy the _individuals over to the new KB // we should still create _individuals for the for (final ATermAppl nominal : getExpressivity().getNominals()) addIndividual(nominal); }
@Override public void clear() { if (_abox == null) _abox = new ABoxImpl(this); else { final boolean doExplanation = _abox.doExplanation(); final boolean keepLastCompletion = _abox.isKeepLastCompletion(); _abox = new ABoxImpl(this); _abox.setDoExplanation(doExplanation); _abox.setKeepLastCompletion(keepLastCompletion); } _tbox = TBoxFactory.createTBox(this); _rbox = new RBoxImpl(); _rules.clear(); // All operations are atomic (and we must allow null normalized rules). _expChecker = new ExpressivityChecker(this); _individuals.clear(); _aboxAssertions.clear(); _instances.clear(); _builder = Optional.empty(); _state.clear(); _changes = EnumSet.of(ChangeType.ABOX_ADD, ChangeType.TBOX_ADD, ChangeType.RBOX_ADD); }
@Override public void clear() { if (_abox == null) _abox = new ABoxImpl(this); else { final boolean doExplanation = _abox.doExplanation(); final boolean keepLastCompletion = _abox.isKeepLastCompletion(); _abox = new ABoxImpl(this); _abox.setDoExplanation(doExplanation); _abox.setKeepLastCompletion(keepLastCompletion); } _tbox = TBoxFactory.createTBox(this); _rbox = new RBoxImpl(); _rules.clear(); // All operations are atomic (and we must allow null normalized rules). _expChecker = new ExpressivityChecker(this); _individuals.clear(); _aboxAssertions.clear(); _instances.clear(); _builder = Optional.empty(); _state.clear(); _changes = EnumSet.of(ChangeType.ABOX_ADD, ChangeType.TBOX_ADD, ChangeType.RBOX_ADD); }
@Before public void reset() { reasoner = new DatatypeReasonerImpl(); abox = new ABoxImpl(null); }
_abox = new ABoxImpl(this);
_abox = new ABoxImpl(this);
@Test public void numericLiteralComparison() { final KnowledgeBase kb = new KnowledgeBaseImpl(); ABox abox = new ABoxImpl( kb ); Literal byteLiteral = abox.addLiteral( TermFactory.literal( (byte) 0 ) ); Literal shortLiteral = abox.addLiteral( TermFactory.literal( (short ) 200) ); Assert.assertTrue( "numeric literals should be different", byteLiteral.isDifferent( shortLiteral ) ); }