public static boolean sameLiteral ( Literal l1 , String l2 , URI type , String lang ) { if ( l1 . getLexicalForm ( ) . equals ( l2 ) && eq ( l1 . getLanguage ( ) , lang ) ) { if ( l1 . getDatatypeURI ( ) == null ) { return type == null ; } else { return type != null && type . equals ( l1 . getDatatypeURI ( ) ) ; } } else { return false ; } }
Tells whether the given literals are equivalent with one given as a set of simple values .