Exemplo n.º 1
0
 /**
  * A lax comparer of RDF triples which doesn't compare
  * blank node labels
  *
  * @param a
  * @param b
  *
  */
 private static bool laxEqual(RDFTriple a, RDFTriple b)
 {
     if (a == null)
     {
         return(b == null);
     }
     if (a.Equals(b))
     {
         return(true);
     }
     if (a.getSubject().getKind() != b.getSubject().getKind())
     {
         return(false);
     }
     if (a.getObject().getKind() != b.getObject().getKind())
     {
         return(false);
     }
     if (!a.getPredicate().Equals(b.getPredicate()))
     {
         return(false);
     }
     if (a.getSubject().getKind() != RDFTerm.BLANK)
     {
         if (!a.getSubject().Equals(b.getSubject()))
         {
             return(false);
         }
     }
     if (a.getObject().getKind() != RDFTerm.BLANK)
     {
         if (!a.getObject().Equals(b.getObject()))
         {
             return(false);
         }
     }
     return(true);
 }
Exemplo n.º 2
0
 /**
    * A lax comparer of RDF triples which doesn't compare
    * blank node labels
    *
    * @param a
    * @param b
    *
    */
 private static bool laxEqual(RDFTriple a, RDFTriple b)
 {
     if(a==null)return (b==null);
     if(a.Equals(b))return true;
     if(a.getSubject().getKind()!=b.getSubject().getKind())
       return false;
     if(a.getObject().getKind()!=b.getObject().getKind())
       return false;
     if(!a.getPredicate().Equals(b.getPredicate()))
       return false;
     if(a.getSubject().getKind()!=RDFTerm.BLANK){
       if(!a.getSubject().Equals(b.getSubject()))
     return false;
     }
     if(a.getObject().getKind()!=RDFTerm.BLANK){
       if(!a.getObject().Equals(b.getObject()))
     return false;
     }
     return true;
 }