/** * Creates a new prefix map. * <p> * Will use whatever the version of ARQ you are using considers the default * implementation, this may change from release to release. * </p> * * @return Prefix Map */ public static PrefixMap create() { return new PrefixMapStd(); }
/** * Creates a new prefix map which is intended for use in input. * * @return Prefix map */ public static PrefixMap createForInput() { return new PrefixMapStd(); }
/** * Creates a new prefix map which is intended for use in input. * * @return Prefix map */ public static PrefixMap createForInput() { return new PrefixMapStd(); }
/** * Creates a new prefix map. * <p> * Will use whatever the version of ARQ you are using considers the default * implementation, this may change from release to release. * </p> * * @return Prefix Map */ public static PrefixMap create() { return new PrefixMapStd(); }
/** * Creates a new prefix map which is intended for use in input which starts * with a copy of an existing map * <p> * Will use whatever the version of ARQ you are using considers the best * implementation for input, this may change from release to release. * </p> * * @param pmap * Prefix Map to copy * @return Prefix Map */ public static PrefixMap createForInput(PrefixMap pmap) { return new PrefixMapStd(pmap); }
/** * Creates a new prefix map which starts with a copy of an existing prefix * map. * <p> * Will use whatever the version of ARQ you are using considers the default * implementation, this may change from release to release. * </p> * * @param pmap * Prefix Map to copy * * @return Prefix Map */ public static PrefixMap create(PrefixMap pmap) { return new PrefixMapStd(pmap); }
/** * Creates a new prefix map which is intended for use in input which starts * with a copy of an existing map * <p> * Will use whatever the version of ARQ you are using considers the best * implementation for input, this may change from release to release. * </p> * * @param pmap * Prefix Map to copy * @return Prefix Map */ public static PrefixMap createForInput(PrefixMap pmap) { return new PrefixMapStd(pmap); }
/** * Creates a new prefix map which starts with a copy of an existing prefix * map. * <p> * Will use whatever the version of ARQ you are using considers the default * implementation, this may change from release to release. * </p> * * @param pmap * Prefix Map to copy * * @return Prefix Map */ public static PrefixMap create(PrefixMap pmap) { return new PrefixMapStd(pmap); }
@Override protected PrefixMap getPrefixMap() { return new PrefixMapStd(); } }
@Override protected PrefixMap getPrefixMap() { return new PrefixMapWrapper(new PrefixMapStd()); } }
@Override protected PrefixMap getPrefixMap() { return new PrefixMapExtended(new PrefixMapStd()); }
/** * Expect {@link FastAbbreviatingPrefixMap} to significantly outperform * {@link PrefixMapStd} once there are a good number of namespaces */ @Test public void prefixMap_abbrev_performance_03() { PrefixMapStd pmap = new PrefixMapStd(); populate(pmap, 40); FastAbbreviatingPrefixMap fmap = new FastAbbreviatingPrefixMap(); populate(fmap, 40); test_amalgamated_performance(pmap, fmap, 40, true); }
/** * Expect {@link PrefixMapStd} to outperform {@link FastAbbreviatingPrefixMap} when there * is a single namespace */ @Test public void prefixMap_abbrev_performance_01() { PrefixMapStd pmap = new PrefixMapStd(); populate(pmap, 1); FastAbbreviatingPrefixMap fmap = new FastAbbreviatingPrefixMap(); populate(fmap, 1); test_amalgamated_performance(pmap, fmap, 1, false); }
/** * Expect {@link FastAbbreviatingPrefixMap} to significantly outperform * {@link PrefixMapStd} once there are a good number of namespaces */ @Test public void prefixMap_abbrev_performance_04() { PrefixMapStd pmap = new PrefixMapStd(); populate(pmap, 100); FastAbbreviatingPrefixMap fmap = new FastAbbreviatingPrefixMap(); populate(fmap, 100); test_amalgamated_performance(pmap, fmap, 100, true); } }
@BeforeClass static public void beforeClass() { // Warm the JIT. int N = 1000 ; PrefixMapStd normal = new PrefixMapStd(); populate(normal, N); FastAbbreviatingPrefixMap fast = new FastAbbreviatingPrefixMap(); populate(fast, N); for (int i = 1; i <= N ; i++) { String input = "http://example/ns" + i + "#x"; String expected = "ns" + i + ":x"; run(normal, input, expected, 1000); run(fast, input, expected, 1000); } }