public boolean isEqual(LiteralLabel value1, LiteralLabel value2) {
        if (value1.getDatatype() instanceof XSDDouble && value2.getDatatype() instanceof XSDDouble) {
	    Double n1, n2;
	    n1 = null;
	    n2 = null;
	    Object v1 = value1.getLexicalForm();
	    Object v2 = value2.getLexicalForm();
	    boolean v1String = false;
	    boolean v2String = false;
	    try {
		n1 = new Double(Double.parseDouble(v1.toString()));
	    } catch (NumberFormatException ex) {
		v1String = true;
	    }
	    try {
		n2 = new Double(Double.parseDouble(v2.toString()));
	    } catch (NumberFormatException ex) {
		v2String = true;
	    }
	    if(v1String && v2String) {
		return v1.equals(v2);
	    }
	    else {
		if(v1String || v2String) {
		    return false;
		}
		else {
		    return n1.doubleValue() == n2.doubleValue();
		}
	    }
        } else {
            // At least one arg is not part of the integer hierarchy
            return false;
        }
     }