27 lines
905 B
Java
27 lines
905 B
Java
package org.gcube.social_networking.socialutillibrary;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
public class TestUnit {
|
|
|
|
//@Test
|
|
public void testHashtag() {
|
|
String text = "Dear members, The item 'ADSDTest4CWP' has been just published by Leonardo Candela. " +
|
|
"You can find it here: http://data.d4science.org/ctlg/CWP_Secretariat/adsdtest4cwp " +
|
|
"#Area #Geospatial #Periodicity-When_updates_are_available ";
|
|
List<String> hashtags = Utils.getHashTags(text);
|
|
System.out.println("Hashtags are " + hashtags);
|
|
}
|
|
|
|
//@Test
|
|
public void extractUrl(){
|
|
|
|
String url = "https://virtuoso.parthenos.d4science.org/sparql?default-graph-uri=&query=%09SELECT+%3Fp+%28COUNT%28%3Fp%29+as+%3FpCount%29++%0D%0A%09%09%09%09%09WHERE+%7B%5B%5D+%3Fp+%5B%5D%7D%0D%0A%09%09%09%09%09GROUP+BY+%3Fp&format=text%2Fhtml&timeout=0&debug=on";
|
|
String result = Utils.extractURL(url);
|
|
System.out.println("urls are " + result);
|
|
}
|
|
|
|
|
|
}
|