RDFa Parsing for Website (using Semargl API)

1. Create Maven Project

2.Add Semargl dependencies (Refer to Semargl website for details)


3.Test for your website. (Change "http://localhost:8888/WiseWord/index.php" to your URL)

1:  public class Tester {  
2:    public static void main (String[] args) throws ParseException{  
3:    CharOutputSink outputSink = new CharOutputSink();  
4:    StreamProcessor sp = new StreamProcessor(  
5:    RdfaParser.connect(TurtleSerializer.connect(outputSink)));  
6:    outputSink.connect(System.out);  
7:    sp.process("http://localhost:8888/WiseWord/index.php");  
8:    }  
9:  }  

No comments:

Post a Comment