/** * Load an HDT file into memory to use it. NOTE: Use this method to go through all elements. If you plan * to do queries, use loadIndexedHDT() instead. * @param hdtFileName * @param listener Listener to get notified of loading progress. Can be null if no notifications needed. * @return * @throws IOException */ public static HDT loadHDT(String hdtFileName, ProgressListener listener) throws IOException { return HDTManager.getInstance().doLoadHDT(hdtFileName, listener); }
/** * Load an HDT file from InputStream, and create additional indexes to support all kind of queries efficiently. * @param hdtFileName * @param listener Listener to get notified of loading progress. Can be null if no notifications needed. * @return * @throws IOException */ public static HDT loadIndexedHDT(InputStream hdtFileName, ProgressListener listener) throws IOException { return HDTManager.getInstance().doLoadIndexedHDT(hdtFileName, listener); }
/** * Maps an HDT File into virtual memory, and load/create additional indexes to support all kind of queries efficiently. * @param hdtFileName * @return * @throws IOException */ public static HDT mapIndexedHDT(String hdtFileName) throws IOException { return HDTManager.getInstance().doMapIndexedHDT(hdtFileName, null); }
/** * Create an HDT file from an RDF file. * @param iterator A provider of triples. Must implement hasNext(), next() and estimatedNumResults. * @param baseURI Base URI for the dataset. * @param hdtFormat Parameters to tune the generated HDT. * @param listener Listener to get notified of loading progress. Can be null if no notifications needed. * @return * @throws IOException */ public static HDT generateHDT(Iterator<TripleString> iterator, String baseURI, HDTOptions hdtFormat, ProgressListener listener) throws IOException, ParserException { return HDTManager.getInstance().doGenerateHDT(iterator, baseURI, hdtFormat, listener); }
/** * Map an HDT file into memory to use it. This method does not load the whole file into memory, * it lets the OS to handle memory pages as desired. Therefore it uses less memory but can be slower * for querying because it needs to load those blocks from disk. * NOTE: Use this method to go through all elements. If you plan to do queries, use mapIndexedHDT() instead. * @param hdtFileName * @return * @throws IOException */ public static HDT mapHDT(String hdtFileName) throws IOException { return HDTManager.getInstance().doMapHDT(hdtFileName, null); }
public static TripleWriter getHDTWriter(OutputStream out, String baseURI, HDTOptions hdtFormat) throws IOException { return HDTManager.getInstance().doGetHDTWriter(out, baseURI, hdtFormat); }
/** * Return an indexed HDT that is efficient for all kind of queries, given a not indexed HDT. * @param hdt * @param listener Listener to get notified of loading progress. Can be null if no notifications needed. * @return */ public static HDT indexedHDT(HDT hdt, ProgressListener listener) { return HDTManager.getInstance().doIndexedHDT(hdt, listener); }
public static HDTOptions readOptions(String file) throws IOException { return HDTManager.getInstance().doReadOptions(file); }
@Override protected int graphBaseSize() { return (int)hdt.getTriples().getNumberOfElements(); }
@Override public HDT doIndexedHDT(HDT hdt, ProgressListener listener) { ((HDTPrivate)hdt).loadOrCreateIndex(listener); return hdt; }
/** * Load an HDT file into memory to use it. NOTE: Use this method to go through all elements. If you plan * to do queries, use loadIndexedHDT() instead. * @param hdtFileName * @return * @throws IOException */ public static HDT loadHDT(String hdtFileName) throws IOException { return HDTManager.getInstance().doLoadHDT(hdtFileName, null); }
/** * Load an HDT File, and load/create additional indexes to support all kind of queries efficiently. * @param hdtFileName * @param listener Listener to get notified of loading progress. Can be null if no notifications needed. * @return * @throws IOException */ public static HDT loadIndexedHDT(String hdtFileName, ProgressListener listener) throws IOException { return HDTManager.getInstance().doLoadIndexedHDT(hdtFileName, listener); }
/** * Maps an HDT File into virtual memory, and load/create additional indexes to support all kind of queries efficiently. * @param hdtFileName * @param listener Listener to get notified of loading progress. Can be null if no notifications needed. * @return * @throws IOException */ public static HDT mapIndexedHDT(String hdtFileName, ProgressListener listener) throws IOException { return HDTManager.getInstance().doMapIndexedHDT(hdtFileName, listener); }
/** * Create an HDT file from an RDF file. * @param rdfFileName File name. * @param baseURI Base URI for the dataset. * @param rdfNotation Format of the source RDF File (NTriples, N3, RDF-XML...) * @param hdtFormat Parameters to tune the generated HDT. * @param listener Listener to get notified of loading progress. Can be null if no notifications needed. * @return * @throws IOException * @throws ParserException */ public static HDT generateHDT(String rdfFileName, String baseURI, RDFNotation rdfNotation, HDTOptions hdtFormat, ProgressListener listener) throws IOException, ParserException { return HDTManager.getInstance().doGenerateHDT(rdfFileName, baseURI, rdfNotation, hdtFormat, listener); }
/** * Map an HDT file into memory to use it. This method does not load the whole file into memory, * it lets the OS to handle memory pages as desired. Therefore it uses less memory but can be slower * for querying because it needs to load those blocks from disk. * NOTE: Use this method to go through all elements. If you plan to do queries, use mapIndexedHDT() instead. * @param hdtFileName * @param listener Listener to get notified of loading progress. Can be null if no notifications needed. * @return * @throws IOException */ public static HDT mapHDT(String hdtFileName, ProgressListener listener) throws IOException { return HDTManager.getInstance().doMapHDT(hdtFileName, listener); }
public static TripleWriter getHDTWriter(String outFile, String baseURI, HDTOptions hdtFormat) throws IOException { return HDTManager.getInstance().doGetHDTWriter(outFile, baseURI, hdtFormat); }
/** * Load an HDT from an InputStream (File, socket...). NOTE: Use this method to go through all elements. If you plan * to do queries, use loadIndexedHDT() instead. * @param hdtFile * @param listener Listener to get notified of loading progress. Can be null if no notifications needed. * @return * @throws IOException */ public static HDT loadHDT(InputStream hdtFile, ProgressListener listener) throws IOException { return HDTManager.getInstance().doLoadHDT(hdtFile, listener); }
/** * Load an HDT File, and load/create additional indexes to support all kind of queries efficiently. * @param hdtFileName * @return * @throws IOException */ public static HDT loadIndexedHDT(String hdtFileName) throws IOException { return HDTManager.getInstance().doLoadIndexedHDT(hdtFileName, null); }
/** * Load an HDT from an InputStream (File, socket...). NOTE: Use this method to go through all elements. If you plan * to do queries, use loadIndexedHDT() instead. * @param hdtFile * @return * @throws IOException */ public static HDT loadHDT(InputStream hdtFile) throws IOException { return HDTManager.getInstance().doLoadHDT(hdtFile, null); }
/** * Load an HDT file from InputStream, and create additional indexes to support all kind of queries efficiently. * @param hdtFileName * @return * @throws IOException */ public static HDT loadIndexedHDT(InputStream hdtFileName) throws IOException { return HDTManager.getInstance().doLoadIndexedHDT(hdtFileName, null); }