As the line you are trying to compare to does not exact match
rdf:type sswap:Subject, d:investment; //trying to capture this..
vs
[ a sswap:Subject , d:investment ;
then either use contains
http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#contains(java.lang.CharSequence)
or
indexOf
http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#indexOf(java.lang.String)