/** * Create a negated term. * * @param c Term to be negated * @return an ATermAppl in the form not(c) */ public static ATermAppl not(ATermAppl c) { return ATermUtils.makeNot( c ); }
/** * Create a negated term. * * @param c Term to be negated * @return an ATermAppl in the form not(c) */ public static ATermAppl not(ATermAppl c) { return ATermUtils.makeNot( c ); }
public void removeDatatype( String name ) { Datatype dt = getDatatype( name ); // clean up the cached results uriToDatatype.remove( name ); datatypeToURI.remove( dt ); normalized.remove( dt ); ATermAppl term = ATermUtils.makeTermAppl( name ); termToDatatype.remove( term ); ATermAppl not = ATermUtils.makeNot( term ); termToDatatype.remove( not ); }
private static void addDisjointAxiom(ATermAppl c1, ATermAppl c2, List<ATermAppl> axioms) { ATermAppl notC2 = ATermUtils.makeNot( c2 ); axioms.add( ATermUtils.makeSub( c1, notC2 ) ); if( ATermUtils.isPrimitive( c2 ) ) { ATermAppl notC1 = ATermUtils.makeNot( c1 ); axioms.add( ATermUtils.makeSub( c2, notC1 ) ); } }
public void addComplementClass(ATermAppl c1, ATermAppl c2) { changes.add( ChangeType.TBOX_ADD ); ATermAppl notC2 = ATermUtils.makeNot( c2 ); if( c1.equals( notC2 ) ) return; tbox.addAxiom( ATermUtils.makeEqClasses( c1, notC2 ) ); if( log.isLoggable( Level.FINER ) ) log.finer( "complement " + c1 + " " + c2 ); }
private static void addDisjointAxiom(ATermAppl c1, ATermAppl c2, List<ATermAppl> axioms) { ATermAppl notC2 = ATermUtils.makeNot( c2 ); axioms.add( ATermUtils.makeSub( c1, notC2 ) ); if( ATermUtils.isPrimitive( c2 ) ) { ATermAppl notC1 = ATermUtils.makeNot( c1 ); axioms.add( ATermUtils.makeSub( c2, notC1 ) ); } }
public void addComplementClass(ATermAppl c1, ATermAppl c2) { changes.add( ChangeType.TBOX_ADD ); ATermAppl notC2 = ATermUtils.makeNot( c2 ); if( c1.equals( notC2 ) ) return; tbox.addAxiom( ATermUtils.makeEqClasses( c1, notC2 ) ); if( log.isLoggable( Level.FINER ) ) log.finer( "complement " + c1 + " " + c2 ); }
final static public ATermAppl negate(ATermAppl a) { return isNot( a ) ? (ATermAppl) a.getArgument( 0 ) : makeNot( a ); }
public void visitNot(ATermAppl term) { ATermAppl a = (ATermAppl) term.getArgument( 0 ); this.visit( a ); if( change ) ret = ATermUtils.makeNot( ret ); else ret = term; }
public void visit(OWLObjectComplementOf not) { OWLClassExpression desc = not.getOperand(); desc.accept( this ); term = ATermUtils.makeNot( term ); }
@Override public void visit(OWLObjectComplementOf not) { OWLClassExpression desc = not.getOperand(); desc.accept( this ); term = ATermUtils.makeNot( term ); }
@Override public void visit(OWLDataComplementOf node) { node.getDataRange().accept( this ); term = ATermUtils.makeNot( term ); }
/** * Check if a datatype is subsumed by another datatype * * @param d1 * @param d2 * @return */ public boolean isSubTypeOf( ATermAppl d1, ATermAppl d2 ) { ATermAppl notD2 = ATermUtils.makeNot( d2 ); Datatype conjunction = intersection( new ATermAppl[] { d1, notD2 } ); return conjunction.isEmpty(); }
public void visitNot(ATermAppl term) { ATermAppl a = (ATermAppl) term.getArgument( 0 ); this.visit( a ); if( change ) ret = ATermUtils.makeNot( ret ); else ret = term; }
final static public ATermAppl negate(ATermAppl a) { return isNot( a ) ? (ATermAppl) a.getArgument( 0 ) : makeNot( a ); }
public void visit(OWLDataComplementOf node) { node.getDataRange().accept( this ); term = ATermUtils.makeNot( term ); }
public Set<ATermAppl> getComplements(ATermAppl c) { if( !isClass( c ) ) { handleUndefinedEntity( c + " is not a class!" ); return Collections.emptySet(); } ATermAppl notC = ATermUtils.normalize( ATermUtils.makeNot( c ) ); Set<ATermAppl> complements = getAllEquivalentClasses( notC ); if( notC.equals( ATermUtils.BOTTOM ) ) complements.add( ATermUtils.BOTTOM ); return complements; }
public Set<ATermAppl> getComplements(ATermAppl c) { if( !isClass( c ) ) { handleUndefinedEntity( c + " is not a class!" ); return Collections.emptySet(); } ATermAppl notC = ATermUtils.normalize( ATermUtils.makeNot( c ) ); Set<ATermAppl> complements = getAllEquivalentClasses( notC ); if( notC.equals( ATermUtils.BOTTOM ) ) complements.add( ATermUtils.BOTTOM ); return complements; }
static public ATermList negate(ATermList list) { if( list.isEmpty() ) { return list; } ATermAppl a = (ATermAppl) list.getFirst(); a = isNot( a ) ? (ATermAppl) a.getArgument( 0 ) : makeNot( a ); ATermList result = makeList( a, negate( list.getNext() ) ); return result; }
static public ATermList negate(ATermList list) { if( list.isEmpty() ) { return list; } ATermAppl a = (ATermAppl) list.getFirst(); a = isNot( a ) ? (ATermAppl) a.getArgument( 0 ) : makeNot( a ); ATermList result = makeList( a, negate( list.getNext() ) ); return result; }