/** * Creates a new TempTriples (writable triples structure) * * @return TempTriples */ static public TempTriples createTempTriples(HDTOptions spec) { // String triplesImpl = spec.get("tempTriples.impl"); // Implementations available in the Core // if (triplesImpl==null || triplesImpl.equals("") || TEMP_TRIPLES_IMPL_LIST.equals(triplesImpl)) { return new TriplesList(spec); // } }
/** * Creates a new Triples based on a ControlInformation * * @param specification * The HDTOptions to read * @return Triples */ public static TriplesPrivate createTriples(ControlInfo ci) { String format = ci.getFormat(); if(HDTVocabulary.TRIPLES_TYPE_TRIPLESLIST.equals(format)) { return new TriplesList(new HDTSpecification()); } else if(HDTVocabulary.TRIPLES_TYPE_BITMAP.equals(format)) { return new BitmapTriples(); } else { throw new IllegalArgumentException("No implementation for Triples type: "+format); } }
/** * Creates a new Triples based on an HDTOptions * * @param specification * The HDTOptions to read * @return Triples */ static public TriplesPrivate createTriples(HDTOptions spec) { String type = spec.get("triples.format"); if(type==null) { return new BitmapTriples(spec); } else if(HDTVocabulary.TRIPLES_TYPE_TRIPLESLIST.equals(type)) { return new TriplesList(spec); } else if(HDTVocabulary.TRIPLES_TYPE_BITMAP.equals(type)) { return new BitmapTriples(spec); } else { return new BitmapTriples(spec); } }