@Test public void testDoTranslationNoMappingExactObjectOnlyOneContext() throws RepositoryException, MalformedQueryException, UpdateExecutionException { testRepositoryConnection.add(testInputSubjectUri1, testInputPredicateUri1, testInputObjectUri1, testContext1); Assert.assertEquals(1, testRepositoryConnection.size()); Assert.assertEquals(1, testRepositoryConnection.size(testContext1)); try (CloseableIteration<Statement, RepositoryException> iter = testRepositoryConnection.getStatements(null, null, null, false, testContext1)) { while (iter.hasNext()) { logger.info("nextBeforeStatement: " + iter.next().toString()); } } URITranslator.doTranslation( testRepository, testInputObjectUri1.stringValue(), testOutputObjectUri1.stringValue(), testSubjectMappingPredicatesEmpty, true, true, testPredicateMappingPredicatesEmpty, true, true, testObjectMappingPredicatesEmpty, true, true, testDeleteTranslatedTriplesTrue, testContext1); try (CloseableIteration<Statement, RepositoryException> iter = testRepositoryConnection.getStatements(null, null, null, false, testContext1)) { while (iter.hasNext()) { logger.info("nextAfterStatement: " + iter.next().toString()); } } Assert.assertEquals(1, testRepositoryConnection.size(testContext1)); Assert.assertEquals(1, testRepositoryConnection.size()); Assert.assertTrue(testRepositoryConnection.hasStatement( testInputSubjectUri1, testInputPredicateUri1, testOutputObjectUri1, false, testContext1)); }
public static void doTranslation(Repository repository, final String inputUriPrefix, final String outputUriPrefix, Resource... contexts) throws RepositoryException, MalformedQueryException, UpdateExecutionException { Collection<IRI> subjectMappingPredicates = Collections.emptyList(); Collection<IRI> predicateMappingPredicates = Collections.emptyList(); Collection<IRI> objectMappingPredicates = Collections.emptyList(); doTranslation(repository, inputUriPrefix, outputUriPrefix, subjectMappingPredicates, predicateMappingPredicates, objectMappingPredicates, true, contexts); }
URITranslator { public static void doTranslation(Repository repository, final String inputUriPrefix, final String outputUriPrefix, Resource... contexts) throws RepositoryException, MalformedQueryException, UpdateExecutionException { Collection<IRI> subjectMappingPredicates = Collections.emptyList(); Collection<IRI> predicateMappingPredicates = Collections.emptyList(); Collection<IRI> objectMappingPredicates = Collections.emptyList(); doTranslation(repository, inputUriPrefix, outputUriPrefix, subjectMappingPredicates, predicateMappingPredicates, objectMappingPredicates, true, contexts); } }
URITranslator { public static void doTranslation(Repository repository, final String inputUriPrefix, final String outputUriPrefix, Resource... contexts) throws RepositoryException, MalformedQueryException, UpdateExecutionException { Collection<IRI> subjectMappingPredicates = Collections.emptyList(); Collection<IRI> predicateMappingPredicates = Collections.emptyList(); Collection<IRI> objectMappingPredicates = Collections.emptyList(); doTranslation(repository, inputUriPrefix, outputUriPrefix, subjectMappingPredicates, predicateMappingPredicates, objectMappingPredicates, true, contexts); } private  URITranslator(); }
URITranslator { public static void doTranslation(Repository repository, final String inputUriPrefix, final String outputUriPrefix, Resource... contexts) throws RepositoryException, MalformedQueryException, UpdateExecutionException { Collection<IRI> subjectMappingPredicates = Collections.emptyList(); Collection<IRI> predicateMappingPredicates = Collections.emptyList(); Collection<IRI> objectMappingPredicates = Collections.emptyList(); doTranslation(repository, inputUriPrefix, outputUriPrefix, subjectMappingPredicates, predicateMappingPredicates, objectMappingPredicates, true, contexts); } private  URITranslator(); static void doTranslation(Repository repository, final String inputUriPrefix, final String outputUriPrefix,
                                     Resource... contexts); static void doTranslation(Repository repository, final String inputUriPrefix, final String outputUriPrefix,
                                     final Collection<IRI> nextSubjectMappingPredicates,
                                     final Collection<IRI> nextPredicateMappingPredicates,
                                     final Collection<IRI> nextObjectMappingPredicates,
                                     boolean deleteTranslatedTriples, Resource... contexts); static void doTranslation(Repository repository, final String inputUriPrefix, final String outputUriPrefix,
                                     final Collection<IRI> nextSubjectMappingPredicates, boolean translateSubjectUris,
                                     boolean exactSubjectMatchRequired,
                                     final Collection<IRI> nextPredicateMappingPredicates,
                                     boolean translatePredicateUris,
                                     boolean exactPredicateMatchRequired,
                                     final Collection<IRI> nextObjectMappingPredicates,
                                     boolean translateObjectUris,
                                     boolean exactObjectMatchRequired, boolean deleteTranslatedTriples,
                                     Resource... contexts); }
URITranslator { public static void doTranslation(Repository repository, final String inputUriPrefix, final String outputUriPrefix, Resource... contexts) throws RepositoryException, MalformedQueryException, UpdateExecutionException { Collection<IRI> subjectMappingPredicates = Collections.emptyList(); Collection<IRI> predicateMappingPredicates = Collections.emptyList(); Collection<IRI> objectMappingPredicates = Collections.emptyList(); doTranslation(repository, inputUriPrefix, outputUriPrefix, subjectMappingPredicates, predicateMappingPredicates, objectMappingPredicates, true, contexts); } private  URITranslator(); static void doTranslation(Repository repository, final String inputUriPrefix, final String outputUriPrefix,
                                     Resource... contexts); static void doTranslation(Repository repository, final String inputUriPrefix, final String outputUriPrefix,
                                     final Collection<IRI> nextSubjectMappingPredicates,
                                     final Collection<IRI> nextPredicateMappingPredicates,
                                     final Collection<IRI> nextObjectMappingPredicates,
                                     boolean deleteTranslatedTriples, Resource... contexts); static void doTranslation(Repository repository, final String inputUriPrefix, final String outputUriPrefix,
                                     final Collection<IRI> nextSubjectMappingPredicates, boolean translateSubjectUris,
                                     boolean exactSubjectMatchRequired,
                                     final Collection<IRI> nextPredicateMappingPredicates,
                                     boolean translatePredicateUris,
                                     boolean exactPredicateMatchRequired,
                                     final Collection<IRI> nextObjectMappingPredicates,
                                     boolean translateObjectUris,
                                     boolean exactObjectMatchRequired, boolean deleteTranslatedTriples,
                                     Resource... contexts);  }