Create index.java

we build different indexes for different patterns and we hold carnality of each triple pattern + number of fresh results. output index is in the form of 
triplepattern1 x,y
triplepattern2 z,t
in which y,t are total carnality of triple patterns and x,z are fresh members