Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@ public abstract class IRIResolver
printSetting(iriFactoryInst);
}

// Accept any scheme.
setErrorWarning(iriFactoryInst, ViolationCodes.UNREGISTERED_IANA_SCHEME, false, false);

// These are a warning from jena-iri motivated by problems in RDF/XML and also internal processing by IRI
// (IRI.relativize).
// The IRI is valid and does correct resolve when relative.
setErrorWarning(iriFactoryInst, ViolationCodes.NON_INITIAL_DOT_SEGMENT, false, false);

// Turn off?? (ignored in CheckerIRI.iriViolations anyway).
// setErrorWarning(iriFactory, ViolationCodes.LOWERCASE_PREFERRED, false, false);
Expand Down Expand Up @@ -105,6 +111,7 @@ private static void setErrorWarning(IRIFactory factory, int code, boolean isErro
private static void printSetting(IRIFactory factory) {
PrintStream ps = System.out;
printErrorWarning(ps, factory, ViolationCodes.UNREGISTERED_IANA_SCHEME);
printErrorWarning(ps, factory, ViolationCodes.NON_INITIAL_DOT_SEGMENT);
printErrorWarning(ps, factory, ViolationCodes.NOT_NFC);
printErrorWarning(ps, factory, ViolationCodes.NOT_NFKC);
printErrorWarning(ps, factory, ViolationCodes.UNWISE_CHARACTER);
Expand Down
27 changes: 13 additions & 14 deletions jena-arq/src/test/java/org/apache/jena/riot/lang/TestIRI.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.apache.jena.riot.ErrorHandlerTestLib ;
import org.apache.jena.riot.ErrorHandlerTestLib.ExWarning ;
import org.apache.jena.riot.checker.CheckerIRI ;
import org.apache.jena.riot.system.Checker ;
import org.apache.jena.riot.system.ErrorHandler ;
import org.apache.jena.riot.system.IRIResolver ;
import org.apache.jena.riot.system.RiotLib ;
Expand All @@ -34,39 +33,39 @@
public class TestIRI extends BaseTest
{
static protected final ErrorHandler handler = new ErrorHandlerTestLib.ErrorHandlerEx() ;
static protected final Checker checker = new Checker(new ErrorHandlerTestLib.ErrorHandlerEx()) ;


static IRIFactory factory = IRIResolver.iriFactory();

@Test public void iri1() { testIRI("http://example/") ; }


// JENA-1713: Not a warning
@Test
public void iri2() { testIRI("http://example/.") ; }

@Test(expected=ErrorHandlerTestLib.ExError.class)
// No relative IRIs
public void iri2() { testIRI("example") ; }
public void iriErr1() { testIRI("example") ; }

@Test(expected=ExWarning.class)
public void iriErr1()
public void iriWarn1()
{ testIRI("http:") ; }

@Test(expected=ExWarning.class)
public void iriErr2() { testIRI("http:///::") ; }
public void iriWarn2() { testIRI("http:///::") ; }

@Test(expected=ExWarning.class)
public void iriErr3() { testIRI("http://example/.") ; }

private void testIRI(String uriStr)
{
IRI iri = factory.create(uriStr) ;
CheckerIRI.iriViolations(iri, handler) ;
}

@Test public void bNodeIRI_1()
{
Node n = RiotLib.createIRIorBNode("_:abc") ;
assertTrue(n.isBlank()) ;
assertEquals("abc", n.getBlankNodeLabel()) ;
}

@Test public void bNodeIRI_2()
{
Node n = RiotLib.createIRIorBNode("abc") ;
Expand Down
3 changes: 3 additions & 0 deletions jena-iri/NotesAFS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ PattenCompiler: remove entry using IP_V4_HAS_FOUR_COMPONENTS in for ipV4Address[

=== JFlex

See src-dev to project.
Add JFlex.jar: /home/afs/sys/jflex-1.4.3/lib/JFlex.jar

Build:
See dev.buildlexer.MainGenerateLexers which does step 1-3

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.