FrontierImpl implements Frontier { @Override public void addNewUri(CrawleableUri uri) { uri = normalizer.normalize(uri); addNormalizedUri(uri); try { for (UriGenerator u : uriGenerator) { if (u.getUriVariant(uri) != null) addNormalizedUri(normalizer.normalize(u.getUriVariant(uri))); } } catch (Exception e) { LOGGER.info( "Exception happened while generating additional URI variant for URI: " + uri.getUri().toString()); } } FrontierImpl(UriNormalizer normalizer, UriFilterComposer relationalUriFilter, UriQueue queue,
			List<UriGenerator> uriGenerators, GraphLogger graphLogger, boolean doesRecrawling, long generalRecrawlTime,
			long timerPeriod);  FrontierImpl(UriNormalizer normalizer, UriFilterComposer relationalUriFilter, UriQueue queue,
			List<UriGenerator> uriGenerators, boolean doesRecrawling, long generalRecrawlTime, long timerPeriod);  FrontierImpl(UriNormalizer normalizer, UriFilterComposer relationalUriFilter, URIReferences uriReferences,
			UriQueue queue, List<UriGenerator> uriGenerators,boolean doesRecrawling, OutDatedUriRetriever outDatedUriRetriever);  FrontierImpl(UriNormalizer normalizer, UriFilterComposer relationalUriFilter, UriQueue queue,
			List<UriGenerator> uriGenerators, boolean doesRecrawling);  FrontierImpl(UriNormalizer normalizer, UriFilterComposer relationalUriFilter, UriQueue queue,
			List<UriGenerator> uriGenerators);  FrontierImpl(UriNormalizer normalizer, UriFilterComposer relationalUriFilter, URIReferences uriReferences,
			UriQueue queue, List<UriGenerator> uriGenerators, GraphLogger graphLogger, boolean doesRecrawling,
			long generalRecrawlTime, long timerPeriod,OutDatedUriRetriever outDatedUriRetriever); @Override List<CrawleableUri> getNextUris(); @Override void addNewUris(List<CrawleableUri> uris); @Override void addNewUri(CrawleableUri uri); @Override void crawlingDone(List<CrawleableUri> uris); @Override int getNumberOfPendingUris(); @Override boolean doesRecrawling(); @Override void close(); static long getGeneralRecrawlTime(); UriQueue getQueue(); static final long DEFAULT_GENERAL_RECRAWL_TIME; }
@Test public void addNewUri() throws Exception { CrawleableUri uri_1 = cuf.create(new URI("http: frontier.addNewUri(uri_1); List<CrawleableUri> nextUris = frontier.getNextUris(); List<CrawleableUri> assertion = new ArrayList<>(); assertion.add(cuf.create(new URI("http: InetAddress.getByName("194.109.129.58"), UriType.DEREFERENCEABLE)); assertEquals(assertion, nextUris); }