From fc0fe86b5ae9ab7b53885c81f00fe55f90421bbb Mon Sep 17 00:00:00 2001
From: ajs6f
Date: Thu, 7 May 2015 19:43:31 -0400
Subject: [PATCH 1/7] Removing code that is demonstrably impossible to execute,
based on the calculations of Eclipse and javac.
---
.../src/main/java/arq/cmd/CmdLineArgs.java | 5 -
.../apache/jena/atlas/event/EventManager.java | 3 -
.../apache/jena/atlas/json/io/JSWriter.java | 17 -
.../atlas/json/io/parser/TokenizerJSON.java | 128 +-
.../org/apache/jena/atlas/web/AcceptList.java | 5 -
.../jena/query/ParameterizedSparqlString.java | 33 -
.../jena/query/QueryExecutionFactory.java | 10 -
.../riot/adapters/AdapterFileManager.java | 5 -
.../apache/jena/riot/checker/CheckerIRI.java | 36 +-
.../apache/jena/riot/lang/JsonLDReader.java | 9 -
.../jena/riot/other/BatchedStreamRDF.java | 7 -
.../apache/jena/riot/out/TurtleValidate.java | 18 +-
.../process/normalize/NormalizeValue.java | 23 +-
.../riot/system/IteratorStreamRDFText.java | 2 -
.../jena/riot/system/ParserProfileBase.java | 6 -
.../org/apache/jena/riot/system/RiotLib.java | 4 +-
.../riot/thrift/StreamRowTRDFPrinter.java | 4 -
.../org/apache/jena/riot/thrift/TRDF.java | 9 +-
.../apache/jena/riot/writer/TurtleShell.java | 65 +-
.../riot/writer/WriterDatasetRIOTBase.java | 6 -
.../riot/writer/WriterStreamRDFBatched.java | 6 -
.../jena/sparql/algebra/AlgebraGenerator.java | 3 -
.../apache/jena/sparql/algebra/OpAsQuery.java | 15 -
.../algebra/PropertyFunctionGenerator.java | 30 -
.../jena/sparql/algebra/Transformer.java | 42 +-
.../apache/jena/sparql/algebra/op/OpExt.java | 21 +-
.../sparql/algebra/optimize/Optimize.java | 12 -
.../optimize/TransformFilterPlacement.java | 35 -
.../jena/sparql/core/DatasetGraphFactory.java | 13 -
.../sparql/core/DatasetGraphSimpleMem.java | 6 -
.../sparql/core/assembler/AssemblerUtils.java | 5 -
.../sparql/engine/http/QueryEngineHTTP.java | 14 -
.../engine/iterator/QueryIterAssign.java | 8 -
.../engine/iterator/QueryIterSingleton.java | 5 -
.../engine/iterator/QueryIteratorBase.java | 18 -
.../jena/sparql/engine/main/OpExecutor.java | 35 -
.../jena/sparql/engine/main/VarFinder.java | 8 -
.../org/apache/jena/sparql/expr/ExprList.java | 6 -
.../jena/sparql/expr/nodevalue/XSDFuncOp.java | 8 -
.../apache/jena/sparql/graph/GraphSPARQL.java | 8 -
.../jena/sparql/lang/SyntaxVarScope.java | 38 -
.../lang/arq/ARQParserTokenManager.java | 6 -
.../sparql_10/SPARQLParser10TokenManager.java | 6 -
.../sparql_11/SPARQLParser11TokenManager.java | 6 -
.../org/apache/jena/sparql/mgt/Explain.java | 5 +-
.../sparql/modify/UpdateEngineWorker.java | 27 +-
.../jena/sparql/path/eval/PathEngine1.java | 5 -
.../sparql/resultset/JSONInputIterator.java | 16 +-
.../sparql/resultset/SortedResultSet.java | 18 -
.../jena/sparql/resultset/XMLOutputASK.java | 5 -
.../sparql/resultset/XMLOutputResultSet.java | 8 -
.../sparql/serializer/FormatterElement.java | 9 -
.../java/org/apache/jena/sparql/sse/SSE.java | 8 -
.../org/apache/jena/sparql/sse/WriterSSE.java | 7 +-
.../jena/sparql/sse/builders/BuilderExpr.java | 5 -
.../sparql/sse/lang/ParseHandlerResolver.java | 12 -
.../jena/sparql/sse/writers/WriterExpr.java | 18 -
.../jena/sparql/syntax/ElementGroup.java | 1 -
.../syntax/RecursiveElementVisitor.java | 2 -
.../org/apache/jena/sparql/util/Closure.java | 10 +-
.../jena/sparql/util/NodeFactoryExtra.java | 6 -
.../jena/atlas/data/TestSortedDataBag.java | 14 -
.../apache/jena/common/TestIsoMatcher.java | 6 -
.../query/TestParameterizedSparqlString.java | 4 -
.../org/apache/jena/riot/TestReadData.java | 6 -
.../jena/riot/tokens/TestTokenizer.java | 11 -
.../org/apache/jena/sparql/ARQTestSuite.java | 8 -
.../org/apache/jena/sparql/api/TestAPI.java | 7 -
.../jena/sparql/expr/TestExpressions.java | 5 +-
.../apache/jena/sparql/expr/TestRegex.java | 7 -
.../apache/jena/sparql/junit/QueryTest.java | 37 +-
.../jena/sparql/junit/TestSerialization.java | 6 +-
.../jena/sparql/resultset/TestResultSet.java | 29 -
.../jena/sparql/syntax/TestSSE_Basic.java | 10 -
.../jena/sparql/util/TestDateTimeParsing.java | 10 -
.../org/apache/jena/sparql/util/TestList.java | 2 -
.../org/apache/jena/atlas/io/BlockUTF8.java | 12 -
.../apache/jena/atlas/io/InStreamUTF8.java | 7 -
.../apache/jena/atlas/io/IndentedWriter.java | 8 -
.../org/apache/jena/atlas/io/PeekReader.java | 13 +-
.../java/org/apache/jena/atlas/lib/Bytes.java | 5 -
.../java/org/apache/jena/mem/HashCommon.java | 13 -
.../apache/jena/mem/NodeToTriplesMapMem.java | 3 +-
.../apache/jena/n3/N3JenaWriterCommon.java | 9 -
.../jena/n3/turtle/Turtle2NTriples.java | 30 -
.../jena/n3/turtle/parser/TurtleParser.java | 1794 +-
.../parser/TurtleParserTokenManager.java | 6 -
.../jena/ontology/impl/OntModelImpl.java | 13 -
.../jena/reasoner/rulesys/impl/Generator.java | 4 -
.../apache/jena/shared/uuid/UUID_V1_Gen.java | 26 -
.../java/org/apache/jena/util/LocatorURL.java | 8 -
.../jena/rdfxml/xmlinput/TestPackage.java | 5 -
.../jena/rdfxml/xmlinput/states/TestData.java | 11 -
.../test/TestInferenceReification.java | 3 -
.../reasoner/rulesys/test/TestOWLMisc.java | 25 -
.../reasoner/rulesys/test/TestRDFSRules.java | 32 -
.../reasoner/rulesys/test/TestSetRules.java | 4 -
.../jena/reasoner/test/TestRDFSReasoners.java | 9 -
.../jena/reasoner/test/WGReasonerTester.java | 18 -
.../apache/jena/shared/uuid/TestUUID_JRE.java | 25 -
.../graph/QueryIterPropertyTableRow.java | 16 +-
.../arq/querybuilder/ConstructBuilder.java | 18 -
.../org/apache/jena/fuseki/FusekiCmd.java | 9 -
.../apache/jena/fuseki/mgt/ActionBackup.java | 20 +-
.../apache/jena/fuseki/mgt/ActionDataset.java | 64 +-
.../jena/fuseki/mgt/ManagementServer.java | 15 -
.../apache/jena/fuseki/mgt/StatsServlet.java | 60 -
.../jena/fuseki/server/SPARQLServer.java | 16 -
.../jena/fuseki/servlets/SPARQL_Query.java | 6 -
.../jena/fuseki/servlets/SPARQL_REST.java | 5 -
.../fuseki/servlets/SPARQL_UberServlet.java | 31 -
.../org/apache/jena/fuseki/TestQuery.java | 9 -
.../jena/fuseki/build/DataServiceDesc.java | 2 -
.../org/apache/jena/fuseki/cmd/FusekiCmd.java | 16 -
.../apache/jena/fuseki/mgt/ActionStats.java | 70 -
.../org/apache/jena/fuseki/mgt/Backup.java | 18 +-
.../jena/fuseki/server/FusekiServer.java | 17 -
.../jena/fuseki/servlets/SPARQL_Query.java | 5 -
.../fuseki/servlets/SPARQL_UberServlet.java | 13 -
.../jena/fuseki/validation/DataValidator.java | 33 -
.../org/apache/jena/fuseki/TestAdmin.java | 6 -
.../org/apache/jena/fuseki/TestQuery.java | 9 -
.../org/apache/jena/iri/ViolationCodes.java | 14157 +++++++---------
.../org/apache/jena/iri/impl/AbsIRIImpl.java | 5 -
.../org/apache/jena/iri/impl/LexerHost.java | 105 -
.../org/apache/jena/iri/impl/LexerPath.java | 46 -
.../org/apache/jena/iri/impl/LexerPort.java | 46 -
.../org/apache/jena/iri/impl/LexerQuery.java | 46 -
.../org/apache/jena/iri/impl/LexerScheme.java | 46 -
.../apache/jena/iri/impl/LexerUserinfo.java | 46 -
.../org/apache/jena/iri/impl/LexerXHost.java | 46 -
.../java/org/apache/jena/iri/impl/Main.java | 32 -
.../java/org/apache/jena/iri/TestCreator.java | 103 -
.../java/org/apache/jena/iri/TestMEIri.java | 4 +-
.../permissions/impl/SecuredItemImpl.java | 8 +-
.../graph/GraphEventManagerTest.java | 2 -
.../jena/permissions/graph/MemGraphTest.java | 1 -
.../jena/sdb/compiler/PatternTable.java | 29 -
.../apache/jena/sdb/compiler/SqlBuilder.java | 8 -
.../jena/sdb/compiler/TransformSDB.java | 26 +-
.../rewrite/QuadBlockRewriteCompiler.java | 2 -
.../jena/sdb/core/sqlnode/SqlDistinct.java | 13 -
.../jena/sdb/core/sqlnode/SqlProject.java | 17 -
.../jena/sdb/core/sqlnode/SqlRename.java | 37 -
.../jena/sdb/core/sqlnode/SqlRestrict.java | 43 -
.../jena/sdb/core/sqlnode/SqlTransformer.java | 20 -
.../org/apache/jena/sdb/graph/GraphSDB.java | 29 -
.../jena/sdb/layout1/FormatterSimpleDB2.java | 1 -
.../sdb/layout1/FormatterSimpleDerby.java | 1 -
.../jena/sdb/layout1/FormatterSimpleH2.java | 1 -
.../jena/sdb/layout1/FormatterSimpleHSQL.java | 1 -
.../sdb/layout1/FormatterSimpleMySQL.java | 1 -
.../sdb/layout1/FormatterSimpleOracle.java | 1 -
.../sdb/layout1/FormatterSimplePGSQL.java | 1 -
.../jena/sdb/layout1/FormatterSimpleSAP.java | 1 -
.../sdb/layout1/FormatterSimpleSQLServer.java | 1 -
.../jena/sdb/layout2/TupleLoaderBase.java | 33 -
.../apache/jena/sdb/script/ScriptVocab.java | 4 -
.../apache/jena/sdb/store/SQLBridgeBase.java | 8 -
.../apache/jena/sdb/store/StoreConfig.java | 15 -
jena-sdb/src/main/java/sdb/cmd/ModStore.java | 18 -
jena-sdb/src/main/java/sdb/sdbquery.java | 2 -
jena-sdb/src/test/java/sdb/test/TestI18N.java | 19 -
.../java/examples/JenaSpatialExample1.java | 23 +-
.../jena/query/spatial/SpatialIndexSolr.java | 6 -
.../jena/tdb/assembler/TDBGraphAssembler.java | 28 -
.../org/apache/jena/tdb/base/block/Block.java | 16 +-
.../tdb/base/block/BlockMgrFreeChain.java | 5 -
.../jena/tdb/base/block/BlockMgrTracker.java | 5 -
.../base/objectfile/ObjectFileStorage.java | 15 -
.../jena/tdb/base/objectfile/StringFile.java | 7 +-
.../jena/tdb/base/page/PageBlockMgr.java | 6 -
.../jena/tdb/base/record/RecordFactory.java | 10 -
.../jena/tdb/index/bplustree/BPTreeNode.java | 7 -
.../jena/tdb/index/bplustree/BPlusTree.java | 5 -
.../bplustree/BPlusTreeRewriterUtils.java | 18 -
.../tdb/index/bplustree/BPlusTreeTools.java | 156 -
.../apache/jena/tdb/index/ext/ExtHash.java | 16 +-
.../java/org/apache/jena/tdb/lib/DumpOps.java | 11 -
.../jena/tdb/setup/DatasetBuilderBasic.java | 142 -
.../jena/tdb/setup/DatasetBuilderStd.java | 15 -
.../org/apache/jena/tdb/solver/SolverLib.java | 28 +-
.../jena/tdb/solver/StageMatchTuple.java | 16 -
.../tdb/store/bulkloader/LoadMonitor.java | 11 -
.../bulkloader/LoaderNodeTupleTable.java | 15 -
.../store/bulkloader2/RecordsFromInput.java | 20 -
.../tdb/store/nodetable/NodeTableCache.java | 32 -
.../jena/tdb/store/nodetable/NodecLib.java | 96 -
.../jena/tdb/store/nodetable/NodecSSE.java | 12 -
.../org/apache/jena/tdb/sys/DebugTDB.java | 14 -
.../java/org/apache/jena/tdb/sys/FileRef.java | 6 -
.../org/apache/jena/tdb/sys/SystemTDB.java | 9 -
.../jena/tdb/transaction/BlockMgrJournal.java | 9 -
.../jena/tdb/transaction/NodeTableTrans.java | 47 +-
jena-tdb/src/main/java/tdb/tools/dumpbpt.java | 61 +-
.../test/java/org/apache/jena/tdb/TC_TDB.java | 5 -
.../jena/tdb/extra/T_QuadsObjectIsNull.java | 28 -
.../jena/tdb/extra/T_TDBWriteTransaction.java | 11 -
.../apache/jena/tdb/extra/T_TransSystem.java | 36 +-
.../jena/tdb/extra/T_TxnDeadlockTest.java | 8 +-
.../jena/tdb/graph/TestPrefixMappingTDB.java | 7 -
.../bplustree/CmdTestBPlusTreeRewriter.java | 32 +-
.../index/bplustree/TestBPTreeRecords.java | 12 -
.../tdb/index/bplustree/TestBPlusTree.java | 7 -
.../jena/tdb/index/ext/ExtHashTestBase.java | 2 -
.../apache/jena/tdb/solver/TestSolverTDB.java | 19 -
.../apache/jena/tdb/store/TestDatasetTDB.java | 6 -
.../tdb/transaction/TestTransRestart.java | 9 +-
.../query/text/TextDocProducerEntities.java | 43 -
.../assembler/TestTextDatasetAssembler.java | 2 -
210 files changed, 7575 insertions(+), 12158 deletions(-)
delete mode 100644 jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTreeTools.java
delete mode 100644 jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetable/NodecLib.java
diff --git a/jena-arq/src/main/java/arq/cmd/CmdLineArgs.java b/jena-arq/src/main/java/arq/cmd/CmdLineArgs.java
index 7f5e6b4586b..46cc7e472fc 100644
--- a/jena-arq/src/main/java/arq/cmd/CmdLineArgs.java
+++ b/jena-arq/src/main/java/arq/cmd/CmdLineArgs.java
@@ -326,11 +326,6 @@ protected void handleUnrecognizedArg( String argStr ) {
throw new CmdException("Unknown argument: "+argStr) ;
}
- private ArgDecl find(String a) {
- a = ArgDecl.canonicalForm(a) ;
- return argMap.get(a) ;
- }
-
@Override
public String toString() {
if ( !processedArgs )
diff --git a/jena-arq/src/main/java/org/apache/jena/atlas/event/EventManager.java b/jena-arq/src/main/java/org/apache/jena/atlas/event/EventManager.java
index ca6d7837e78..988b95193e0 100644
--- a/jena-arq/src/main/java/org/apache/jena/atlas/event/EventManager.java
+++ b/jena-arq/src/main/java/org/apache/jena/atlas/event/EventManager.java
@@ -128,9 +128,6 @@ private void send(Object dest, Event event, Map>
}
}
- private void deliveryFailure(Object object, Event event)
- {}
-
private Map> get(Object object)
{
if ( object == null )
diff --git a/jena-arq/src/main/java/org/apache/jena/atlas/json/io/JSWriter.java b/jena-arq/src/main/java/org/apache/jena/atlas/json/io/JSWriter.java
index 25e52d308eb..fb92015e572 100644
--- a/jena-arq/src/main/java/org/apache/jena/atlas/json/io/JSWriter.java
+++ b/jena-arq/src/main/java/org/apache/jena/atlas/json/io/JSWriter.java
@@ -23,7 +23,6 @@
import static org.apache.jena.atlas.lib.Chars.CH_ZERO ;
import java.io.OutputStream ;
-import java.math.BigDecimal ;
import java.util.ArrayDeque ;
import java.util.Deque ;
@@ -304,10 +303,6 @@ private void value(long integer) {
out.print(Long.toString(integer)) ;
}
- private void value(BigDecimal number) {
- out.print(number.toString()) ;
- }
-
// Caution - assumes "Number" outputs legal JSON format
private void value(Number number) {
out.print(number.toString()) ;
@@ -330,18 +325,6 @@ private static boolean isA2ZN(int ch) {
return range(ch, 'a', 'z') || range(ch, 'A', 'Z') || range(ch, '0', '9') ;
}
- private static boolean isNumeric(int ch) {
- return range(ch, '0', '9') ;
- }
-
- private static boolean isWhitespace(int ch) {
- return ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n' || ch == '\f' ;
- }
-
- private static boolean isNewlineChar(int ch) {
- return ch == '\r' || ch == '\n' ;
- }
-
private static boolean range(int ch, char a, char b) {
return (ch >= a && ch <= b) ;
}
diff --git a/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/TokenizerJSON.java b/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/TokenizerJSON.java
index 4ce1365b06b..dfb64b4e713 100644
--- a/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/TokenizerJSON.java
+++ b/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/TokenizerJSON.java
@@ -287,7 +287,6 @@ private boolean threeQuotes(int ch)
private String readWord(boolean leadingDigitAllowed)
{
sb.setLength(0) ;
- int idx = 0 ;
if ( ! leadingDigitAllowed )
{
int ch = reader.peekChar() ;
@@ -295,7 +294,7 @@ private String readWord(boolean leadingDigitAllowed)
return "" ;
}
- for ( ;; idx++ )
+ while ( true )
{
int ch = reader.peekChar() ;
@@ -466,81 +465,6 @@ private int readDigits(StringBuilder buffer)
return count ;
}
- private String langTag()
- {
- sb.setLength(0) ;
- a2z(sb) ;
- if ( sb.length() == 0 )
- exception("Bad language tag") ;
- for ( ;; )
- {
- int ch = reader.peekChar() ;
- if ( ch == '-' )
- {
- reader.readChar() ;
- sb.append('-') ;
- int x = sb.length();
- a2zN(sb) ;
- if ( sb.length() == x )
- exception("Bad language tag") ;
- }
- else
- break ;
- }
- return sb.toString();
- }
-
- private void a2z(StringBuilder sb2)
- {
- for ( ;; )
- {
- int ch = reader.peekChar() ;
- if ( isA2Z(ch) )
- {
- reader.readChar() ;
- sb.append((char)ch) ;
- }
- else
- return ;
- }
- }
-
- private void a2zN(StringBuilder sb2)
- {
- for ( ;; )
- {
- int ch = reader.peekChar() ;
- if ( isA2ZN(ch) )
- {
- reader.readChar() ;
- sb.append((char)ch) ;
- }
- else
- return ;
- }
- }
-
- // Blank node label: A-Z,a-z0-9 and '-'
- private String blankNodeLabel()
- {
- sb.setLength(0) ;
- boolean seen = false ;
- for(;;)
- {
- int ch = reader.readChar() ;
- if ( ch == EOF )
- break ;
- if ( ! isA2ZN(ch) && ch != '-' )
- break ;
- sb.append((char)ch) ;
- seen = true ;
- }
- if ( ! seen )
- exception("Blank node label missing") ;
- return sb.toString() ;
- }
-
-
// Get characters between two markers.
// strEscapes may be processed
// endNL end of line as an ending is OK
@@ -638,21 +562,6 @@ public void close()
catch (IOException ex) { IO.exception(ex) ; }
}
- private boolean isA2Z(int ch)
- {
- return range(ch, 'a', 'z') || range(ch, 'A', 'Z') ;
- }
-
- private boolean isA2ZN(int ch)
- {
- return range(ch, 'a', 'z') || range(ch, 'A', 'Z') || range(ch, '0', '9') ;
- }
-
- private boolean isNumeric(int ch)
- {
- return range(ch, '0', '9') ;
- }
-
private static boolean isWhitespace(int ch)
{
return ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n' || ch == '\f' ;
@@ -691,23 +600,6 @@ int readLiteralEscape()
}
- private final
- int readUnicodeEscape()
- {
- int ch = reader.readChar() ;
- if ( ch == EOF )
- exception("Broken escape sequence") ;
-
- switch (ch)
- {
- case 'u': return readUnicode4Escape();
- case 'U': return readUnicode8Escape();
- default:
- exception(String.format("illegal escape sequence value: %c (0x%02X)", ch, ch));
- }
- return 0 ;
- }
-
private final
int readUnicode4Escape() { return readUnicodeEscape(4) ; }
@@ -757,24 +649,6 @@ private static boolean range(int ch, char a, char b)
return ( ch >= a && ch <= b ) ;
}
- private boolean expect(String str) {
- for (int i = 0; i < str.length(); i++) {
- char want = str.charAt(i);
- if (reader.eof())
- {
- exception("End of input during expected string: "+str) ;
- return false ;
- }
- int inChar = reader.readChar();
- if (inChar != want) {
- //System.err.println("N-triple reader error");
- exception("expected \"" + str + "\"");
- return false;
- }
- }
- return true;
- }
-
private void exception(String message)
{
exception(message, reader.getLineNum(), reader.getColNum()) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/atlas/web/AcceptList.java b/jena-arq/src/main/java/org/apache/jena/atlas/web/AcceptList.java
index 8801016d3a6..7638a8a709d 100644
--- a/jena-arq/src/main/java/org/apache/jena/atlas/web/AcceptList.java
+++ b/jena-arq/src/main/java/org/apache/jena/atlas/web/AcceptList.java
@@ -94,11 +94,6 @@ public AcceptList(String headerString)
}
}
- private /*public*/ boolean accepts(MediaRange aItem)
- {
- return match(aItem) != null ;
- }
-
private List entries()
{
return Collections.unmodifiableList(ranges) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/query/ParameterizedSparqlString.java b/jena-arq/src/main/java/org/apache/jena/query/ParameterizedSparqlString.java
index e09668878c0..3cfe16cfefa 100644
--- a/jena-arq/src/main/java/org/apache/jena/query/ParameterizedSparqlString.java
+++ b/jena-arq/src/main/java/org/apache/jena/query/ParameterizedSparqlString.java
@@ -1673,38 +1673,5 @@ public boolean isInsideLiteral(int start, int stop) {
}
}
- public boolean isInsideAltLiteral(int start, int stop) {
- Pair pair = this.findBefore(start);
- if (pair == null)
- return false;
- if (pair.getRight().equals("'")) {
- Integer nearestStop = this.stops.get(pair.getLeft());
- if (nearestStop == null)
- return true; // Inside unterminated literal
- return (nearestStop > stop); // May be inside a literal
- } else {
- // Not inside a literal
- return false;
- }
- }
-
- public boolean isBetweenLiterals(int start, int stop) {
- Pair pairBefore = this.findBefore(start);
- if (pairBefore == null)
- return false;
- if (pairBefore.getRight().equals("\"")) {
- Integer stopBefore = this.stops.get(pairBefore.getLeft());
- if (stopBefore == null)
- return false; // Inside unterminated literal
-
- // We occur after a literal, is there a subsequent literal?
- Pair pairAfter = this.findAfter(stop);
- return pairAfter != null && pairAfter.getRight().equals("\"");
- } else {
- // Previous deliminator is not that of a literal
- return false;
- }
- }
-
}
}
diff --git a/jena-arq/src/main/java/org/apache/jena/query/QueryExecutionFactory.java b/jena-arq/src/main/java/org/apache/jena/query/QueryExecutionFactory.java
index bbdde540e21..51ff0e1a5e1 100644
--- a/jena-arq/src/main/java/org/apache/jena/query/QueryExecutionFactory.java
+++ b/jena-arq/src/main/java/org/apache/jena/query/QueryExecutionFactory.java
@@ -30,7 +30,6 @@
import org.apache.jena.sparql.engine.binding.Binding ;
import org.apache.jena.sparql.engine.binding.BindingRoot ;
import org.apache.jena.sparql.engine.http.QueryEngineHTTP ;
-import org.apache.jena.sparql.syntax.Element ;
import org.apache.jena.sparql.util.Context ;
/** Place to make QueryExecution objects from Query objects or a string. */
@@ -488,15 +487,6 @@ public static Plan createPlan(Query query, DatasetGraph dataset, Binding input)
return makePlan(query, dataset, input, null) ;
}
- private static Query toQuery(Element pattern)
- {
- Query query = QueryFactory.make() ;
- query.setQueryPattern(pattern) ;
- query.setQuerySelectType() ;
- query.setQueryResultStar(true) ;
- return query ;
- }
-
private static Plan makePlan(Query query, DatasetGraph dataset, Binding input, Context context)
{
if ( context == null )
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/adapters/AdapterFileManager.java b/jena-arq/src/main/java/org/apache/jena/riot/adapters/AdapterFileManager.java
index 96f0f1a3563..7571a9e7f87 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/adapters/AdapterFileManager.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/adapters/AdapterFileManager.java
@@ -117,11 +117,6 @@ public static void setGlobalFileManager(AdapterFileManager globalFileManager) {
instance = globalFileManager ;
}
- /** Create an uninitialized FileManager */
- private AdapterFileManager() {
- streamManager = new StreamManager() ;
- }
-
@Override
public FileManager clone() {
StreamManager sm = streamManager.clone() ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/checker/CheckerIRI.java b/jena-arq/src/main/java/org/apache/jena/riot/checker/CheckerIRI.java
index 5060f3abb88..32c8965d607 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/checker/CheckerIRI.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/checker/CheckerIRI.java
@@ -100,31 +100,6 @@ public static void iriViolations(IRI iri, ErrorHandler errorHandler, long line,
iriViolations(iri, errorHandler, false, true, line, col) ;
}
- /** Process violations on an IRI
- * Calls the errorhandler on all errors and warnings (as warning).
- * Assumes error handler throws exceptions on errors if needbe
- * @param iri IRI to check
- * @param errorHandler The error handler to call on each warning or error.
- * @param allowRelativeIRIs Allow realtive URIs (discouraged)
- */
- private static void iriViolations(IRI iri, ErrorHandler errorHandler, boolean allowRelativeIRIs)
- {
- iriViolations(iri, errorHandler, allowRelativeIRIs, -1, -1) ;
- }
-
- /** Process violations on an IRI
- * Calls the errorhandler on all errors and warnings (as warning).
- * Assumes error handler throws exceptions on errors if needbe
- * @param iri IRI to check
- * @param errorHandler The error handler to call on each warning or error.
- * @param allowRelativeIRIs Allow realtive URIs (discouraged)
- */
- private static void iriViolations(IRI iri, ErrorHandler errorHandler, boolean allowRelativeIRIs, long line, long col)
- {
- iriViolations(iri, errorHandler, allowRelativeIRIs, true, line, col) ;
- }
-
-
/** Process violations on an IRI
* Calls the errorhandler on all errors and warnings (as warning).
* Assumes error handler throws exceptions on errors if needbe
@@ -141,15 +116,10 @@ public static void iriViolations(IRI iri, ErrorHandler errorHandler,
{
Iterator iter = iri.violations(includeIRIwarnings) ;
- boolean errorSeen = false ;
- boolean warningSeen = false ;
-
// What to finally report.
Violation vError = null ;
Violation vWarning = null ;
- Violation xvSub = null ;
-
- for ( ; iter.hasNext() ; )
+ while ( iter.hasNext() )
{
Violation v = iter.next();
int code = v.getViolationCode() ;
@@ -170,20 +140,18 @@ public static void iriViolations(IRI iri, ErrorHandler errorHandler,
// Remember first error and first warning.
if ( isError )
{
- errorSeen = true ;
if ( vError == null )
// Remember first error
vError = v ;
}
else
{
- warningSeen = true ;
if ( vWarning == null )
vWarning = v ;
}
String msg = v.getShortMessage();
- String iriStr = iri.toString();
+ iri.toString();
// Ideally, we might want to output all messages relating to this IRI
// then cause the error or continue.
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/JsonLDReader.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/JsonLDReader.java
index e7b758e2a01..c91bae67d89 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/JsonLDReader.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/JsonLDReader.java
@@ -176,13 +176,4 @@ private Node createURI(String str) {
return parserProfile.createURI(str, -1, -1) ;
}
- private Node createLiteral(String lex, String datatype, String lang) {
- if ( lang == null && datatype == null )
- return NodeFactory.createLiteral(lex) ;
- if ( lang != null )
- return NodeFactory.createLiteral(lex, lang) ;
- RDFDatatype dt = NodeFactory.getType(datatype) ;
- return NodeFactory.createLiteral(lex, dt) ;
- }
-
}
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/other/BatchedStreamRDF.java b/jena-arq/src/main/java/org/apache/jena/riot/other/BatchedStreamRDF.java
index d3eedd5b09e..3480b3c5d87 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/other/BatchedStreamRDF.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/other/BatchedStreamRDF.java
@@ -97,13 +97,6 @@ private void processTriple(Triple triple)
@Override
public void quad(Quad quad)
{
- if ( false )
- {
- // Merge to a triple stream.
- triple(quad.asTriple()) ;
- return ;
- }
-
Node g = quad.getGraph() ;
Node s = quad.getSubject() ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/out/TurtleValidate.java b/jena-arq/src/main/java/org/apache/jena/riot/out/TurtleValidate.java
index ff55f33cda3..b5367bb393c 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/out/TurtleValidate.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/out/TurtleValidate.java
@@ -21,8 +21,6 @@
import java.text.CharacterIterator ;
import java.text.StringCharacterIterator ;
-import org.apache.jena.riot.RiotException ;
-
/** Validation of Turtle terms */
public class TurtleValidate
@@ -56,21 +54,7 @@ protected static boolean checkValidPrefixPart(String s)
return checkNameTail(cIter) ;
}
- private static boolean checkValidPrefixName(String prefixedName)
- {
- // Split it to get the parts.
- int i = prefixedName.indexOf(':') ;
- if ( i < 0 )
- throw new RiotException("Broken short form -- "+prefixedName) ;
- String p = prefixedName.substring(0,i) ;
- String x = prefixedName.substring(i+1) ;
- // Check legality
- if ( checkValidPrefixedName(p, x) )
- return true ;
- return false ;
- }
-
- protected static boolean checkValidNamePart(String s)
+ protected static boolean checkValidNamePart(String s)
{
if ( s.length() == 0 )
return true;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/process/normalize/NormalizeValue.java b/jena-arq/src/main/java/org/apache/jena/riot/process/normalize/NormalizeValue.java
index 4410b6b1539..b6f2becc7fb 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/process/normalize/NormalizeValue.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/process/normalize/NormalizeValue.java
@@ -25,13 +25,10 @@
import java.text.NumberFormat ;
import java.util.Locale ;
-import javax.xml.datatype.XMLGregorianCalendar ;
-
import org.apache.jena.datatypes.RDFDatatype ;
import org.apache.jena.datatypes.xsd.XSDDatatype ;
import org.apache.jena.graph.Node ;
import org.apache.jena.graph.NodeFactory ;
-import org.apache.jena.sparql.expr.NodeValue ;
import org.apache.jena.sparql.graph.NodeConst ;
import org.apache.jena.sparql.util.DateTimeStruct ;
@@ -65,25 +62,7 @@ public Node handle(Node node, String lexicalForm, RDFDatatype datatype)
if ( lexicalForm.indexOf('.') < 0 )
// No fractional seconds.
return node ;
-
- // Could use XMLGregorianCalendar but still need to canonicalize fractional seconds.
- // Record for history.
- if ( false )
- {
- XMLGregorianCalendar xcal = NodeValue.xmlDatatypeFactory.newXMLGregorianCalendar(lexicalForm) ;
- if ( xcal.getFractionalSecond() != null )
- {
- if ( xcal.getFractionalSecond().compareTo(BigDecimal.ZERO) == 0 )
- xcal.setFractionalSecond(null) ;
- else
- // stripTrailingZeros does the right thing on fractional values.
- xcal.setFractionalSecond(xcal.getFractionalSecond().stripTrailingZeros()) ;
- }
- String lex2 = xcal.toXMLFormat() ;
- if ( lex2.equals(lexicalForm) )
- return node ;
- return NodeFactory.createLiteral(lex2, datatype) ;
- }
+
// The only variablity for a valid date/dateTime/g* type is:
// Second part can have fractional seconds '.' s+ (if present) represents the fractional seconds;
DateTimeStruct dts = DateTimeStruct.parseDateTime(lexicalForm) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/system/IteratorStreamRDFText.java b/jena-arq/src/main/java/org/apache/jena/riot/system/IteratorStreamRDFText.java
index 6a0ae98a5e2..eb22b28dfc8 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/system/IteratorStreamRDFText.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/system/IteratorStreamRDFText.java
@@ -134,8 +134,6 @@ public boolean hasNext() {
return false ;
}
list = buildOneLine() ;
- if ( false && log.isDebugEnabled() )
- log.debug("Tokens: " + list) ;
if ( list == null )
finished = true ;
return list != null ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/system/ParserProfileBase.java b/jena-arq/src/main/java/org/apache/jena/riot/system/ParserProfileBase.java
index 7146b7979fd..fe29ee9f500 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/system/ParserProfileBase.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/system/ParserProfileBase.java
@@ -28,7 +28,6 @@
import org.apache.jena.riot.SysRIOT ;
import org.apache.jena.riot.lang.LabelToNode ;
import org.apache.jena.riot.tokens.Token ;
-import org.apache.jena.riot.tokens.TokenType ;
import org.apache.jena.sparql.core.Quad ;
/**
@@ -134,11 +133,6 @@ public Node createStringLiteral(String lexical, long line, long col) {
/** Special token forms */
@Override
public Node createNodeFromToken(Node scope, Token token, long line, long col) {
- // OFF - Don't produce Node.ANY by default.
- if (false && token.getType() == TokenType.KEYWORD) {
- if (Token.ImageANY.equals(token.getImage()))
- return Node.ANY ;
- }
return null ;
}
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/system/RiotLib.java b/jena-arq/src/main/java/org/apache/jena/riot/system/RiotLib.java
index c85d9dd7a7b..94993cfa651 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/system/RiotLib.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/system/RiotLib.java
@@ -137,9 +137,7 @@ public static ParserProfile profile(Lang lang, String baseIRI, ErrorHandler hand
*/
public static ParserProfile profile(String baseIRI, boolean resolveIRIs, boolean checking, ErrorHandler handler)
{
- LabelToNode labelToNode = true
- ? SyntaxLabels.createLabelToNode()
- : LabelToNode.createUseLabelEncoded() ;
+ LabelToNode labelToNode = SyntaxLabels.createLabelToNode() ;
Prologue prologue ;
if ( resolveIRIs )
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/thrift/StreamRowTRDFPrinter.java b/jena-arq/src/main/java/org/apache/jena/riot/thrift/StreamRowTRDFPrinter.java
index ad4723bb8af..d415bfea87c 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/thrift/StreamRowTRDFPrinter.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/thrift/StreamRowTRDFPrinter.java
@@ -81,10 +81,6 @@ private void lineEnd() {
out.println() ;
}
- private void startRow() { }
-
- private void finishRow() { }
-
private void print(RDF_Term term) {
out.print(term.toString()) ;
}
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/thrift/TRDF.java b/jena-arq/src/main/java/org/apache/jena/riot/thrift/TRDF.java
index ce00bfd80d5..f5f93e6a287 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/thrift/TRDF.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/thrift/TRDF.java
@@ -33,9 +33,7 @@
import org.apache.jena.riot.thrift.wire.RDF_UNDEF ;
import org.apache.thrift.TException ;
import org.apache.thrift.protocol.TCompactProtocol ;
-import org.apache.thrift.protocol.TJSONProtocol ;
import org.apache.thrift.protocol.TProtocol ;
-import org.apache.thrift.protocol.TTupleProtocol ;
import org.apache.thrift.transport.TIOStreamTransport ;
import org.apache.thrift.transport.TTransport ;
@@ -88,12 +86,7 @@ public static TProtocol protocol(String filename) {
}
public static TProtocol protocol(TTransport transport) {
- if ( true ) return new TCompactProtocol(transport) ;
-
- // Keep the warnings down.
- if ( false ) return new TTupleProtocol(transport) ;
- if ( false ) return new TJSONProtocol(transport) ;
- throw new RiotThriftException("No protocol impl choosen") ;
+ return new TCompactProtocol(transport) ;
}
/** Flush a TProtocol; expections converted to {@link RiotException} */
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/writer/TurtleShell.java b/jena-arq/src/main/java/org/apache/jena/riot/writer/TurtleShell.java
index 9b1bb21e213..498ce657564 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/writer/TurtleShell.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/writer/TurtleShell.java
@@ -159,33 +159,6 @@ private ShellGraph(Graph graph, Node graphName, DatasetGraph dsg) {
//printDetails() ;
}
- // Debug
- private void printDetails() {
- printDetails("nestedObjects", nestedObjects) ;
- //printDetails("nestedObjectsWritten", nestedObjectsWritten) ;
- printDetails("freeBnodes", freeBnodes) ;
-
- printDetails("lists", lists) ;
- printDetails("freeLists", freeLists) ;
- printDetails("nLinkedLists", nLinkedLists) ;
- printDetails("listElts", listElts) ;
- }
-
- private void printDetails(String label, Map> map) {
- System.err.print("## ") ;
- System.err.print(label) ;
- System.err.print(" = ") ;
- System.err.println(map) ;
- }
-
- private void printDetails(String label, Collection nodes) {
- System.err.print("## ") ;
- System.err.print(label) ;
- System.err.print(" = ") ;
- System.err.println(nodes) ;
- }
- // Debug
-
private ShellGraph(Graph graph) {
this(graph, null, null) ;
}
@@ -206,17 +179,6 @@ private Triple triple1(Node s, Node p, Node o) {
return RiotLib.triple1(graph, s, p, o) ;
}
- /** Get exactly one triple, or null for none or more than one. */
- private Triple triple1(DatasetGraph dsg, Node s, Node p, Node o) {
- Iterator iter = dsg.find(Node.ANY, s, p, o) ;
- if ( !iter.hasNext() )
- return null ;
- Quad q = iter.next() ;
- if ( iter.hasNext() )
- return null ;
- return q.asTriple() ;
- }
-
private long countTriples(Node s, Node p, Node o) {
if ( dsg != null )
return RiotLib.countTriples(dsg, s, p, o) ;
@@ -240,18 +202,6 @@ private int inLinks(Node obj) {
}
}
- /** returns 0,1,2 (where 2 really means "more than 1") */
- private int occursAsSubject(Node subj) {
- if ( dsg != null ) {
- Iterator iter = dsg.find(Node.ANY, subj, Node.ANY, Node.ANY) ;
- return count012(iter) ;
- } else {
- ExtendedIterator iter = graph.find(subj, Node.ANY, Node.ANY) ;
- try { return count012(iter) ; }
- finally { iter.close() ; }
- }
- }
-
private int count012(Iterator > iter) {
if ( !iter.hasNext() )
return 0 ;
@@ -567,13 +517,6 @@ private boolean writeRemainingNestedObjects(Set objects, boolean something
return somethingWritten ;
}
- // Write triples, flat and simply.
- // Reset the state variables so "isPretty" return false.
- private void writeTriples(Node subj, Iterator iter) {
- allowDeepPretty = false;
- writeCluster(subj, Iter.toList(iter));
- }
-
// return true if did write something.
private boolean writeBySubject(Iterator subjects) {
boolean first = true ;
@@ -770,12 +713,8 @@ private void writeNestedObject(Node node) {
out.incIndent(2) ;
writePredicateObjectList(x) ;
out.decIndent(2) ;
- if ( true ) {
- println() ; // Newline for "]"
- print("]") ;
- } else { // Compact
- print(" ]") ;
- }
+ println() ; // Newline for "]"
+ print("]") ;
out.setAbsoluteIndent(indent0) ;
}
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/writer/WriterDatasetRIOTBase.java b/jena-arq/src/main/java/org/apache/jena/riot/writer/WriterDatasetRIOTBase.java
index e21e49ab1c6..926c9904387 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/writer/WriterDatasetRIOTBase.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/writer/WriterDatasetRIOTBase.java
@@ -23,17 +23,11 @@
import org.apache.jena.riot.WriterDatasetRIOT ;
import org.apache.jena.riot.system.PrefixMap ;
-import org.apache.jena.riot.system.PrefixMapFactory ;
import org.apache.jena.sparql.core.DatasetGraph ;
import org.apache.jena.sparql.util.Context ;
public abstract class WriterDatasetRIOTBase implements WriterDatasetRIOT
{
- private static PrefixMap prefixMap(DatasetGraph dataset)
- {
- return PrefixMapFactory.create(dataset.getDefaultGraph().getPrefixMapping()) ;
- }
-
@Override
public abstract void write(Writer out, DatasetGraph dataset, PrefixMap prefixMap, String baseURI, Context context) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/writer/WriterStreamRDFBatched.java b/jena-arq/src/main/java/org/apache/jena/riot/writer/WriterStreamRDFBatched.java
index 87573d5770b..5b217a09723 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/writer/WriterStreamRDFBatched.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/writer/WriterStreamRDFBatched.java
@@ -70,12 +70,6 @@ protected final void reset() {
@Override
protected final void print(Quad quad) {
- if ( false ) {
- // Merge to a triple stream.
- triple(quad.asTriple()) ;
- return ;
- }
-
Node g = quad.getGraph() ;
Node s = quad.getSubject() ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/AlgebraGenerator.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/AlgebraGenerator.java
index 6578ee7fa28..8b4ffd3c336 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/AlgebraGenerator.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/AlgebraGenerator.java
@@ -651,9 +651,6 @@ protected Op compileModifiers(Query query, Op pattern)
protected static Op join(Op current, Op newOp)
{
- if ( simplifyTooEarlyInAlgebraGeneration && applySimplification )
- return OpJoin.createReduce(current, newOp) ;
-
return OpJoin.create(current, newOp) ;
}
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpAsQuery.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpAsQuery.java
index ca0ee491cc2..4510a0569ae 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpAsQuery.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpAsQuery.java
@@ -626,15 +626,6 @@ public void visit(OpGroup opGroup) {
public void visit(OpTopN opTop)
{ throw new ARQNotImplemented("OpTopN") ; }
- private Element lastElement()
- {
- ElementGroup g = currentGroup ;
- if ( g == null || g.getElements().size() == 0 )
- return null ;
- int len = g.getElements().size() ;
- return g.getElements().get(len-1) ;
- }
-
private void startSubGroup()
{
push(currentGroup) ;
@@ -663,12 +654,6 @@ private ElementGroup currentGroup()
return currentGroup ;
}
- private ElementGroup peek()
- {
- if ( stack.size() == 0 )
- return null ;
- return stack.peek();
- }
private ElementGroup pop() { return stack.pop(); }
private void push(ElementGroup el) { stack.push(el); }
private boolean inTopLevel() { return stack.size() == 0; }
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/PropertyFunctionGenerator.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/PropertyFunctionGenerator.java
index 69d97d9306d..6acf1d2bfb1 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/PropertyFunctionGenerator.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/PropertyFunctionGenerator.java
@@ -30,12 +30,9 @@
import org.apache.jena.sparql.algebra.op.OpSequence ;
import org.apache.jena.sparql.algebra.op.OpTable ;
import org.apache.jena.sparql.core.BasicPattern ;
-import org.apache.jena.sparql.expr.Expr ;
-import org.apache.jena.sparql.expr.ExprList ;
import org.apache.jena.sparql.pfunction.PropFuncArg ;
import org.apache.jena.sparql.pfunction.PropertyFunctionRegistry ;
import org.apache.jena.sparql.util.Context ;
-import org.apache.jena.sparql.util.ExprUtils ;
import org.apache.jena.sparql.util.graph.GNode ;
import org.apache.jena.sparql.util.graph.GraphList ;
@@ -111,44 +108,17 @@ private static void findPropertyFunctionArgs(Context context,
private static class PropertyFunctionInstance
{
- Node predicate ;
PropFuncArg subjArgs ;
PropFuncArg objArgs ;
PropertyFunctionInstance(PropFuncArg sArgs, Node predicate, PropFuncArg oArgs)
{
this.subjArgs = sArgs ;
- this.predicate = predicate ;
this.objArgs = oArgs ;
}
- ExprList argList()
- {
- ExprList exprList = new ExprList() ;
- argList(exprList, subjArgs) ;
- argList(exprList, objArgs) ;
- return exprList ;
- }
-
PropFuncArg getSubjectArgList() { return subjArgs ; }
PropFuncArg getObjectArgList() { return objArgs ; }
-
- private static void argList(ExprList exprList, PropFuncArg pfArg)
- {
- if ( pfArg.isNode() )
- {
- Node n = pfArg.getArg() ;
- Expr expr = ExprUtils.nodeToExpr(n) ;
- exprList.add(expr) ;
- return ;
- }
-
- for ( Node n : pfArg.getArgList() )
- {
- Expr expr = ExprUtils.nodeToExpr(n) ;
- exprList.add(expr) ;
- }
- }
}
private static Op makeStages(BasicPattern triples, Map pfInvocations)
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/Transformer.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/Transformer.java
index ba3ee219b9e..6ecff08f181 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/Transformer.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/Transformer.java
@@ -78,41 +78,17 @@ public static Op transformSkipService(Transform transform, ExprTransform exprTra
/** Transform an algebra expression except skip (leave alone) any OpService nodes */
public static Op transformSkipService(Transform transform, Op op, OpVisitor beforeVisitor, OpVisitor afterVisitor)
{
- // Skip SERVICE
- if ( true )
- {
- // Simplest way but still walks the OpService subtree (and throws away the transformation).
- Transform walker = new TransformSkipService(transform) ;
- return Transformer.transform(walker, op, beforeVisitor, afterVisitor) ;
- }
- else
- {
- // Don't transform OpService and don't walk the sub-op
- ExprTransform exprTransform = new ExprTransformApplyTransform(transform, beforeVisitor, afterVisitor) ;
- ApplyTransformVisitorServiceAsLeaf v = new ApplyTransformVisitorServiceAsLeaf(transform, exprTransform) ;
- WalkerVisitorSkipService walker = new WalkerVisitorSkipService(v, beforeVisitor, afterVisitor) ;
- OpWalker.walk(walker, op) ;
- return v.result() ;
- }
+ // Simplest way but still walks the OpService subtree (and throws away the transformation).
+ Transform walker = new TransformSkipService(transform) ;
+ return Transformer.transform(walker, op, beforeVisitor, afterVisitor) ;
}
/** Transform an algebra expression except skip (leave alone) any OpService nodes */
public static Op transformSkipService(Transform transform, ExprTransform exprTransform, Op op, OpVisitor beforeVisitor, OpVisitor afterVisitor)
{
- // Skip SERVICE
- if ( true )
- {
- // Simplest way but still walks the OpService subtree (and throws away the transformation).
- Transform walker = new TransformSkipService(transform) ;
- return Transformer.transform(walker, exprTransform, op, beforeVisitor, afterVisitor) ;
- }
- else
- {
- ApplyTransformVisitorServiceAsLeaf v = new ApplyTransformVisitorServiceAsLeaf(transform, exprTransform) ;
- WalkerVisitorSkipService walker = new WalkerVisitorSkipService(v, beforeVisitor, afterVisitor) ;
- OpWalker.walk(walker, op) ;
- return v.result() ;
- }
+ // Simplest way but still walks the OpService subtree (and throws away the transformation).
+ Transform walker = new TransformSkipService(transform) ;
+ return Transformer.transform(walker, exprTransform, op, beforeVisitor, afterVisitor) ;
}
// To allow subclassing this class, we use a singleton pattern
@@ -310,7 +286,7 @@ public void visit(OpGroup opGroup)
for ( ExprAggregator agg : aggs )
{
Aggregator aggregator = agg.getAggregator() ;
- Var v = agg.getVar() ;
+ agg.getVar();
// Variable associated with the aggregate
Expr eVar = agg.getAggVar() ; // Not .getExprVar()
@@ -374,7 +350,7 @@ protected void visitN(OpN op)
for ( Iterator iter = op.iterator() ; iter.hasNext() ; )
{
- Op sub = iter.next() ;
+ iter.next();
Op r = pop() ;
// Skip nulls.
if ( r != null )
@@ -391,7 +367,7 @@ protected void visitFilter(OpFilter opFilter)
Op subOp = null ;
if ( opFilter.getSubOp() != null )
subOp = pop() ;
- boolean changed = ( opFilter.getSubOp() != subOp ) ;
+ opFilter.getSubOp();
ExprList ex = opFilter.getExprs() ;
ExprList ex2 = process(ex, exprTransform) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/op/OpExt.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/op/OpExt.java
index 59af18b9ff4..438c566a820 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/op/OpExt.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/op/OpExt.java
@@ -26,7 +26,6 @@
import org.apache.jena.sparql.engine.ExecutionContext ;
import org.apache.jena.sparql.engine.QueryIterator ;
import org.apache.jena.sparql.serializer.SerializationContext ;
-import org.apache.jena.sparql.sse.Tags ;
import org.apache.jena.sparql.sse.writers.WriterLib ;
/** Marker for extension points
@@ -61,22 +60,10 @@ public void output(IndentedWriter out, SerializationContext sCxt)
{
int line = out.getRow() ;
- if ( false )
- {
- // Write in (ext NAME ...) form.
- WriterLib.start(out, Tags.tagExt, WriterLib.NoNL) ;
- out.print(getName()) ;
- out.print(" ") ;
- outputArgs(out, sCxt) ;
- WriterLib.finish(out, Tags.tagExt) ;
- }
- else
- {
- // Write in (NAME ...) form.
- WriterLib.start(out, tag, WriterLib.NoNL) ;
- outputArgs(out, sCxt) ;
- WriterLib.finish(out, tag) ;
- }
+ // Write in (NAME ...) form.
+ WriterLib.start(out, tag, WriterLib.NoNL);
+ outputArgs(out, sCxt);
+ WriterLib.finish(out, tag);
if ( line != out.getRow() )
out.ensureStartOfLine() ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/Optimize.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/Optimize.java
index 342b50d1164..85e87d7afba 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/Optimize.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/Optimize.java
@@ -21,7 +21,6 @@
import org.apache.jena.query.ARQ ;
import org.apache.jena.sparql.ARQConstants ;
import org.apache.jena.sparql.algebra.* ;
-import org.apache.jena.sparql.algebra.op.OpLabel ;
import org.apache.jena.sparql.engine.ExecutionContext ;
import org.apache.jena.sparql.util.Context ;
import org.apache.jena.sparql.util.Symbol ;
@@ -132,14 +131,6 @@ public Op rewrite(Op op)
context.set(ARQ.optFilterPlacement, context.get(filterPlacementOldName)) ;
}
- if ( false )
- {
- // Removal of "group of one" join (AKA SPARQL "simplification")
- // is done during algebra generation in AlgebraGenerator
- op = apply("Simplify", new TransformSimplify(), op) ;
- op = apply("Delabel", new TransformRemoveLabels(), op) ;
- }
-
// ** TransformScopeRename::
// This is a requirement for the linearization execution that the default
// ARQ query engine uses where possible.
@@ -244,9 +235,6 @@ public Op rewrite(Op op)
if ( context.isTrueOrUndef(ARQ.optMergeExtends) )
op = apply("Combine BIND/LET", new TransformExtendCombine(), op) ;
- // Mark
- if ( false )
- op = OpLabel.create("Transformed", op) ;
return op ;
}
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformFilterPlacement.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformFilterPlacement.java
index fb904123361..0cc72d94f24 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformFilterPlacement.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/TransformFilterPlacement.java
@@ -24,7 +24,6 @@
import java.util.Objects;
import java.util.Set ;
-import org.apache.jena.atlas.lib.CollectionUtils ;
import org.apache.jena.atlas.lib.DS ;
import org.apache.jena.atlas.lib.Lib ;
import org.apache.jena.graph.Node ;
@@ -89,10 +88,6 @@ private Placement resultNoChange(Op original) {
return noChangePlacement ;
}
- private boolean isNoChange(Placement placement) {
- return placement == noChangePlacement ;
- }
-
/** Apply filter placement to a BGP */
public static Op transform(ExprList exprs, BasicPattern bgp) {
Placement placement = placeBGP(exprs, bgp) ;
@@ -532,31 +527,6 @@ private Placement placeLeftJoin(ExprList exprs, OpLeftJoin opLeftJoin) {
}
private Placement placeUnion(ExprList exprs, OpUnion input) {
- if ( false )
- // Safely but inefficiently do nothing.
- return null ; //new Placement(input, exprs) ;
-
- if ( false ) {
- // Push into both sides.
- Op left = input.getLeft() ;
- Placement pLeft = transform(exprs, left) ;
-
- Op right = input.getRight() ;
- Placement pRight = transform(exprs, right) ;
-
- if ( pLeft != null && ! pLeft.unplaced.isEmpty() )
- return noChangePlacement ;
- if ( pRight != null && ! pRight.unplaced.isEmpty() )
- return noChangePlacement ;
-
- // Must be guarded by the above.
- left = transformOpAlways(exprs, left) ;
- right = transformOpAlways(exprs, right) ;
-
- Op op2 = OpUnion.create(left, right) ;
- return result(op2, emptyList) ;
- }
-
Op left = input.getLeft() ;
Placement pLeft = transform(exprs, left) ;
@@ -626,7 +596,6 @@ private Placement processExtendAssign(ExprList exprs, OpExtendAssign input) {
// 2 - expressions that are covered when the extend/assign has applied. [wrapping]
// 3 - expressions that are not covered even at the outermost level. [unplaced]
- List vars1 = input.getVarExprList().getVars() ;
Op subOp = input.getSubOp() ;
// Case 1 : Do as much inner placement as possible.
@@ -759,10 +728,6 @@ private Set fixedVars(Op op) {
return op ;
}
- private static boolean disjoint(Collection collection, Collection possibleElts) {
- return CollectionUtils.disjoint(collection, possibleElts) ;
- }
-
/** Place expressions around an Op */
private static Op buildFilter(Placement placement) {
if ( placement == null )
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphFactory.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphFactory.java
index 81139f10880..21f77619249 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphFactory.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphFactory.java
@@ -18,10 +18,7 @@
package org.apache.jena.sparql.core;
-import java.util.Iterator ;
-
import org.apache.jena.graph.Graph ;
-import org.apache.jena.graph.Node ;
import org.apache.jena.sparql.graph.GraphFactory ;
public class DatasetGraphFactory
@@ -39,16 +36,6 @@ public static DatasetGraph create(DatasetGraph dsg)
// return dsg2 ;
}
- private static void copyOver(DatasetGraph dsgDest, DatasetGraph dsgSrc)
- {
- dsgDest.setDefaultGraph(dsgSrc.getDefaultGraph()) ;
- for ( Iterator names = dsgSrc.listGraphNodes() ; names.hasNext() ; )
- {
- Node gn = names.next() ;
- dsgDest.addGraph(gn, dsgSrc.getGraph(gn)) ;
- }
- }
-
/**
* Create a DatasetGraph starting with a single graph.
* New graphs must be explicitly added.
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphSimpleMem.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphSimpleMem.java
index 8ce0061a39f..e7e64994b8c 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphSimpleMem.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphSimpleMem.java
@@ -44,8 +44,6 @@ public class DatasetGraphSimpleMem extends DatasetGraphCaching
private static class MiniSet implements Iterable
{
final Collection store ;
- MiniSet(Collection store) { this.store = store ; }
-
MiniSet() { this.store = new ArrayList<>() ; }
void add(T t)
@@ -64,10 +62,6 @@ public Iterator iterator()
{
return store.iterator() ;
}
-
- boolean isEmpty() { return store.isEmpty() ; }
-
- int size() { return store.size() ; }
}
public DatasetGraphSimpleMem() {}
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/AssemblerUtils.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/AssemblerUtils.java
index d8e7fff59f4..a20c583cae5 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/AssemblerUtils.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/AssemblerUtils.java
@@ -64,11 +64,6 @@ static public void registerWith(AssemblerGroup g)
g.implementWith(DatasetNullAssembler.getType(), new DatasetNullAssembler()) ;
}
- private static void assemblerClass(AssemblerGroup g, Resource r, Assembler a)
- {
- g.implementWith(r, a) ;
- }
-
public static Object build(String assemblerFile, String typeURI)
{
Resource type = ResourceFactory.createResource(typeURI) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/QueryEngineHTTP.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/QueryEngineHTTP.java
index ef9b8f10f3a..d58f2958d6d 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/QueryEngineHTTP.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/http/QueryEngineHTTP.java
@@ -18,7 +18,6 @@
package org.apache.jena.sparql.engine.http;
-import java.io.ByteArrayInputStream ;
import java.io.InputStream ;
import java.util.ArrayList ;
import java.util.Iterator ;
@@ -27,7 +26,6 @@
import java.util.concurrent.TimeUnit ;
import org.apache.http.client.HttpClient ;
-import org.apache.jena.atlas.io.IO ;
import org.apache.jena.atlas.web.auth.HttpAuthenticator ;
import org.apache.jena.atlas.web.auth.SimpleAuthenticator ;
import org.apache.jena.graph.Triple ;
@@ -344,13 +342,6 @@ private ResultSet execResultSetInner() {
httpQuery.setAccept(selectContentType);
InputStream in = httpQuery.exec();
- if (false) {
- byte b[] = IO.readWholeFile(in);
- String str = new String(b);
- System.out.println(str);
- in = new ByteArrayInputStream(b);
- }
-
retainedConnection = in; // This will be closed on close()
retainedClient = httpQuery.shouldShutdownClient() ? httpQuery.getClient() : null;
@@ -763,15 +754,10 @@ private static String initSelectContentTypes() {
return sBuff.toString() ;
}
- private static final String askContentTypeHeader = initAskContentTypes() ;
-
public static String defaultAskHeader() {
return selectContentTypeHeader ;
}
- // These happen to be the same.
- private static String initAskContentTypes() { return initSelectContentTypes(); }
-
private static final String constructContentTypeHeader = initConstructContentTypes() ;
public static String defaultConstructHeader() {
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterAssign.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterAssign.java
index da903a26f53..88ec4db1aa5 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterAssign.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterAssign.java
@@ -21,7 +21,6 @@
import org.apache.jena.atlas.io.IndentedWriter ;
import org.apache.jena.atlas.lib.Lib ;
import org.apache.jena.graph.Node ;
-import org.apache.jena.query.QueryExecException ;
import org.apache.jena.sparql.core.Var ;
import org.apache.jena.sparql.core.VarExprList ;
import org.apache.jena.sparql.engine.ExecutionContext ;
@@ -37,8 +36,6 @@
public class QueryIterAssign extends QueryIterProcessBinding
{
private VarExprList exprs ;
- private final boolean mustBeNewVar ;
-
public QueryIterAssign(QueryIterator input, Var var, Expr expr, ExecutionContext qCxt)
{
this(input, new VarExprList(var, expr) , qCxt, false) ;
@@ -52,7 +49,6 @@ public QueryIterAssign(QueryIterator input, VarExprList exprs, ExecutionContext
// Syntax checking of BIND should have assured this.
super(input, qCxt) ;
this.exprs = exprs ;
- this.mustBeNewVar = mustBeNewVar ;
}
@Override
@@ -73,10 +69,6 @@ public Binding accept(Binding binding)
// Check is already has a value; if so, must be sameValueAs
if ( b.contains(v) )
{
- // Optimization may linearize to push a stream through an (extend).
- if ( false && mustBeNewVar )
- throw new QueryExecException("Already set: "+v) ;
-
Node n2 = b.get(v) ;
if ( ! n2.sameValueAs(n) )
//throw new QueryExecException("Already set: "+v) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterSingleton.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterSingleton.java
index 0250d195da2..110ec7ebd62 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterSingleton.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterSingleton.java
@@ -42,11 +42,6 @@ public static QueryIterSingleton create(Binding binding, ExecutionContext execCx
return new QueryIterSingleton(binding, execCxt) ;
}
- private QueryIterSingleton(Binding binding) // Not needed
- {
- this(binding, null) ;
- }
-
protected QueryIterSingleton(Binding binding, ExecutionContext context)
{
super(1, binding, context) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIteratorBase.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIteratorBase.java
index dee066106fc..44a075ca1ca 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIteratorBase.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIteratorBase.java
@@ -207,24 +207,6 @@ public final void cancel()
}
}
- /** Cancel this iterator but allow it to continue servicing hasNext/next.
- * Wrong answers are possible (e.g. partial ORDER BY and LIMIT).
- */
-
- private final void cancelAllowContinue()
- {
- // Call requestCancel() once.
- synchronized (cancelLock)
- {
- if (!this.requestingCancel)
- {
- //this.abortIterator = true ;
- this.requestingCancel = true;
- this.requestCancel() ;
- }
- }
- }
-
/** close an iterator */
protected static void performClose(QueryIterator iter)
{
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/OpExecutor.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/OpExecutor.java
index 709f735c9f8..ee1a32bd0cd 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/OpExecutor.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/OpExecutor.java
@@ -23,7 +23,6 @@
import java.util.List ;
import java.util.Set ;
-import org.apache.jena.atlas.iterator.Iter ;
import org.apache.jena.atlas.logging.Log ;
import org.apache.jena.graph.Node ;
import org.apache.jena.query.ARQ ;
@@ -37,7 +36,6 @@
import org.apache.jena.sparql.core.Var ;
import org.apache.jena.sparql.engine.ExecutionContext ;
import org.apache.jena.sparql.engine.QueryIterator ;
-import org.apache.jena.sparql.engine.binding.Binding ;
import org.apache.jena.sparql.engine.iterator.* ;
import org.apache.jena.sparql.engine.main.iterator.* ;
import org.apache.jena.sparql.expr.Expr ;
@@ -205,17 +203,6 @@ protected QueryIterator execute(OpJoin opJoin, QueryIterator input) {
// Do by evaling for each input case, the left and right and concat'ing
// the results.
- if (false) {
- // If needed, applies to OpDiff and OpLeftJoin as well.
- List a = all(input) ;
- QueryIterator qIter1 = new QueryIterPlainWrapper(a.iterator(), execCxt) ;
- QueryIterator qIter2 = new QueryIterPlainWrapper(a.iterator(), execCxt) ;
-
- QueryIterator left = exec(opJoin.getLeft(), qIter1) ;
- QueryIterator right = exec(opJoin.getRight(), qIter2) ;
- QueryIterator qIter = new QueryIterJoin(left, right, execCxt) ;
- return qIter ;
- }
QueryIterator left = exec(opJoin.getLeft(), input) ;
QueryIterator right = exec(opJoin.getRight(), root()) ;
QueryIterator qIter = new QueryIterJoin(left, right, execCxt) ;
@@ -313,10 +300,6 @@ protected QueryIterator execute(OpService opService, QueryIterator input) {
// Quad form, "GRAPH ?g {}" Flip back to OpGraph.
// Normally quad stores override this.
protected QueryIterator execute(OpDatasetNames dsNames, QueryIterator input) {
- if (false) {
- OpGraph op = new OpGraph(dsNames.getGraphNode(), new OpBGP()) ;
- return execute(op, input) ;
- }
throw new ARQNotImplemented("execute/OpDatasetNames") ;
}
@@ -444,22 +427,4 @@ public static QueryIterator createRootQueryIterator(ExecutionContext execCxt) {
protected QueryIterator root() {
return createRootQueryIterator(execCxt) ;
}
-
- // Use this to debug evaluation
- // Example:
- // input = debug(input) ;
- private QueryIterator debug(String marker, QueryIterator input) {
- List x = all(input) ;
- for (Binding b : x) {
- System.out.print(marker) ;
- System.out.print(": ") ;
- System.out.println(b) ;
- }
-
- return new QueryIterPlainWrapper(x.iterator(), execCxt) ;
- }
-
- private static List all(QueryIterator input) {
- return Iter.toList(input) ;
- }
}
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/VarFinder.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/VarFinder.java
index fb50694279d..03a601caad5 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/VarFinder.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/VarFinder.java
@@ -87,14 +87,6 @@ static VarUsageVisitor apply(Op op)
assignMentions = new HashSet<>() ;
}
- VarUsageVisitor(Set _defines, Set _optDefines, Set _filterMentions, Set _assignMentions)
- {
- defines = _defines ;
- optDefines = _optDefines ;
- filterMentions = _filterMentions ;
- assignMentions = _assignMentions ;
- }
-
@Override
public void visit(OpQuadPattern quadPattern)
{
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/ExprList.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/ExprList.java
index 9e568517440..3ac680a926b 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/ExprList.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/ExprList.java
@@ -126,12 +126,6 @@ public static ExprList splitConjunction(ExprList exprList1) {
return exprList2 ;
}
- private static ExprList splitConjunction(Expr expr) {
- ExprList exprList = new ExprList() ;
- split(exprList, expr) ;
- return exprList ;
- }
-
private static void split(ExprList exprList, Expr expr) {
// Explode &&-chain to exprlist.
while (expr instanceof E_LogicalAnd) {
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/XSDFuncOp.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/XSDFuncOp.java
index 439948aa36c..be687912ddb 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/XSDFuncOp.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/XSDFuncOp.java
@@ -923,14 +923,6 @@ private static int compareDateTimeFO(NodeValue nv1, NodeValue nv2) {
// return x ;
// }
- private static NodeValue fixupDateOrDateTime(NodeValue nv) {
- if ( nv.isDateTime() )
- return fixupDateTime(nv);
- if ( nv.isDate() )
- return fixupDate(nv);
- throw new ARQInternalErrorException("Attempt to fixupDateOrDateTime on "+nv);
- }
-
private static NodeValue fixupDateTime(NodeValue nv) {
DateTimeStruct dts = DateTimeStruct.parseDateTime(nv.asNode().getLiteralLexicalForm()) ;
if ( dts.timezone != null )
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphSPARQL.java b/jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphSPARQL.java
index 0fd1859cd08..faafe550f46 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphSPARQL.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphSPARQL.java
@@ -80,14 +80,6 @@ public GraphSPARQL(Graph graph, QueryEngineFactory factory)
this.factory = factory ;
}
- private DatasetGraph toDSG(DatasetGraph dataset, Node graphNode)
- {
- Graph graph = ( graphNode == null ) ? dataset.getDefaultGraph() : dataset.getGraph(graphNode) ;
- DatasetGraph dsGraph = DatasetGraphFactory.create(graph) ;
- return dsGraph ;
- }
-
-
/* We don't support value tests, hence handlesLiteralTyping is false */
@Override
public Capabilities getCapabilities()
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/lang/SyntaxVarScope.java b/jena-arq/src/main/java/org/apache/jena/sparql/lang/SyntaxVarScope.java
index 66a3fb70357..e743fd07667 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/lang/SyntaxVarScope.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/lang/SyntaxVarScope.java
@@ -117,16 +117,6 @@ private static void check(Query query, Collection vars)
// Check any variable in an expression is in scope (if GROUP BY)
checkExprVarUse(query) ;
-
- // Check GROUP BY AS
- // ENABLE
- if ( false && query.hasGroupBy() )
- {
- VarExprList exprList2 = query.getGroupBy() ;
- checkExprListAssignment(vars, exprList2) ;
- // CHECK
- }
-
}
private static void checkExprListAssignment(Collection vars, VarExprList exprList)
@@ -190,34 +180,6 @@ private static void checkAssignment(Collection scope, Expr expr, Var var)
// expr not null
if ( scope.contains(var) )
throw new QueryParseException("Variable used when already in-scope: "+var+" in "+fmtAssignment(expr, var), -1 , -1) ;
-
- // test for impossible variables - bound() is a bit odd.
- if ( false )
- {
- Set vars = expr.getVarsMentioned() ;
- for ( Var v : vars )
- {
- if ( !scope.contains(v) )
- throw new QueryParseException("Variable used in expression is not in-scope: "+v+" in "+expr, -1 , -1) ;
- }
- }
- }
-
- private static String fmtExprList(VarExprList exprList)
- {
- StringBuilder sb = new StringBuilder() ;
- boolean first = true ;
- for ( Var v : exprList.getVars() )
- {
- Expr e = exprList.getExpr( v );
- if ( !first )
- {
- sb.append( " " );
- }
- first = false;
- sb.append( "(" ).append( e ).append( " AS " ).append( v ).append( ")" );
- }
- return sb.toString() ;
}
private static String fmtAssignment(Expr expr, Var var)
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParserTokenManager.java b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParserTokenManager.java
index 7dc6bff638c..953e8200bb5 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParserTokenManager.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/lang/arq/ARQParserTokenManager.java
@@ -18,12 +18,6 @@ public class ARQParserTokenManager implements ARQParserConstants
public java.io.PrintStream debugStream = System.out;
/** Set debug output. */
public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private int jjStopAtPos(int pos, int kind)
-{
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- return pos + 1;
-}
private int jjMoveStringLiteralDfa0_0()
{
switch(curChar)
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/lang/sparql_10/SPARQLParser10TokenManager.java b/jena-arq/src/main/java/org/apache/jena/sparql/lang/sparql_10/SPARQLParser10TokenManager.java
index 9e88e0c82bb..b627958089f 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/lang/sparql_10/SPARQLParser10TokenManager.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/lang/sparql_10/SPARQLParser10TokenManager.java
@@ -33,12 +33,6 @@ public class SPARQLParser10TokenManager implements SPARQLParser10Constants
public java.io.PrintStream debugStream = System.out;
/** Set debug output. */
public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private int jjStopAtPos(int pos, int kind)
-{
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- return pos + 1;
-}
private int jjMoveStringLiteralDfa0_0()
{
switch(curChar)
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/lang/sparql_11/SPARQLParser11TokenManager.java b/jena-arq/src/main/java/org/apache/jena/sparql/lang/sparql_11/SPARQLParser11TokenManager.java
index 2acd002ea54..944b66ebeca 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/lang/sparql_11/SPARQLParser11TokenManager.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/lang/sparql_11/SPARQLParser11TokenManager.java
@@ -18,12 +18,6 @@ public class SPARQLParser11TokenManager implements SPARQLParser11Constants
public java.io.PrintStream debugStream = System.out;
/** Set debug output. */
public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private int jjStopAtPos(int pos, int kind)
-{
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- return pos + 1;
-}
private int jjMoveStringLiteralDfa0_0()
{
switch(curChar)
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/mgt/Explain.java b/jena-arq/src/main/java/org/apache/jena/sparql/mgt/Explain.java
index 3c0f69ecf85..5bb64d02578 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/mgt/Explain.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/mgt/Explain.java
@@ -141,10 +141,7 @@ public static void explain(String message, Query query, Context context) {
if ( explaining(InfoLevel.INFO, logExec, context) ) {
// One line or indented multiline format
IndentedLineBuffer iBuff = new IndentedLineBuffer() ;
- if ( true )
- iBuff.incIndent() ;
- else
- iBuff.setFlatMode(true) ;
+ iBuff.incIndent() ;
query.serialize(iBuff) ;
String x = iBuff.asString() ;
_explain(logExec, message, x, true) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateEngineWorker.java b/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateEngineWorker.java
index 46b2ef9bba9..111c9309b24 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateEngineWorker.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateEngineWorker.java
@@ -134,8 +134,6 @@ public void visit(UpdateCreate update)
return ;
if ( graphStore.containsGraph(g) )
{
- if ( ! alwaysSilent && ! update.isSilent() )
- error("Graph store already contains graph : "+g) ;
return ;
}
// In-memory specific
@@ -389,15 +387,11 @@ public void visit(UpdateModify update)
// WITH
// USING overrides WITH
if ( dsg == null && withGraph != null ) {
- if ( false )
- // Ye Olde way - create a special dataset
- dsg = processWith(update) ;
- else
- // Better,
- // Wrap WHERE clause in GRAPH
- // and can remove DatasetGraphAltDefaultGraph,
- // or at least comment its implications.
- elt = new ElementNamedGraph(withGraph, elt) ;
+ // Better,
+ // Wrap WHERE clause in GRAPH
+ // and can remove DatasetGraphAltDefaultGraph,
+ // or at least comment its implications.
+ elt = new ElementNamedGraph(withGraph, elt) ;
}
// WITH :
@@ -416,17 +410,6 @@ public void visit(UpdateModify update)
{
Iterator bindings = evalBindings(query, dsg, inputBinding, context) ;
- if ( false )
- {
-// System.out.println("=======================================") ;
-// System.out.println(graphStore) ;
- List x = Iter.toList(bindings) ;
- System.out.printf("====>> Bindings (%d)\n", x.size()) ;
- Iter.print(System.out, x.iterator()) ;
- System.out.println("====<<") ;
- bindings = Iter.iter(x) ;
- }
-
db.addAll(bindings) ;
Iter.close(bindings) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/path/eval/PathEngine1.java b/jena-arq/src/main/java/org/apache/jena/sparql/path/eval/PathEngine1.java
index 9d449a154e0..92515b6e3fe 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/path/eval/PathEngine1.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/path/eval/PathEngine1.java
@@ -149,11 +149,6 @@ protected void doMultiLengthPath(Path pathStep, Node node, long length, Collecti
@Override
protected void doFixedLengthPath(Path pathStep, Node node, long fixedLength, Collection output) {
- // Special for small?
- // if ( fixedLength < 3 )
- // {}
- Collection visited = collector() ;
-
if ( fixedLength == 0 ) {
doZero(pathStep, node, output) ;
return ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/resultset/JSONInputIterator.java b/jena-arq/src/main/java/org/apache/jena/sparql/resultset/JSONInputIterator.java
index 2d47846a440..782fc4f7381 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/resultset/JSONInputIterator.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/resultset/JSONInputIterator.java
@@ -606,21 +606,7 @@ private boolean isPropertyName()
return lookingAt(TokenType.STRING1) || lookingAt(TokenType.STRING2);
}
- private Token checkValidForStringProperty(String property)
- {
- Token t = null;
- if (lookingAt(TokenType.STRING1) || lookingAt(TokenType.STRING2))
- {
- t = nextToken();
- }
- else
- {
- exception(peekToken(), "JSON Values given for property " + property + " must be Strings") ;
- }
- return t;
- }
-
- private void checkColon()
+ private void checkColon()
{
if (!lookingAt(TokenType.COLON))
{
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/resultset/SortedResultSet.java b/jena-arq/src/main/java/org/apache/jena/sparql/resultset/SortedResultSet.java
index 549b9d76cf8..4f246ffc0a8 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/resultset/SortedResultSet.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/resultset/SortedResultSet.java
@@ -19,7 +19,6 @@
package org.apache.jena.sparql.resultset;
import java.util.Comparator ;
-import java.util.Iterator ;
import java.util.List ;
import java.util.SortedSet ;
import java.util.TreeSet ;
@@ -28,14 +27,10 @@
import org.apache.jena.query.ResultSet ;
import org.apache.jena.query.SortCondition ;
import org.apache.jena.rdf.model.Model ;
-import org.apache.jena.rdf.model.RDFNode ;
import org.apache.jena.sparql.core.ResultBinding ;
-import org.apache.jena.sparql.core.Var ;
import org.apache.jena.sparql.engine.QueryIterator ;
import org.apache.jena.sparql.engine.binding.Binding ;
import org.apache.jena.sparql.engine.binding.BindingComparator ;
-import org.apache.jena.sparql.engine.binding.BindingFactory ;
-import org.apache.jena.sparql.engine.binding.BindingMap ;
import org.apache.jena.sparql.engine.iterator.QueryIterPlainWrapper ;
@@ -128,18 +123,5 @@ public void remove()
{
throw new UnsupportedOperationException(SortedResultSet.class.getName()+".remove") ;
}
-
-
- private Binding copyToBinding(QuerySolution qs)
- {
- BindingMap b = BindingFactory.create() ;
- for ( Iterator iter = qs.varNames() ; iter.hasNext() ; )
- {
- String varName = iter.next() ;
- RDFNode rn = qs.get(varName) ;
- b.add(Var.alloc(varName), rn.asNode()) ;
- }
- return b ;
- }
}
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/resultset/XMLOutputASK.java b/jena-arq/src/main/java/org/apache/jena/sparql/resultset/XMLOutputASK.java
index cbeda1db495..517a151899f 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/resultset/XMLOutputASK.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/resultset/XMLOutputASK.java
@@ -60,11 +60,6 @@ public void exec(boolean result)
// Head
out.println("<"+dfHead+">") ;
out.incIndent(INDENT) ;
- if ( false )
- {
- String link = "UNSET" ;
- out.println(" ") ;
- }
out.decIndent(INDENT) ;
out.println(""+dfHead+">") ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/resultset/XMLOutputResultSet.java b/jena-arq/src/main/java/org/apache/jena/sparql/resultset/XMLOutputResultSet.java
index 9a25e028dfe..917912c8046 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/resultset/XMLOutputResultSet.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/resultset/XMLOutputResultSet.java
@@ -86,14 +86,6 @@ public void start(ResultSet rs)
out.print(dfHead) ;
out.println(">") ;
- if ( false )
- {
- String link = "UNSET" ;
- out.print(" ") ;
- }
-
for (String n : rs.getResultVars())
{
out.incIndent(INDENT) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/serializer/FormatterElement.java b/jena-arq/src/main/java/org/apache/jena/sparql/serializer/FormatterElement.java
index 9c8975d90ea..0d1af9c3b66 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/serializer/FormatterElement.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/serializer/FormatterElement.java
@@ -290,14 +290,6 @@ public void visit(ElementUnion el)
@Override
public void visit(ElementGroup el)
{
- if ( GROUP_UNNEST_ONE && el.getElements().size() == 1 )
- {
- // If this is an element of just one, we can remove the {} if it is a group.
- Element e = el.getElements().get(0) ;
- visitAsGroup(e) ;
- return ;
- }
-
out.print("{") ;
out.incIndent(INDENT) ;
if ( GROUP_FIRST_ON_SAME_LINE )
@@ -511,7 +503,6 @@ protected void formatTriples(BasicPattern triples)
boolean first = true ; // Print newlines between blocks.
- int indent = -1 ;
for ( Triple t : triples )
{
if ( subj != null && t.getSubject().equals(subj) )
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/sse/SSE.java b/jena-arq/src/main/java/org/apache/jena/sparql/sse/SSE.java
index a9d67b43556..9211053e064 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/sse/SSE.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/sse/SSE.java
@@ -337,14 +337,6 @@ private static Node parseNode(Reader reader, PrefixMapping pmap)
return item.getNode() ;
}
- private static String parseSymbol(Reader reader, PrefixMapping pmap)
- {
- Item item = parseTerm(reader, pmap) ;
- if ( ! item.isSymbol() )
- throw new SSEParseException("Not a symbol: "+item, item.getLine(), item.getColumn()) ;
- return item.getSymbol() ;
- }
-
public static Item parseItem(String str)
{
return parse(str, null) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/sse/WriterSSE.java b/jena-arq/src/main/java/org/apache/jena/sparql/sse/WriterSSE.java
index ca711f3a0be..e5bac624552 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/sse/WriterSSE.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/sse/WriterSSE.java
@@ -57,12 +57,7 @@ public static void out(IndentedWriter out, DatasetGraph dsg, Prologue prologue)
private static SerializationContext sCxt(Prologue prologue)
{
-// return new SerializationContext(prologue) ;
- // Pragmatic.
- if ( false && prologue.explicitlySetBaseURI() )
- return new SerializationContext(prologue) ;
- else
- return new SerializationContext(prologue.getPrefixMapping()) ;
+ return new SerializationContext(prologue.getPrefixMapping()) ;
}
}
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/sse/builders/BuilderExpr.java b/jena-arq/src/main/java/org/apache/jena/sparql/sse/builders/BuilderExpr.java
index 39a7a54e419..95b91c454cc 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/sse/builders/BuilderExpr.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/sse/builders/BuilderExpr.java
@@ -73,11 +73,6 @@ public static ExprList buildExprList(Item item)
return buildExprListUntagged(list, 1) ;
}
- private static ExprList buildExprListUntagged(Item item)
- {
- return buildExprListUntagged(item.getList(), 0) ;
- }
-
private static ExprList buildExprListUntagged(ItemList list, int idx)
{
ExprList exprList = new ExprList() ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/sse/lang/ParseHandlerResolver.java b/jena-arq/src/main/java/org/apache/jena/sparql/sse/lang/ParseHandlerResolver.java
index ff6848bee07..600210c348f 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/sse/lang/ParseHandlerResolver.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/sse/lang/ParseHandlerResolver.java
@@ -20,8 +20,6 @@
import java.util.ArrayDeque ;
import java.util.Deque ;
-import java.util.Iterator ;
-
import org.apache.jena.atlas.lib.StrUtils ;
import org.apache.jena.shared.PrefixMapping ;
import org.apache.jena.sparql.core.Prologue ;
@@ -122,16 +120,6 @@ protected void startForm(ItemList list)
state.push(prologue) ;
}
- private void dump()
- {
- Iterator iter = state.iterator() ;
- for ( ; iter.hasNext() ; )
- {
- Prologue p = iter.next() ;
- System.out.println(" Prologue: "+p.getBaseURI()) ;
- }
- }
-
@Override
protected void finishForm(ItemList list)
{
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterExpr.java b/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterExpr.java
index 0a6a5cba741..bec25457cfe 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterExpr.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterExpr.java
@@ -71,16 +71,6 @@ public static void output(IndentedWriter out, ExprList exprs, boolean withTag, b
out.print(")") ;
}
- private static void outputTail(IndentedWriter out, ExprList exprs, SerializationContext sCxt)
- {
- for ( int i = 0 ; i < exprs.size() ; i++ )
- {
- out.print(" ") ;
- output(out, exprs.get(i), sCxt) ;
- }
- out.print(")") ;
- }
-
public static void output(IndentedWriter out, Expr expr, SerializationContext sCxt)
{
FmtExprPrefixVisitor fmt = new FmtExprPrefixVisitor(out, sCxt) ;
@@ -194,13 +184,5 @@ public void visit(ExprAggregator eAgg)
@Override
public void finishVisit() { out.flush() ; }
-
- private void endLine()
- {
- if ( ONELINE )
- out.print(' ') ;
- else
- out.println() ;
- }
}
}
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementGroup.java b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementGroup.java
index 6e126b1b8e8..6c0b18e6318 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementGroup.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/ElementGroup.java
@@ -73,7 +73,6 @@ private ElementTriplesBlock pushBGP()
return bgp ;
}
- private void setTop(Element el) { elements.set(elements.size()-1, el) ; }
private Element top() { return elements.get(elements.size()-1) ; }
public int mark() { return elements.size() ; }
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/RecursiveElementVisitor.java b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/RecursiveElementVisitor.java
index cdda2ce2cee..805a9f86626 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/RecursiveElementVisitor.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/RecursiveElementVisitor.java
@@ -101,8 +101,6 @@ public void startElement(ElementPathBlock el) {}
// ----
- private RecursiveElementVisitor() { this.visitor = new ElementVisitorBase() ; }
-
public RecursiveElementVisitor(ElementVisitor visitor) { this.visitor = visitor ; }
// Visitor pattern on Elements
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/util/Closure.java b/jena-arq/src/main/java/org/apache/jena/sparql/util/Closure.java
index 71254273ff5..f72c7d462c7 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/util/Closure.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/util/Closure.java
@@ -195,15 +195,7 @@ private static void closureNoTest(Resource r,
}
- private static String dbg_string(Collection> s)
- {
- String tmp = "" ;
- for ( Object value : s )
- {
- tmp = tmp + " " + value.toString();
- }
- return tmp ;
- }
+
// Defines the bNode closure
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/util/NodeFactoryExtra.java b/jena-arq/src/main/java/org/apache/jena/sparql/util/NodeFactoryExtra.java
index fa60fd5440a..ceef120a445 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/util/NodeFactoryExtra.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/util/NodeFactoryExtra.java
@@ -27,7 +27,6 @@
import org.apache.jena.graph.Node ;
import org.apache.jena.graph.NodeFactory ;
import org.apache.jena.graph.impl.LiteralLabel ;
-import org.apache.jena.query.QueryParseException ;
import org.apache.jena.riot.RiotException ;
import org.apache.jena.riot.system.PrefixMap ;
import org.apache.jena.riot.system.PrefixMapFactory ;
@@ -89,11 +88,6 @@ public static Node parseNode(String nodeString, PrefixMap pmap)
return node ;
}
- private static QueryParseException makeException(String msg, int line, int column)
- {
- return new QueryParseException(msg, line, column) ;
- }
-
/** Create a literal Node, when the datatype, if given, is a string */
public static Node createLiteralNode(String lex, String lang, String datatypeURI)
{
diff --git a/jena-arq/src/test/java/org/apache/jena/atlas/data/TestSortedDataBag.java b/jena-arq/src/test/java/org/apache/jena/atlas/data/TestSortedDataBag.java
index 818cd7a083e..11df062450a 100644
--- a/jena-arq/src/test/java/org/apache/jena/atlas/data/TestSortedDataBag.java
+++ b/jena-arq/src/test/java/org/apache/jena/atlas/data/TestSortedDataBag.java
@@ -33,11 +33,9 @@
import org.apache.jena.graph.NodeFactory ;
import org.junit.Test ;
import org.apache.jena.query.Query ;
-import org.apache.jena.query.QueryCancelledException ;
import org.apache.jena.query.SortCondition ;
import org.apache.jena.riot.system.SerializationFactoryFinder ;
import org.apache.jena.sparql.core.Var ;
-import org.apache.jena.sparql.engine.QueryIterator ;
import org.apache.jena.sparql.engine.binding.Binding ;
import org.apache.jena.sparql.engine.binding.BindingComparator ;
import org.apache.jena.sparql.engine.binding.BindingFactory ;
@@ -211,17 +209,5 @@ private String randomString(int length)
}
return builder.toString();
}
-
- private void getNextAndExpectException(QueryIterator iter)
- {
- try{
- iter.hasNext();
- fail("Expected an exception here");
- }catch(QueryCancelledException e){
- // expected
- }catch(Exception e){
- fail("Unexpected exception");
- }
- }
}
diff --git a/jena-arq/src/test/java/org/apache/jena/common/TestIsoMatcher.java b/jena-arq/src/test/java/org/apache/jena/common/TestIsoMatcher.java
index a9554321262..667dcff3e89 100644
--- a/jena-arq/src/test/java/org/apache/jena/common/TestIsoMatcher.java
+++ b/jena-arq/src/test/java/org/apache/jena/common/TestIsoMatcher.java
@@ -228,12 +228,6 @@ private void testDSG(String s1, String s2, boolean iso) {
testDSG$(s2, s1, iso) ;
}
- private void testQuads(String s1, String s2, boolean iso) {
- //XXX
-// testDSG$(s1, s2, iso) ;
-// testDSG$(s2, s1, iso) ;
- }
-
private void testDSG$(String s1, String s2, boolean iso) {
s1 = "(dataset "+s1+")" ;
s2 = "(dataset "+s2+")" ;
diff --git a/jena-arq/src/test/java/org/apache/jena/query/TestParameterizedSparqlString.java b/jena-arq/src/test/java/org/apache/jena/query/TestParameterizedSparqlString.java
index 250437d2dcf..b110ca6c5c2 100644
--- a/jena-arq/src/test/java/org/apache/jena/query/TestParameterizedSparqlString.java
+++ b/jena-arq/src/test/java/org/apache/jena/query/TestParameterizedSparqlString.java
@@ -66,10 +66,6 @@ private Query testAsQuery(ParameterizedSparqlString query) {
return query.asQuery();
}
- private UpdateRequest testAsUpdate(ParameterizedSparqlString update) {
- return update.asUpdate();
- }
-
@Test
public void test_param_string_constructor_1() {
// Test empty constructor
diff --git a/jena-arq/src/test/java/org/apache/jena/riot/TestReadData.java b/jena-arq/src/test/java/org/apache/jena/riot/TestReadData.java
index e503f649846..343dfe7ae98 100644
--- a/jena-arq/src/test/java/org/apache/jena/riot/TestReadData.java
+++ b/jena-arq/src/test/java/org/apache/jena/riot/TestReadData.java
@@ -26,7 +26,6 @@
import org.apache.jena.graph.Graph ;
import org.apache.jena.query.Dataset ;
import org.apache.jena.query.DatasetFactory ;
-import org.apache.jena.rdf.model.Model ;
import org.apache.jena.riot.system.ErrorHandler ;
import org.apache.jena.riot.system.ErrorHandlerFactory ;
import org.apache.jena.sparql.core.DatasetGraph ;
@@ -163,11 +162,6 @@ private static void read_stream(String filename, Lang lang) throws IOException
RDFDataMgr.read(ds1, in1, null, lang) ;
}
}
-
- private static Model loadModel(String uri)
- {
- return RDFDataMgr.loadModel(filename(uri)) ;
- }
}
diff --git a/jena-arq/src/test/java/org/apache/jena/riot/tokens/TestTokenizer.java b/jena-arq/src/test/java/org/apache/jena/riot/tokens/TestTokenizer.java
index 8c7886a07ae..e6d4eafbefa 100644
--- a/jena-arq/src/test/java/org/apache/jena/riot/tokens/TestTokenizer.java
+++ b/jena-arq/src/test/java/org/apache/jena/riot/tokens/TestTokenizer.java
@@ -67,17 +67,6 @@ private static Token tokenizeAndTestExact(String input, TokenType tokenType, Str
return token ;
}
- private static Token tokenizeAndTestExact(String input, TokenType tokenType, String tokenImage1,
- String tokenImage2, Token subToken1, Token subToken2) {
- Token token = tokenFor(input) ;
- assertEquals(tokenType, token.getType()) ;
- assertEquals(tokenImage1, token.getImage()) ;
- assertEquals(tokenImage2, token.getImage2()) ;
- assertEquals(subToken1, token.getSubToken1()) ;
- assertEquals(subToken2, token.getSubToken2()) ;
- return token ;
- }
-
private static Tokenizer tokenizeAndTestFirst(String input, TokenType tokenType, String tokenImage) {
return tokenizeAndTestFirst(input, tokenType, tokenImage, null) ;
}
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/ARQTestSuite.java b/jena-arq/src/test/java/org/apache/jena/sparql/ARQTestSuite.java
index 5807000d6ee..56722cdea37 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/ARQTestSuite.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/ARQTestSuite.java
@@ -25,8 +25,6 @@
import org.apache.jena.common.TC_Common ;
import org.apache.jena.query.ARQ ;
import org.apache.jena.riot.TC_Riot ;
-import org.apache.jena.sparql.engine.main.QueryEngineMain ;
-import org.apache.jena.sparql.engine.ref.QueryEngineRef ;
import org.apache.jena.sparql.expr.E_Function ;
import org.apache.jena.sparql.expr.NodeValue ;
import org.apache.jena.web.TS_Web ;
@@ -70,12 +68,6 @@ static public TestSuite suite()
ts.addTest(TC_DAWG.suite()) ;
//ts.addTest(TC_SPARQL11.suite()) ;
- // Fiddle around with the config if necessary
- if ( false )
- {
- QueryEngineMain.unregister() ;
- QueryEngineRef.register() ;
- }
return ts ;
}
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/api/TestAPI.java b/jena-arq/src/test/java/org/apache/jena/sparql/api/TestAPI.java
index 370507c945a..4d2f950df4b 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/api/TestAPI.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/api/TestAPI.java
@@ -305,13 +305,6 @@ private QueryExecution makeQExec(String queryString)
return qExec ;
}
- private int queryAndCount(String queryString)
- {
- QueryExecution qExec = makeQExec(queryString) ;
- return queryAndCount(qExec) ;
- }
-
-
private int queryAndCount(QueryExecution qExec)
{
try {
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestExpressions.java b/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestExpressions.java
index 05c55fd4188..d7f9ccf3cd7 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestExpressions.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestExpressions.java
@@ -136,7 +136,7 @@ public class TestExpressions
@Test public void testBoolean_17() { testBoolean("2 > 3", 2 > 3) ; }
@Test public void testBoolean_18() { testBoolean("(2 < 3) && (3<4)", (2 < 3) && (3<4)) ; }
@Test public void testBoolean_19() { testBoolean("(2 < 3) && (3>=4)", (2 < 3) && (3>=4)) ; }
- @Test public void testBoolean_20() { testBoolean("(2 < 3) || (3>=4)", (2 < 3) || (3>=4)) ; }
+ @Test public void testBoolean_20() { testBoolean("(2 < 3) || (3>=4)", (2 < 3)) ; }
// ?x is unbound in the next few tests
@Test public void testBoolean_21() { testBoolean("(2 < 3) || ?x > 2", true) ; }
@@ -462,8 +462,7 @@ private static void testNumeric(String string, double d)
private static void testEval(String string)
{
- Expr expr = parse(string) ;
- NodeValue v = expr.eval( BindingFactory.binding(), new FunctionEnvBase()) ;
+ parse(string) ;
}
private static void testBoolean(String string, boolean b)
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestRegex.java b/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestRegex.java
index 547732c97ad..c6dfeea791a 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestRegex.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestRegex.java
@@ -19,21 +19,14 @@
package org.apache.jena.sparql.expr;
import org.apache.jena.atlas.junit.BaseTest ;
-import org.apache.jena.query.ARQ ;
import org.apache.jena.sparql.engine.binding.BindingFactory ;
import org.apache.jena.sparql.expr.E_Regex ;
import org.apache.jena.sparql.expr.Expr ;
import org.apache.jena.sparql.expr.NodeValue ;
-import org.junit.BeforeClass ;
import org.junit.Test ;
public class TestRegex extends BaseTest
{
- @BeforeClass
- public static void beforeClass() {
- if ( false )
- ARQ.getContext().set(ARQ.regexImpl, ARQ.xercesRegex) ;
- }
@Test public void testRegex1() { regexTest("ABC", "ABC", null, true) ; }
@Test public void testRegex2() { regexTest("ABC", "abc", null, false) ; }
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/junit/QueryTest.java b/jena-arq/src/test/java/org/apache/jena/sparql/junit/QueryTest.java
index d92d19a5df6..958f6318369 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/junit/QueryTest.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/junit/QueryTest.java
@@ -39,7 +39,6 @@
import org.apache.jena.sparql.engine.binding.BindingMap ;
import org.apache.jena.sparql.engine.iterator.QueryIterPlainWrapper ;
import org.apache.jena.sparql.expr.nodevalue.NodeFunctions ;
-import org.apache.jena.sparql.resultset.RDFOutput ;
import org.apache.jena.sparql.resultset.ResultSetCompare ;
import org.apache.jena.sparql.resultset.SPARQLResult ;
import org.apache.jena.sparql.util.DatasetUtils ;
@@ -311,41 +310,7 @@ public static boolean resultSetEquivalent(Query query, ResultSetRewindable resul
}
}
- // TEMPORARY
- private boolean checkResultsByModel(Query query, Model expectedModel, ResultSetRewindable results)
- {
- // Fudge - can't cope with ordered results properly. The output writer for ResultSets does nto add rs:index.
-
- results.reset() ;
- Model actualModel = RDFOutput.encodeAsModel(results) ;
- // Tidy the models.
- // Very regretable.
-
- expectedModel.removeAll(null, RDF.type, ResultSetGraphVocab.ResultSet) ;
- expectedModel.removeAll(null, RDF.type, ResultSetGraphVocab.ResultSolution) ;
- expectedModel.removeAll(null, RDF.type, ResultSetGraphVocab.ResultBinding) ;
- expectedModel.removeAll(null, ResultSetGraphVocab.size, (RDFNode)null) ;
- expectedModel.removeAll(null, ResultSetGraphVocab.index, (RDFNode)null) ;
-
- actualModel.removeAll(null, RDF.type, ResultSetGraphVocab.ResultSet) ;
- actualModel.removeAll(null, RDF.type, ResultSetGraphVocab.ResultSolution) ;
- actualModel.removeAll(null, RDF.type, ResultSetGraphVocab.ResultBinding) ;
- actualModel.removeAll(null, ResultSetGraphVocab.size, (RDFNode)null) ;
- actualModel.removeAll(null, ResultSetGraphVocab.index, (RDFNode)null) ;
-
- boolean b = expectedModel.isIsomorphicWith(actualModel) ;
- if ( !b )
- {
- System.out.println("---- Expected") ;
- expectedModel.write(System.out, "TTL") ;
- System.out.println("---- Actual") ;
- actualModel.write(System.out, "TTL") ;
- System.out.println("----");
- }
- return b ;
- }
-
- void runTestConstruct(Query query, QueryExecution qe) throws Exception
+ void runTestConstruct(Query query, QueryExecution qe) throws Exception
{
// Do the query!
Model resultsActual = qe.execConstruct() ;
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/junit/TestSerialization.java b/jena-arq/src/test/java/org/apache/jena/sparql/junit/TestSerialization.java
index 08fcd5ddaa3..0031bec931a 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/junit/TestSerialization.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/junit/TestSerialization.java
@@ -48,11 +48,7 @@ public TestSerialization(String testName, EarlReport earl, TestItem t)
// setTest(testName, queryString) ;
// }
- private void setTest(String testName, EarlReport earl, String _queryString)
- {
- super.setName(testName) ;
- this.queryString = _queryString ;
- }
+
// A serialization test is:
// Read query in.
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/resultset/TestResultSet.java b/jena-arq/src/test/java/org/apache/jena/sparql/resultset/TestResultSet.java
index 46e6796514a..cd2cc9e53ca 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/resultset/TestResultSet.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/resultset/TestResultSet.java
@@ -555,38 +555,9 @@ private ResultSetRewindable make2Rewindable(String var, Node val)
return rsw ;
}
- private ResultSet make(String var1, Node val1, String var2, Node val2 )
- {
- BindingMap b = BindingFactory.create() ;
-
- b.add(Var.alloc(var1), val1) ;
- b.add(Var.alloc(var2), val2) ;
-
- List vars = new ArrayList<>() ;
- vars.add(var1) ;
- vars.add(var2) ;
-
- QueryIterator qIter = QueryIterSingleton.create(b, null) ;
- ResultSet rs = new ResultSetStream(vars, null, qIter) ;
- return rs ;
- }
-
- private ResultSetRewindable makeRewindable(String var1, Node val1, String var2, Node val2 )
- {
- ResultSet rs = make(var1, val1, var2, val2) ;
- ResultSetRewindable rsw = ResultSetFactory.makeRewindable(rs) ;
- return rsw ;
- }
-
private ResultSetPeekable makePeekable(String var, Node val) {
ResultSet rs = make(var, val);
ResultSetPeekable rsp = ResultSetFactory.makePeekable(rs);
return rsp;
}
-
- private ResultSetPeekable make2Peekable(String var1, Node val1, String var2, Node val2) {
- ResultSet rs = make(var1, val1, var2, val2);
- ResultSetPeekable rsp = ResultSetFactory.makePeekable(rs);
- return rsp;
- }
}
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/syntax/TestSSE_Basic.java b/jena-arq/src/test/java/org/apache/jena/sparql/syntax/TestSSE_Basic.java
index 3bb6bb018ef..eb2d70c1221 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/syntax/TestSSE_Basic.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/syntax/TestSSE_Basic.java
@@ -321,16 +321,6 @@ private void testList(String str, Item item1, Item item2)
assertEquals(item.getList().get(1), item2) ;
}
- private void testList(String str, Item item1, Item item2, Item item3)
- {
- Item item = parse(str) ;
- assertTrue(item.isList()) ;
- assertEquals(3, item.getList().size()) ;
- assertEquals(item.getList().get(0), item1) ;
- assertEquals(item.getList().get(1), item2) ;
- assertEquals(item.getList().get(2), item3) ;
- }
-
private void testItem(String str, Item result)
{
Item item = parse(str) ;
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/util/TestDateTimeParsing.java b/jena-arq/src/test/java/org/apache/jena/sparql/util/TestDateTimeParsing.java
index 96bf19dc54b..902d9bffe96 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/util/TestDateTimeParsing.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/util/TestDateTimeParsing.java
@@ -219,16 +219,6 @@ private static void dateTest(String str)
assertEquals(str, dt.toString()) ;
}
- private static void dateBad(String str)
- {
- try {
- DateTimeStruct dt = DateTimeStruct.parseDateTime(str) ;
- fail("No exception; "+str) ;
- }
- catch (DateTimeStruct.DateTimeParseException ex) {}
- }
-
-
private static void check(DateTimeStruct dt)
{
assertTrue(dt.neg == null || dt.neg.equals("-")) ;
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/util/TestList.java b/jena-arq/src/test/java/org/apache/jena/sparql/util/TestList.java
index 61af2e91a7a..c409f32b2ee 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/util/TestList.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/util/TestList.java
@@ -179,8 +179,6 @@ public class TestList extends BaseTest
}
// --------
- private static GNode gnode(Node n) { return new GNode(Factory.createDefaultGraph(), n) ; }
-
private static GNode parse(String str)
{
Model m = ModelFactory.createDefaultModel() ;
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/io/BlockUTF8.java b/jena-base/src/main/java/org/apache/jena/atlas/io/BlockUTF8.java
index 2d5560b50fc..d1e00978ed0 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/io/BlockUTF8.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/io/BlockUTF8.java
@@ -22,8 +22,6 @@
import java.nio.ByteBuffer ;
import java.nio.CharBuffer ;
-import org.apache.jena.atlas.lib.NotImplemented ;
-
/**
* Convert between bytes and chars, UTF-8 only.
*
@@ -155,11 +153,6 @@ else if ( (x & 0xF8) == 0xF0 )
}
}
- private static void toCharsArray(byte[] bytes, char[] chars)
- {
- throw new NotImplemented() ;
- }
-
private static void fromCharsBuffer(CharBuffer cb, ByteBuffer bb)
{
// CharBuffers are CharSequences but charAt(i) adds a layer of work.
@@ -228,11 +221,6 @@ else if ( ch <= 0x7FFFFFFF )
//int bytesFinish = bb.position() ;
}
- private static void fromCharsArray(char[] array, byte[] array2)
- {
- throw new NotImplemented() ;
- }
-
public static void fromChars(CharSequence cs, ByteBuffer bb)
{
fromChars(CharBuffer.wrap(cs), bb) ;
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/io/InStreamUTF8.java b/jena-base/src/main/java/org/apache/jena/atlas/io/InStreamUTF8.java
index 590388253ca..17b6883b518 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/io/InStreamUTF8.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/io/InStreamUTF8.java
@@ -226,13 +226,6 @@ private static int readMultiBytes(InputStreamBuffered input, int start, int len)
return x ;
}
- private static void p(int ch)
- {
- System.out.printf(" %02X", ch) ;
- if ( ch == -1 )
- System.out.println();
- }
-
public static String decode(byte[] bytes)
{
try
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/io/IndentedWriter.java b/jena-base/src/main/java/org/apache/jena/atlas/io/IndentedWriter.java
index 51414f98ce9..3d7faf2900b 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/io/IndentedWriter.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/io/IndentedWriter.java
@@ -61,8 +61,6 @@ public class IndentedWriter extends AWriterBase implements AWriter, Closeable
protected boolean flatMode = false ;
private boolean flushOnNewline = false ;
- private IndentedWriter() { this(System.out, false) ; }
-
/** Construct a UTF8 IndentedWriter around an OutputStream */
public IndentedWriter(OutputStream outStream) { this(outStream, false) ; }
@@ -94,12 +92,6 @@ public void print(String str)
{
if ( str == null )
str = "null" ;
- if ( false )
- {
- // Don't check for embedded newlines.
- write$(str) ;
- return ;
- }
for ( int i = 0 ; i < str.length() ; i++ )
printOneChar(str.charAt(i)) ;
}
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/io/PeekReader.java b/jena-base/src/main/java/org/apache/jena/atlas/io/PeekReader.java
index 31076b0ed06..79e0d8c9939 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/io/PeekReader.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/io/PeekReader.java
@@ -79,16 +79,9 @@ public static PeekReader makeUTF8(InputStream in) {
// This is the best route to make a PeekReader because it avoids
// chances of wrong charset for a Reader say.
PeekReader pr ;
- if ( true ) {
- Reader r = IO.asUTF8(in) ;
- // This adds reader-level buffering
- pr = make(r) ;
- } else {
- // This is a bit slower - reason unknown.
- InputStreamBuffered in2 = new InputStreamBuffered(in) ;
- CharStream r = new InStreamUTF8(in2) ;
- pr = new PeekReader(r) ;
- }
+ Reader r = IO.asUTF8(in) ;
+ // This adds reader-level buffering
+ pr = make(r) ;
// Skip BOM.
int ch = pr.peekChar() ;
if ( ch == Chars.BOM )
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/lib/Bytes.java b/jena-base/src/main/java/org/apache/jena/atlas/lib/Bytes.java
index 789aeeb9f70..6f5fa97ab2f 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/lib/Bytes.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/lib/Bytes.java
@@ -205,11 +205,6 @@ static private Long assembleLong(byte b7, byte b6, byte b5, byte b4, byte b3, by
(((long)b0 & 0xFF) << 0) ;
}
- private static byte byte3(int x) { return (byte)(x >> 24); }
- private static byte byte2(int x) { return (byte)(x >> 16); }
- private static byte byte1(int x) { return (byte)(x >> 8); }
- private static byte byte0(int x) { return (byte)(x >> 0); }
-
/** Return the UTF-8 bytes for a string */
public static byte[] string2bytes(String x) {
try {
diff --git a/jena-core/src/main/java/org/apache/jena/mem/HashCommon.java b/jena-core/src/main/java/org/apache/jena/mem/HashCommon.java
index ba03aea18f9..4fa38406eed 100644
--- a/jena-core/src/main/java/org/apache/jena/mem/HashCommon.java
+++ b/jena-core/src/main/java/org/apache/jena/mem/HashCommon.java
@@ -260,24 +260,12 @@ protected Key removeFrom( int here )
}
}
}
-
- void showkeys()
- {
- if (false)
- {
- System.err.print( ">> KEYS:" );
- for (int i = 0; i < capacity; i += 1)
- if (keys[i] != null) System.err.print( " " + initialIndexFor( keys[i] ) + "@" + i + "::" + keys[i] );
- System.err.println();
- }
- }
public ExtendedIterator keyIterator()
{ return keyIterator( NotifyEmpty.ignore ); }
public ExtendedIterator keyIterator( final NotifyEmpty container )
{
- showkeys();
final List movedKeys = new ArrayList<>();
ExtendedIterator basic = new BasicKeyIterator( changes, container, movedKeys );
ExtendedIterator leftovers = new MovedKeysIterator( changes, container, movedKeys );
@@ -372,7 +360,6 @@ protected BasicKeyIterator( int initialChanges, NotifyEmpty container, List
if (moved != null) movedKeys.add( moved );
if (size == 0) container.emptied();
if (size < 0) throw new BrokenException( "BROKEN" );
- showkeys();
}
}
}
diff --git a/jena-core/src/main/java/org/apache/jena/mem/NodeToTriplesMapMem.java b/jena-core/src/main/java/org/apache/jena/mem/NodeToTriplesMapMem.java
index 107cf3badee..23546bb26b7 100644
--- a/jena-core/src/main/java/org/apache/jena/mem/NodeToTriplesMapMem.java
+++ b/jena-core/src/main/java/org/apache/jena/mem/NodeToTriplesMapMem.java
@@ -26,7 +26,6 @@
import org.apache.jena.graph.Node ;
import org.apache.jena.graph.Triple ;
import org.apache.jena.graph.Triple.Field ;
-import org.apache.jena.shared.JenaException ;
import org.apache.jena.util.iterator.ExtendedIterator ;
import org.apache.jena.util.iterator.NullIterator ;
@@ -97,7 +96,7 @@ public NotifyMe( Object key )
// TODO fix the way this interacts (badly) with iteration and CMEs.
@Override
public void emptied()
- { if (false) throw new JenaException( "BOOM" ); /* System.err.println( ">> OOPS" ); */ bunchMap.remove( key ); }
+ { bunchMap.remove( key ); }
}
/**
diff --git a/jena-core/src/main/java/org/apache/jena/n3/N3JenaWriterCommon.java b/jena-core/src/main/java/org/apache/jena/n3/N3JenaWriterCommon.java
index f3a9d5c0a0e..1d5ca6ced03 100644
--- a/jena-core/src/main/java/org/apache/jena/n3/N3JenaWriterCommon.java
+++ b/jena-core/src/main/java/org/apache/jena/n3/N3JenaWriterCommon.java
@@ -20,8 +20,6 @@
import java.io.*;
import java.math.BigDecimal;
-import java.net.URI;
-import java.net.URISyntaxException;
import java.text.CharacterIterator;
import java.text.StringCharacterIterator;
import java.util.*;
@@ -970,11 +968,4 @@ protected String localPropName(String propName)
propName = propName.substring(N3JenaWriter.propBase.length()) ;
return propName ;
}
-
- private boolean isOpaque(String uri)
- {
- try {
- return new URI(uri).isOpaque() ;
- } catch (URISyntaxException ex) { return true ; }
- }
}
diff --git a/jena-core/src/main/java/org/apache/jena/n3/turtle/Turtle2NTriples.java b/jena-core/src/main/java/org/apache/jena/n3/turtle/Turtle2NTriples.java
index b9312bb9d0f..b32ae641aec 100644
--- a/jena-core/src/main/java/org/apache/jena/n3/turtle/Turtle2NTriples.java
+++ b/jena-core/src/main/java/org/apache/jena/n3/turtle/Turtle2NTriples.java
@@ -19,9 +19,6 @@
package org.apache.jena.n3.turtle;
import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.util.Locale ;
-
import org.apache.jena.graph.Node ;
import org.apache.jena.graph.Triple ;
@@ -109,33 +106,6 @@ public void prefix(int line, int col, String prefix, String iri)
static boolean applyUnicodeEscapes = true ;
- private static void writeString(String s, PrintWriter writer) {
-
- for (int i = 0; i < s.length(); i++) {
- char c = s.charAt(i);
- if (c == '\\' || c == '"') {
- writer.print('\\');
- writer.print(c);
- } else if (c == '\n') {
- writer.print("\\n");
- } else if (c == '\r') {
- writer.print("\\r");
- } else if (c == '\t') {
- writer.print("\\t");
- } else if (c >= 32 && c < 127) {
- writer.print(c);
- } else {
- String hexstr = Integer.toHexString(c).toUpperCase(Locale.ENGLISH);
- int pad = 4 - hexstr.length();
- writer.print("\\u");
- for (; pad > 0; pad--)
- writer.print("0");
- writer.print(hexstr);
- }
- }
- }
-
-
public void outputEsc(String s)
{
int len = s.length() ;
diff --git a/jena-core/src/main/java/org/apache/jena/n3/turtle/parser/TurtleParser.java b/jena-core/src/main/java/org/apache/jena/n3/turtle/parser/TurtleParser.java
index 5cfa4c02b70..29c64439c3f 100644
--- a/jena-core/src/main/java/org/apache/jena/n3/turtle/parser/TurtleParser.java
+++ b/jena-core/src/main/java/org/apache/jena/n3/turtle/parser/TurtleParser.java
@@ -17,909 +17,903 @@
* limitations under the License.
*/
-package org.apache.jena.n3.turtle.parser ;
+package org.apache.jena.n3.turtle.parser;
-import org.apache.jena.graph.* ;
-import org.apache.jena.n3.turtle.ParserBase ;
+import org.apache.jena.graph.*;
+import org.apache.jena.n3.turtle.ParserBase;
public class TurtleParser extends ParserBase implements TurtleParserConstants {
-// --- Entry point
- final public void parse() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case BOM:
- jj_consume_token(BOM);
- break;
- default:
- jj_la1[0] = jj_gen;
-
- }
- label_1:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PREFIX:
- case BASE:
- case TRUE:
- case FALSE:
- case INTEGER:
- case DECIMAL:
- case DOUBLE:
- case STRING_LITERAL1:
- case STRING_LITERAL2:
- case STRING_LITERAL_LONG1:
- case STRING_LITERAL_LONG2:
- case IRIref:
- case PNAME_NS:
- case PNAME_LN:
- case BLANK_NODE_LABEL:
- case VAR:
- case LPAREN:
- case NIL:
- case LBRACE:
- case LBRACKET:
- case ANON:
-
- break;
- default:
- jj_la1[1] = jj_gen;
- break label_1;
- }
- Statement();
- }
- jj_consume_token(0);
- }
-
- final public void Statement() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PREFIX:
- case BASE:
- Directive();
- break;
- case TRUE:
- case FALSE:
- case INTEGER:
- case DECIMAL:
- case DOUBLE:
- case STRING_LITERAL1:
- case STRING_LITERAL2:
- case STRING_LITERAL_LONG1:
- case STRING_LITERAL_LONG2:
- case IRIref:
- case PNAME_NS:
- case PNAME_LN:
- case BLANK_NODE_LABEL:
- case VAR:
- case LPAREN:
- case NIL:
- case LBRACE:
- case LBRACKET:
- case ANON:
- TriplesSameSubject();
- break;
- default:
- jj_la1[2] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- jj_consume_token(DOT);
- }
-
- final public void Directive() throws ParseException {
- Token t ; String iri ;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PREFIX:
- jj_consume_token(PREFIX);
- t = jj_consume_token(PNAME_NS);
- iri = IRI_REF();
- String s = fixupPrefix(t.image, t.beginLine, t.beginColumn) ;
- setPrefix(t.beginLine, t.beginColumn, s, iri) ;
- break;
- case BASE:
- t = jj_consume_token(BASE);
- iri = IRI_REF();
- setBase(iri, t.beginLine, t.beginColumn) ;
- break;
- default:
- jj_la1[3] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
-
-// ---- TRIPLES
- final public void TriplesSameSubject() throws ParseException {
- Node s ;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case TRUE:
- case FALSE:
- case INTEGER:
- case DECIMAL:
- case DOUBLE:
- case STRING_LITERAL1:
- case STRING_LITERAL2:
- case STRING_LITERAL_LONG1:
- case STRING_LITERAL_LONG2:
- case IRIref:
- case PNAME_NS:
- case PNAME_LN:
- case BLANK_NODE_LABEL:
- case VAR:
- case NIL:
- case LBRACE:
- case ANON:
- s = VarOrTerm();
- PropertyListNotEmpty(s);
- break;
- case LPAREN:
- case LBRACKET:
- // Any of the triple generating syntax elements
- s = TriplesNode();
- PropertyList(s);
- break;
- default:
- jj_la1[4] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
-
- final public void PropertyList(Node s) throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case KW_A:
- case IRIref:
- case PNAME_NS:
- case PNAME_LN:
- case EQ:
- case ARROW:
- PropertyListNotEmpty(s);
- break;
- default:
- jj_la1[5] = jj_gen;
-
- }
- }
-
-// Non-recursive for Turtle long PropertyList tests
- final public void PropertyListNotEmpty(Node s) throws ParseException {
- Node p ;
- p = Verb();
- ObjectList(s, p);
- label_2:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case SEMICOLON:
-
- break;
- default:
- jj_la1[6] = jj_gen;
- break label_2;
- }
- jj_consume_token(SEMICOLON);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case KW_A:
- case IRIref:
- case PNAME_NS:
- case PNAME_LN:
- case EQ:
- case ARROW:
- p = Verb();
- ObjectList(s, p);
- break;
- default:
- jj_la1[7] = jj_gen;
-
- }
- }
- }
-
-// Non-recursive for Turtle long PropertyList tests
- final public void ObjectList(Node s, Node p) throws ParseException {
- Node o ;
- Object(s, p);
- label_3:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case COMMA:
-
- break;
- default:
- jj_la1[8] = jj_gen;
- break label_3;
- }
- jj_consume_token(COMMA);
- Object(s, p);
- }
- }
-
- final public void Object(Node s, Node p) throws ParseException {
- Node o ;
- o = GraphNode();
- Triple t = new Triple(s,p,o) ;
- emitTriple(token.beginLine, token.beginColumn, t) ;
- }
-
- final public Node Verb() throws ParseException {
- Node p ; String iri ;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IRIref:
- case PNAME_NS:
- case PNAME_LN:
- iri = IRIref();
- p = createNode(iri) ;
- break;
- case KW_A:
- jj_consume_token(KW_A);
- p = nRDFtype ;
- break;
- case EQ:
- jj_consume_token(EQ);
- p = nOwlSameAs ;
- if ( strictTurtle )
- throwParseException("= (owl:sameAs) not legal in Turtle",
- token.beginLine, token.beginColumn ) ;
- break;
- case ARROW:
- jj_consume_token(ARROW);
- p = nLogImplies ;
- if ( strictTurtle )
- throwParseException("=> (log:implies) not legal in Turtle",
- token.beginLine, token.beginColumn ) ;
- break;
- default:
- jj_la1[9] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return p ;}
- throw new Error("Missing return statement in function");
- }
-
-// -------- Triple expansions
-
-// Anything that can stand in a node slot and which is
-// a number of triples
- final public Node TriplesNode() throws ParseException {
- Node n ;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LPAREN:
- n = Collection();
- {if (true) return n ;}
- break;
- case LBRACKET:
- n = BlankNodePropertyList();
- {if (true) return n ;}
- break;
- default:
- jj_la1[10] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- throw new Error("Missing return statement in function");
- }
-
- final public Node BlankNodePropertyList() throws ParseException {
- jj_consume_token(LBRACKET);
- Node n = createBNode() ;
- PropertyListNotEmpty(n);
- jj_consume_token(RBRACKET);
- {if (true) return n ;}
- throw new Error("Missing return statement in function");
- }
-
-// ------- RDF collections
-
-// Code not as SPARQL/ARQ because of output ordering.
- final public Node Collection() throws ParseException {
- Node listHead = nRDFnil ; Node lastCell = null ; Node n ;
- jj_consume_token(LPAREN);
- label_4:
- while (true) {
- Node cell = createBNode() ;
- if ( listHead == nRDFnil )
- listHead = cell ;
- if ( lastCell != null )
- emitTriple(token.beginLine, token.beginColumn,
- new Triple(lastCell, nRDFrest, cell)) ;
- n = GraphNode();
- emitTriple(token.beginLine, token.beginColumn,
- new Triple(cell, nRDFfirst, n)) ;
- lastCell = cell ;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case TRUE:
- case FALSE:
- case INTEGER:
- case DECIMAL:
- case DOUBLE:
- case STRING_LITERAL1:
- case STRING_LITERAL2:
- case STRING_LITERAL_LONG1:
- case STRING_LITERAL_LONG2:
- case IRIref:
- case PNAME_NS:
- case PNAME_LN:
- case BLANK_NODE_LABEL:
- case VAR:
- case LPAREN:
- case NIL:
- case LBRACE:
- case LBRACKET:
- case ANON:
-
- break;
- default:
- jj_la1[11] = jj_gen;
- break label_4;
- }
- }
- jj_consume_token(RPAREN);
- if ( lastCell != null )
- emitTriple(token.beginLine, token.beginColumn,
- new Triple(lastCell, nRDFrest, nRDFnil)) ;
- {if (true) return listHead ;}
- throw new Error("Missing return statement in function");
- }
-
-// -------- Nodes in a graph pattern or template
- final public Node GraphNode() throws ParseException {
- Node n ;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case TRUE:
- case FALSE:
- case INTEGER:
- case DECIMAL:
- case DOUBLE:
- case STRING_LITERAL1:
- case STRING_LITERAL2:
- case STRING_LITERAL_LONG1:
- case STRING_LITERAL_LONG2:
- case IRIref:
- case PNAME_NS:
- case PNAME_LN:
- case BLANK_NODE_LABEL:
- case VAR:
- case NIL:
- case LBRACE:
- case ANON:
- n = VarOrTerm();
- {if (true) return n ;}
- break;
- case LPAREN:
- case LBRACKET:
- n = TriplesNode();
- {if (true) return n ;}
- break;
- default:
- jj_la1[12] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- throw new Error("Missing return statement in function");
- }
-
- final public Node VarOrTerm() throws ParseException {
- Node n = null ;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case VAR:
- n = Var();
- break;
- case TRUE:
- case FALSE:
- case INTEGER:
- case DECIMAL:
- case DOUBLE:
- case STRING_LITERAL1:
- case STRING_LITERAL2:
- case STRING_LITERAL_LONG1:
- case STRING_LITERAL_LONG2:
- case IRIref:
- case PNAME_NS:
- case PNAME_LN:
- case BLANK_NODE_LABEL:
- case NIL:
- case ANON:
- n = GraphTerm();
- break;
- case LBRACE:
- n = Formula();
- break;
- default:
- jj_la1[13] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return n ;}
- throw new Error("Missing return statement in function");
- }
-
- final public Node Formula() throws ParseException {
- Token t ;
- t = jj_consume_token(LBRACE);
- startFormula(t.beginLine, t.beginColumn) ;
- TriplesSameSubject();
- label_5:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case DOT:
-
- break;
- default:
- jj_la1[14] = jj_gen;
- break label_5;
- }
- jj_consume_token(DOT);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case TRUE:
- case FALSE:
- case INTEGER:
- case DECIMAL:
- case DOUBLE:
- case STRING_LITERAL1:
- case STRING_LITERAL2:
- case STRING_LITERAL_LONG1:
- case STRING_LITERAL_LONG2:
- case IRIref:
- case PNAME_NS:
- case PNAME_LN:
- case BLANK_NODE_LABEL:
- case VAR:
- case LPAREN:
- case NIL:
- case LBRACE:
- case LBRACKET:
- case ANON:
- TriplesSameSubject();
- break;
- default:
- jj_la1[15] = jj_gen;
-
- }
- }
- t = jj_consume_token(RBRACE);
- endFormula(t.beginLine, t.beginColumn) ;
- {if (true) return null ;}
- throw new Error("Missing return statement in function");
- }
-
- final public Node Var() throws ParseException {
- Token t ;
- t = jj_consume_token(VAR);
- {if (true) return createVariable(t.image, t.beginLine, t.beginColumn) ;}
- throw new Error("Missing return statement in function");
- }
-
- final public Node GraphTerm() throws ParseException {
- Node n ; String iri ;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IRIref:
- case PNAME_NS:
- case PNAME_LN:
- iri = IRIref();
- {if (true) return createNode(iri) ;}
- break;
- case STRING_LITERAL1:
- case STRING_LITERAL2:
- case STRING_LITERAL_LONG1:
- case STRING_LITERAL_LONG2:
- n = RDFLiteral();
- {if (true) return n ;}
- break;
- case INTEGER:
- case DECIMAL:
- case DOUBLE:
- // Cleaner sign handling in Turtle.
- n = NumericLiteral();
- {if (true) return n ;}
- break;
- case TRUE:
- case FALSE:
- n = BooleanLiteral();
- {if (true) return n ;}
- break;
- case BLANK_NODE_LABEL:
- case ANON:
- n = BlankNode();
- {if (true) return n ;}
- break;
- case NIL:
- jj_consume_token(NIL);
- {if (true) return nRDFnil ;}
- break;
- default:
- jj_la1[16] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- throw new Error("Missing return statement in function");
- }
-
-// ---- Basic terms
- final public Node NumericLiteral() throws ParseException {
- Token t ;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case INTEGER:
- t = jj_consume_token(INTEGER);
- {if (true) return createLiteralInteger(t.image) ;}
- break;
- case DECIMAL:
- t = jj_consume_token(DECIMAL);
- {if (true) return createLiteralDecimal(t.image) ;}
- break;
- case DOUBLE:
- t = jj_consume_token(DOUBLE);
- {if (true) return createLiteralDouble(t.image) ;}
- break;
- default:
- jj_la1[17] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- throw new Error("Missing return statement in function");
- }
-
- final public Node RDFLiteral() throws ParseException {
- Token t ; String lex = null ;
- lex = String();
- String lang = null ; String dt = null ;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PREFIX:
- case BASE:
- case LANGTAG:
- case DATATYPE:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PREFIX:
- case BASE:
- case LANGTAG:
- lang = Langtag();
- break;
- case DATATYPE:
- jj_consume_token(DATATYPE);
- dt = IRIref();
- break;
- default:
- jj_la1[18] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- break;
- default:
- jj_la1[19] = jj_gen;
-
- }
- {if (true) return createLiteral(lex, lang, dt) ;}
- throw new Error("Missing return statement in function");
- }
-
- final public String Langtag() throws ParseException {
- Token t ;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LANGTAG:
- t = jj_consume_token(LANGTAG);
- break;
- case PREFIX:
- case BASE:
- t = AnyDirective();
- break;
- default:
- jj_la1[20] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- String lang = stripChars(t.image, 1) ; {if (true) return lang ;}
- throw new Error("Missing return statement in function");
- }
-
- final public Token AnyDirective() throws ParseException {
- Token t ;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PREFIX:
- t = jj_consume_token(PREFIX);
- break;
- case BASE:
- t = jj_consume_token(BASE);
- break;
- default:
- jj_la1[21] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- {if (true) return t ;}
- throw new Error("Missing return statement in function");
- }
-
- final public Node BooleanLiteral() throws ParseException {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case TRUE:
- jj_consume_token(TRUE);
- {if (true) return XSD_TRUE ;}
- break;
- case FALSE:
- jj_consume_token(FALSE);
- {if (true) return XSD_FALSE ;}
- break;
- default:
- jj_la1[22] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- throw new Error("Missing return statement in function");
- }
-
- final public String String() throws ParseException {
- Token t ; String lex ;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case STRING_LITERAL1:
- t = jj_consume_token(STRING_LITERAL1);
- lex = stripQuotes(t.image) ;
- break;
- case STRING_LITERAL2:
- t = jj_consume_token(STRING_LITERAL2);
- lex = stripQuotes(t.image) ;
- break;
- case STRING_LITERAL_LONG1:
- t = jj_consume_token(STRING_LITERAL_LONG1);
- lex = stripQuotes3(t.image) ;
- break;
- case STRING_LITERAL_LONG2:
- t = jj_consume_token(STRING_LITERAL_LONG2);
- lex = stripQuotes3(t.image) ;
- break;
- default:
- jj_la1[23] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- lex = unescapeStr(lex, t.beginLine, t.beginColumn) ;
- {if (true) return lex ;}
- throw new Error("Missing return statement in function");
- }
-
- final public String IRIref() throws ParseException {
- String iri ;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IRIref:
- iri = IRI_REF();
- {if (true) return iri ;}
- break;
- case PNAME_NS:
- case PNAME_LN:
- iri = PrefixedName();
- {if (true) return iri ;}
- break;
- default:
- jj_la1[24] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- throw new Error("Missing return statement in function");
- }
-
- final public String PrefixedName() throws ParseException {
- Token t ;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PNAME_LN:
- t = jj_consume_token(PNAME_LN);
- {if (true) return resolvePName(t.image, t.beginLine, t.beginColumn) ;}
- break;
- case PNAME_NS:
- t = jj_consume_token(PNAME_NS);
- {if (true) return resolvePName(t.image, t.beginLine, t.beginColumn) ;}
- break;
- default:
- jj_la1[25] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- throw new Error("Missing return statement in function");
- }
-
- final public Node BlankNode() throws ParseException {
- Token t = null ;
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case BLANK_NODE_LABEL:
- t = jj_consume_token(BLANK_NODE_LABEL);
- {if (true) return createBNode(t.image, t.beginLine, t.beginColumn) ;}
- break;
- case ANON:
- jj_consume_token(ANON);
- {if (true) return createBNode() ;}
- break;
- default:
- jj_la1[26] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- throw new Error("Missing return statement in function");
- }
-
- final public String IRI_REF() throws ParseException {
- Token t ;
- t = jj_consume_token(IRIref);
- {if (true) return resolveQuotedIRI(t.image, t.beginLine, t.beginColumn) ;}
- throw new Error("Missing return statement in function");
- }
-
- /** Generated Token Manager. */
- public TurtleParserTokenManager token_source;
- JavaCharStream jj_input_stream;
- /** Current token. */
- public Token token;
- /** Next token. */
- public Token jj_nt;
- private int jj_ntk;
- private int jj_gen;
- final private int[] jj_la1 = new int[27];
- static private int[] jj_la1_0;
- static private int[] jj_la1_1;
- static private int[] jj_la1_2;
- static {
- jj_la1_init_0();
- jj_la1_init_1();
- jj_la1_init_2();
- }
- private static void jj_la1_init_0() {
- jj_la1_0 = new int[] {0x0,0xde1fc000,0xde1fc000,0xc000,0xde1f0000,0xc0002000,0x0,0xc0002000,0x0,0xc0002000,0x0,0xde1f0000,0xde1f0000,0xde1f0000,0x0,0xde1f0000,0xde1f0000,0x1c0000,0xc000,0xc000,0xc000,0xc000,0x30000,0x1e000000,0xc0000000,0x80000000,0x0,};
- }
- private static void jj_la1_init_1() {
- jj_la1_1 = new int[] {0x4000000,0x2b47,0x2b47,0x0,0x2b47,0x60001,0x4000,0x60001,0x8000,0x60001,0x840,0x2b47,0x2b47,0x2307,0x10000,0x2b47,0x2103,0x0,0x8000008,0x8000008,0x8,0x0,0x0,0x0,0x1,0x1,0x2002,};
- }
- private static void jj_la1_init_2() {
- jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
- }
-
- /** Constructor with InputStream. */
- public TurtleParser(java.io.InputStream stream) {
- this(stream, null);
- }
- /** Constructor with InputStream and supplied encoding */
- public TurtleParser(java.io.InputStream stream, String encoding) {
- try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
- token_source = new TurtleParserTokenManager(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 27; i++) jj_la1[i] = -1;
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.InputStream stream) {
- ReInit(stream, null);
- }
- /** Reinitialise. */
- public void ReInit(java.io.InputStream stream, String encoding) {
- try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
- token_source.ReInit(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 27; i++) jj_la1[i] = -1;
- }
-
- /** Constructor. */
- public TurtleParser(java.io.Reader stream) {
- jj_input_stream = new JavaCharStream(stream, 1, 1);
- token_source = new TurtleParserTokenManager(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 27; i++) jj_la1[i] = -1;
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.Reader stream) {
- jj_input_stream.ReInit(stream, 1, 1);
- token_source.ReInit(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 27; i++) jj_la1[i] = -1;
- }
-
- /** Constructor with generated Token Manager. */
- public TurtleParser(TurtleParserTokenManager tm) {
- token_source = tm;
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 27; i++) jj_la1[i] = -1;
- }
-
- /** Reinitialise. */
- public void ReInit(TurtleParserTokenManager tm) {
- token_source = tm;
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 27; i++) jj_la1[i] = -1;
- }
-
- private Token jj_consume_token(int kind) throws ParseException {
- Token oldToken;
- if ((oldToken = token).next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- if (token.kind == kind) {
- jj_gen++;
- return token;
- }
- token = oldToken;
- jj_kind = kind;
- throw generateParseException();
- }
-
-
-/** Get the next Token. */
- final public Token getNextToken() {
- if (token.next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- jj_gen++;
- return token;
- }
-
-/** Get the specific Token. */
- final public Token getToken(int index) {
- Token t = token;
- for (int i = 0; i < index; i++) {
- if (t.next != null) t = t.next;
- else t = t.next = token_source.getNextToken();
- }
- return t;
- }
-
- private int jj_ntk() {
- if ((jj_nt=token.next) == null)
- return (jj_ntk = (token.next=token_source.getNextToken()).kind);
- else
- return (jj_ntk = jj_nt.kind);
- }
-
- private java.util.List jj_expentries = new java.util.ArrayList<>();
- private int[] jj_expentry;
- private int jj_kind = -1;
-
- /** Generate ParseException. */
- public ParseException generateParseException() {
- jj_expentries.clear();
- boolean[] la1tokens = new boolean[68];
- if (jj_kind >= 0) {
- la1tokens[jj_kind] = true;
- jj_kind = -1;
- }
- for (int i = 0; i < 27; i++) {
- if (jj_la1[i] == jj_gen) {
- for (int j = 0; j < 32; j++) {
- if ((jj_la1_0[i] & (1< (log:implies) not legal in Turtle",
+ token.beginLine, token.beginColumn);
+ break;
+ default:
+ jj_la1[9] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ return p;
+ }
+
+ // -------- Triple expansions
+
+ // Anything that can stand in a node slot and which is
+ // a number of triples
+ final public Node TriplesNode() throws ParseException {
+ Node n;
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case LPAREN:
+ n = Collection();
+ return n;
+ case LBRACKET:
+ n = BlankNodePropertyList();
+ return n;
+ default:
+ jj_la1[10] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+
+ final public Node BlankNodePropertyList() throws ParseException {
+ jj_consume_token(LBRACKET);
+ Node n = createBNode();
+ PropertyListNotEmpty(n);
+ jj_consume_token(RBRACKET);
+ return n;
+ }
+
+ // ------- RDF collections
+
+ // Code not as SPARQL/ARQ because of output ordering.
+ final public Node Collection() throws ParseException {
+ Node listHead = nRDFnil;
+ Node lastCell = null;
+ Node n;
+ jj_consume_token(LPAREN);
+ label_4: while (true) {
+ Node cell = createBNode();
+ if (listHead == nRDFnil)
+ listHead = cell;
+ if (lastCell != null)
+ emitTriple(token.beginLine, token.beginColumn, new Triple(
+ lastCell, nRDFrest, cell));
+ n = GraphNode();
+ emitTriple(token.beginLine, token.beginColumn, new Triple(cell,
+ nRDFfirst, n));
+ lastCell = cell;
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case TRUE:
+ case FALSE:
+ case INTEGER:
+ case DECIMAL:
+ case DOUBLE:
+ case STRING_LITERAL1:
+ case STRING_LITERAL2:
+ case STRING_LITERAL_LONG1:
+ case STRING_LITERAL_LONG2:
+ case IRIref:
+ case PNAME_NS:
+ case PNAME_LN:
+ case BLANK_NODE_LABEL:
+ case VAR:
+ case LPAREN:
+ case NIL:
+ case LBRACE:
+ case LBRACKET:
+ case ANON:
+
+ break;
+ default:
+ jj_la1[11] = jj_gen;
+ break label_4;
+ }
+ }
+ jj_consume_token(RPAREN);
+ if (lastCell != null)
+ emitTriple(token.beginLine, token.beginColumn, new Triple(lastCell,
+ nRDFrest, nRDFnil));
+ return listHead;
+ }
+
+ // -------- Nodes in a graph pattern or template
+ final public Node GraphNode() throws ParseException {
+ Node n;
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case TRUE:
+ case FALSE:
+ case INTEGER:
+ case DECIMAL:
+ case DOUBLE:
+ case STRING_LITERAL1:
+ case STRING_LITERAL2:
+ case STRING_LITERAL_LONG1:
+ case STRING_LITERAL_LONG2:
+ case IRIref:
+ case PNAME_NS:
+ case PNAME_LN:
+ case BLANK_NODE_LABEL:
+ case VAR:
+ case NIL:
+ case LBRACE:
+ case ANON:
+ n = VarOrTerm();
+ return n;
+ case LPAREN:
+ case LBRACKET:
+ n = TriplesNode();
+ return n;
+ default:
+ jj_la1[12] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+
+ final public Node VarOrTerm() throws ParseException {
+ Node n = null;
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case VAR:
+ n = Var();
+ break;
+ case TRUE:
+ case FALSE:
+ case INTEGER:
+ case DECIMAL:
+ case DOUBLE:
+ case STRING_LITERAL1:
+ case STRING_LITERAL2:
+ case STRING_LITERAL_LONG1:
+ case STRING_LITERAL_LONG2:
+ case IRIref:
+ case PNAME_NS:
+ case PNAME_LN:
+ case BLANK_NODE_LABEL:
+ case NIL:
+ case ANON:
+ n = GraphTerm();
+ break;
+ case LBRACE:
+ n = Formula();
+ break;
+ default:
+ jj_la1[13] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ return n;
+ }
+
+ final public Node Formula() throws ParseException {
+ Token t;
+ t = jj_consume_token(LBRACE);
+ startFormula(t.beginLine, t.beginColumn);
+ TriplesSameSubject();
+ label_5: while (true) {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case DOT:
+
+ break;
+ default:
+ jj_la1[14] = jj_gen;
+ break label_5;
+ }
+ jj_consume_token(DOT);
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case TRUE:
+ case FALSE:
+ case INTEGER:
+ case DECIMAL:
+ case DOUBLE:
+ case STRING_LITERAL1:
+ case STRING_LITERAL2:
+ case STRING_LITERAL_LONG1:
+ case STRING_LITERAL_LONG2:
+ case IRIref:
+ case PNAME_NS:
+ case PNAME_LN:
+ case BLANK_NODE_LABEL:
+ case VAR:
+ case LPAREN:
+ case NIL:
+ case LBRACE:
+ case LBRACKET:
+ case ANON:
+ TriplesSameSubject();
+ break;
+ default:
+ jj_la1[15] = jj_gen;
+
+ }
+ }
+ t = jj_consume_token(RBRACE);
+ endFormula(t.beginLine, t.beginColumn);
+ return null;
+ }
+
+ final public Node Var() throws ParseException {
+ Token t;
+ t = jj_consume_token(VAR);
+ return createVariable(t.image, t.beginLine, t.beginColumn);
+ }
+
+ final public Node GraphTerm() throws ParseException {
+ Node n;
+ String iri;
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case IRIref:
+ case PNAME_NS:
+ case PNAME_LN:
+ iri = IRIref();
+ return createNode(iri);
+ case STRING_LITERAL1:
+ case STRING_LITERAL2:
+ case STRING_LITERAL_LONG1:
+ case STRING_LITERAL_LONG2:
+ n = RDFLiteral();
+ return n;
+ case INTEGER:
+ case DECIMAL:
+ case DOUBLE:
+ // Cleaner sign handling in Turtle.
+ n = NumericLiteral();
+ return n;
+ case TRUE:
+ case FALSE:
+ n = BooleanLiteral();
+ return n;
+ case BLANK_NODE_LABEL:
+ case ANON:
+ n = BlankNode();
+ return n;
+ case NIL:
+ jj_consume_token(NIL);
+ return nRDFnil;
+ default:
+ jj_la1[16] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+
+ // ---- Basic terms
+ final public Node NumericLiteral() throws ParseException {
+ Token t;
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case INTEGER:
+ t = jj_consume_token(INTEGER);
+ return createLiteralInteger(t.image);
+ case DECIMAL:
+ t = jj_consume_token(DECIMAL);
+ return createLiteralDecimal(t.image);
+ case DOUBLE:
+ t = jj_consume_token(DOUBLE);
+ return createLiteralDouble(t.image);
+ default:
+ jj_la1[17] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+
+ final public Node RDFLiteral() throws ParseException {
+ String lex = null;
+ lex = String();
+ String lang = null;
+ String dt = null;
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case PREFIX:
+ case BASE:
+ case LANGTAG:
+ case DATATYPE:
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case PREFIX:
+ case BASE:
+ case LANGTAG:
+ lang = Langtag();
+ break;
+ case DATATYPE:
+ jj_consume_token(DATATYPE);
+ dt = IRIref();
+ break;
+ default:
+ jj_la1[18] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ break;
+ default:
+ jj_la1[19] = jj_gen;
+ }
+ return createLiteral(lex, lang, dt);
+ }
+
+ final public String Langtag() throws ParseException {
+ Token t;
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case LANGTAG:
+ t = jj_consume_token(LANGTAG);
+ break;
+ case PREFIX:
+ case BASE:
+ t = AnyDirective();
+ break;
+ default:
+ jj_la1[20] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ String lang = stripChars(t.image, 1);
+ return lang;
+ }
+
+ final public Token AnyDirective() throws ParseException {
+ Token t;
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case PREFIX:
+ t = jj_consume_token(PREFIX);
+ break;
+ case BASE:
+ t = jj_consume_token(BASE);
+ break;
+ default:
+ jj_la1[21] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ return t;
+ }
+
+ final public Node BooleanLiteral() throws ParseException {
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case TRUE:
+ jj_consume_token(TRUE);
+ return XSD_TRUE;
+ case FALSE:
+ jj_consume_token(FALSE);
+ return XSD_FALSE;
+ default:
+ jj_la1[22] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+
+ final public String String() throws ParseException {
+ Token t;
+ String lex;
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case STRING_LITERAL1:
+ t = jj_consume_token(STRING_LITERAL1);
+ lex = stripQuotes(t.image);
+ break;
+ case STRING_LITERAL2:
+ t = jj_consume_token(STRING_LITERAL2);
+ lex = stripQuotes(t.image);
+ break;
+ case STRING_LITERAL_LONG1:
+ t = jj_consume_token(STRING_LITERAL_LONG1);
+ lex = stripQuotes3(t.image);
+ break;
+ case STRING_LITERAL_LONG2:
+ t = jj_consume_token(STRING_LITERAL_LONG2);
+ lex = stripQuotes3(t.image);
+ break;
+ default:
+ jj_la1[23] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ lex = unescapeStr(lex, t.beginLine, t.beginColumn);
+ return lex;
+ }
+
+ final public String IRIref() throws ParseException {
+ String iri;
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case IRIref:
+ iri = IRI_REF();
+ return iri;
+ case PNAME_NS:
+ case PNAME_LN:
+ iri = PrefixedName();
+ return iri;
+ default:
+ jj_la1[24] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+
+ final public String PrefixedName() throws ParseException {
+ Token t;
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case PNAME_LN:
+ t = jj_consume_token(PNAME_LN);
+ return resolvePName(t.image, t.beginLine, t.beginColumn);
+ case PNAME_NS:
+ t = jj_consume_token(PNAME_NS);
+ return resolvePName(t.image, t.beginLine, t.beginColumn);
+ default:
+ jj_la1[25] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+
+ final public Node BlankNode() throws ParseException {
+ Token t = null;
+ switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
+ case BLANK_NODE_LABEL:
+ t = jj_consume_token(BLANK_NODE_LABEL);
+ return createBNode(t.image, t.beginLine, t.beginColumn);
+ case ANON:
+ jj_consume_token(ANON);
+ return createBNode();
+ default:
+ jj_la1[26] = jj_gen;
+ jj_consume_token(-1);
+ throw new ParseException();
+ }
+ }
+
+ final public String IRI_REF() throws ParseException {
+ Token t;
+ t = jj_consume_token(IRIref);
+ return resolveQuotedIRI(t.image, t.beginLine, t.beginColumn);
+ }
+
+ /** Generated Token Manager. */
+ public TurtleParserTokenManager token_source;
+ JavaCharStream jj_input_stream;
+ /** Current token. */
+ public Token token;
+ /** Next token. */
+ public Token jj_nt;
+ private int jj_ntk;
+ private int jj_gen;
+ final private int[] jj_la1 = new int[27];
+ static private int[] jj_la1_0;
+ static private int[] jj_la1_1;
+ static private int[] jj_la1_2;
+ static {
+ jj_la1_init_0();
+ jj_la1_init_1();
+ jj_la1_init_2();
+ }
+
+ private static void jj_la1_init_0() {
+ jj_la1_0 = new int[] { 0x0, 0xde1fc000, 0xde1fc000, 0xc000, 0xde1f0000,
+ 0xc0002000, 0x0, 0xc0002000, 0x0, 0xc0002000, 0x0, 0xde1f0000,
+ 0xde1f0000, 0xde1f0000, 0x0, 0xde1f0000, 0xde1f0000, 0x1c0000,
+ 0xc000, 0xc000, 0xc000, 0xc000, 0x30000, 0x1e000000,
+ 0xc0000000, 0x80000000, 0x0, };
+ }
+
+ private static void jj_la1_init_1() {
+ jj_la1_1 = new int[] { 0x4000000, 0x2b47, 0x2b47, 0x0, 0x2b47, 0x60001,
+ 0x4000, 0x60001, 0x8000, 0x60001, 0x840, 0x2b47, 0x2b47,
+ 0x2307, 0x10000, 0x2b47, 0x2103, 0x0, 0x8000008, 0x8000008,
+ 0x8, 0x0, 0x0, 0x0, 0x1, 0x1, 0x2002, };
+ }
+
+ private static void jj_la1_init_2() {
+ jj_la1_2 = new int[] { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, };
+ }
+
+ /** Constructor with InputStream. */
+ public TurtleParser(java.io.InputStream stream) {
+ this(stream, null);
+ }
+
+ /** Constructor with InputStream and supplied encoding */
+ public TurtleParser(java.io.InputStream stream, String encoding) {
+ try {
+ jj_input_stream = new JavaCharStream(stream, encoding, 1, 1);
+ } catch (java.io.UnsupportedEncodingException e) {
+ throw new RuntimeException(e);
+ }
+ token_source = new TurtleParserTokenManager(jj_input_stream);
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 27; i++)
+ jj_la1[i] = -1;
+ }
+
+ /** Reinitialise. */
+ public void ReInit(java.io.InputStream stream) {
+ ReInit(stream, null);
+ }
+
+ /** Reinitialise. */
+ public void ReInit(java.io.InputStream stream, String encoding) {
+ try {
+ jj_input_stream.ReInit(stream, encoding, 1, 1);
+ } catch (java.io.UnsupportedEncodingException e) {
+ throw new RuntimeException(e);
+ }
+ token_source.ReInit(jj_input_stream);
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 27; i++)
+ jj_la1[i] = -1;
+ }
+
+ /** Constructor. */
+ public TurtleParser(java.io.Reader stream) {
+ jj_input_stream = new JavaCharStream(stream, 1, 1);
+ token_source = new TurtleParserTokenManager(jj_input_stream);
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 27; i++)
+ jj_la1[i] = -1;
+ }
+
+ /** Reinitialise. */
+ public void ReInit(java.io.Reader stream) {
+ jj_input_stream.ReInit(stream, 1, 1);
+ token_source.ReInit(jj_input_stream);
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 27; i++)
+ jj_la1[i] = -1;
+ }
+
+ /** Constructor with generated Token Manager. */
+ public TurtleParser(TurtleParserTokenManager tm) {
+ token_source = tm;
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 27; i++)
+ jj_la1[i] = -1;
+ }
+
+ /** Reinitialise. */
+ public void ReInit(TurtleParserTokenManager tm) {
+ token_source = tm;
+ token = new Token();
+ jj_ntk = -1;
+ jj_gen = 0;
+ for (int i = 0; i < 27; i++)
+ jj_la1[i] = -1;
+ }
+
+ private Token jj_consume_token(int kind) throws ParseException {
+ Token oldToken;
+ if ((oldToken = token).next != null)
+ token = token.next;
+ else
+ token = token.next = token_source.getNextToken();
+ jj_ntk = -1;
+ if (token.kind == kind) {
+ jj_gen++;
+ return token;
+ }
+ token = oldToken;
+ jj_kind = kind;
+ throw generateParseException();
+ }
+
+ /** Get the next Token. */
+ final public Token getNextToken() {
+ if (token.next != null)
+ token = token.next;
+ else
+ token = token.next = token_source.getNextToken();
+ jj_ntk = -1;
+ jj_gen++;
+ return token;
+ }
+
+ /** Get the specific Token. */
+ final public Token getToken(int index) {
+ Token t = token;
+ for (int i = 0; i < index; i++) {
+ if (t.next != null)
+ t = t.next;
+ else
+ t = t.next = token_source.getNextToken();
+ }
+ return t;
+ }
+
+ private int jj_ntk() {
+ if ((jj_nt = token.next) == null)
+ return (jj_ntk = (token.next = token_source.getNextToken()).kind);
+ else
+ return (jj_ntk = jj_nt.kind);
+ }
+
+ private java.util.List jj_expentries = new java.util.ArrayList<>();
+ private int[] jj_expentry;
+ private int jj_kind = -1;
+
+ /** Generate ParseException. */
+ public ParseException generateParseException() {
+ jj_expentries.clear();
+ boolean[] la1tokens = new boolean[68];
+ if (jj_kind >= 0) {
+ la1tokens[jj_kind] = true;
+ jj_kind = -1;
+ }
+ for (int i = 0; i < 27; i++) {
+ if (jj_la1[i] == jj_gen) {
+ for (int j = 0; j < 32; j++) {
+ if ((jj_la1_0[i] & (1 << j)) != 0) {
+ la1tokens[j] = true;
+ }
+ if ((jj_la1_1[i] & (1 << j)) != 0) {
+ la1tokens[32 + j] = true;
+ }
+ if ((jj_la1_2[i] & (1 << j)) != 0) {
+ la1tokens[64 + j] = true;
+ }
+ }
+ }
+ }
+ for (int i = 0; i < 68; i++) {
+ if (la1tokens[i]) {
+ jj_expentry = new int[1];
+ jj_expentry[0] = i;
+ jj_expentries.add(jj_expentry);
+ }
+ }
+ int[][] exptokseq = new int[jj_expentries.size()][];
+ for (int i = 0; i < jj_expentries.size(); i++) {
+ exptokseq[i] = jj_expentries.get(i);
+ }
+ return new ParseException(token, exptokseq, tokenImage);
+ }
+
+ /** Enable tracing. */
+ final public void enable_tracing() {
+ }
+
+ /** Disable tracing. */
+ final public void disable_tracing() {
+ }
}
diff --git a/jena-core/src/main/java/org/apache/jena/n3/turtle/parser/TurtleParserTokenManager.java b/jena-core/src/main/java/org/apache/jena/n3/turtle/parser/TurtleParserTokenManager.java
index 3a3921e2f32..89a3cec183d 100644
--- a/jena-core/src/main/java/org/apache/jena/n3/turtle/parser/TurtleParserTokenManager.java
+++ b/jena-core/src/main/java/org/apache/jena/n3/turtle/parser/TurtleParserTokenManager.java
@@ -29,12 +29,6 @@ public class TurtleParserTokenManager implements TurtleParserConstants
public java.io.PrintStream debugStream = System.out;
/** Set debug output. */
public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private int jjStopAtPos(int pos, int kind)
-{
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- return pos + 1;
-}
private int jjMoveStringLiteralDfa0_0()
{
switch(curChar)
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/OntModelImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/OntModelImpl.java
index 0aac74ae946..d83a71fce34 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/OntModelImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/OntModelImpl.java
@@ -46,7 +46,6 @@
import org.apache.jena.reasoner.InfGraph ;
import org.apache.jena.reasoner.Reasoner ;
import org.apache.jena.reasoner.ValidityReport ;
-import org.apache.jena.shared.ConfigException ;
import org.apache.jena.util.iterator.* ;
import org.apache.jena.vocabulary.RDF ;
import org.apache.jena.vocabulary.RDFS ;
@@ -2806,18 +2805,6 @@ public Iterator getDerivation(Statement statement) {
//////////////////////////////////
- private static void initSyntaxCheckerClass() {
- if (owlSyntaxCheckerClass == null ) {
- try {
- owlSyntaxCheckerClass = Class.forName(owlSyntaxCheckerClassName);
- owlSyntaxCheckerClass.newInstance();
- }
- catch (Exception e){
- throw new ConfigException("owlsyntax.jar must be on the classpath.",e);
- }
- }
- }
-
/**
* Helper method to the constructor, which interprets the spec and generates an appropriate
* graph for this model
diff --git a/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/impl/Generator.java b/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/impl/Generator.java
index 5c8b637f9bd..2e8e050fd31 100644
--- a/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/impl/Generator.java
+++ b/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/impl/Generator.java
@@ -203,7 +203,6 @@ public void removeConsumer(ConsumerChoicePointFrame ccp) {
* Signal dependents that we have new results.
*/
public void notifyResults() {
- LPBRuleEngine engine = interpreter.getEngine();
for ( ConsumerChoicePointFrame cons : consumingCPs )
{
cons.setReady();
@@ -272,9 +271,6 @@ public void pump(LPInterpreterState context) {
if (isSingleton && results.size() == 1) {
setComplete();
}
- if (LPBRuleEngine.CYCLES_BETWEEN_COMPLETION_CHECK == 0) {
- checkForCompletions();
- }
}
/**
diff --git a/jena-core/src/main/java/org/apache/jena/shared/uuid/UUID_V1_Gen.java b/jena-core/src/main/java/org/apache/jena/shared/uuid/UUID_V1_Gen.java
index f1067e47cc7..2c4b9e57592 100644
--- a/jena-core/src/main/java/org/apache/jena/shared/uuid/UUID_V1_Gen.java
+++ b/jena-core/src/main/java/org/apache/jena/shared/uuid/UUID_V1_Gen.java
@@ -190,32 +190,6 @@ public JenaUUID parse(String s) throws UUIDFormatException {
return generate(version, variant, timeHigh, timeMid, timeLow, clockSeq, node) ;
}
- // See LibUUID.toString(JenaUUID)
- // The code here works on the specific fields and is kept for reference only.
- private static String unparse(UUID_V1 uuid) {
- int _variant = uuid.getVariant() ;
- int _version = uuid.getVersion() ;
-
- long timeHigh = uuid.getTimeHigh() ;
- long timeMid = uuid.getTimeMid() ;
- long timeLow = uuid.getTimeLow() ;
-
- long node = uuid.getNode() ;
- long clockSeq = uuid.getClockSequence() ;
-
- StringBuffer sBuff = new StringBuffer() ;
- JenaUUID.toHex(sBuff, timeLow, 4) ;
- sBuff.append('-') ;
- JenaUUID.toHex(sBuff, timeMid, 2) ;
- sBuff.append('-') ;
- JenaUUID.toHex(sBuff, _version << 12 | timeHigh, 2) ;
- sBuff.append('-') ;
- JenaUUID.toHex(sBuff, (long)_variant << 14 | clockSeq, 2) ;
- sBuff.append('-') ;
- JenaUUID.toHex(sBuff, node, 6) ;
- return sBuff.toString() ;
- }
-
private UUID_V1 generate(long timestamp) {
return generate(versionHere, variantHere, timestamp, clockSeq, node) ;
}
diff --git a/jena-core/src/main/java/org/apache/jena/util/LocatorURL.java b/jena-core/src/main/java/org/apache/jena/util/LocatorURL.java
index be53c50699d..696bbfa6b95 100644
--- a/jena-core/src/main/java/org/apache/jena/util/LocatorURL.java
+++ b/jena-core/src/main/java/org/apache/jena/util/LocatorURL.java
@@ -135,14 +135,6 @@ private boolean acceptByScheme(String filenameOrURI)
return false ;
}
- private boolean hasScheme(String uri, String scheme)
- {
- String actualScheme = getScheme(uri) ;
- if ( actualScheme == null )
- return false ;
- return actualScheme.equalsIgnoreCase(scheme) ;
- }
-
// Not perfect - but we support Java 1.3 (as of August 2004)
private String getScheme(String uri)
{
diff --git a/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/TestPackage.java b/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/TestPackage.java
index c61ea3e84f6..9de2637c4e0 100644
--- a/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/TestPackage.java
+++ b/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/TestPackage.java
@@ -40,9 +40,4 @@ private TestPackage()
addTest( org.apache.jena.rdfxml.xmlinput.SAX2RDFTest.suite());
addTest( org.apache.jena.rdfxml.xmlinput.StAX2ModelTest.suite());
}
-
- private void addTest(String name, TestSuite tc) {
- tc.setName(name);
- addTest(tc);
- }
}
diff --git a/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/states/TestData.java b/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/states/TestData.java
index d59f4c65883..dab70d2654a 100644
--- a/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/states/TestData.java
+++ b/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/states/TestData.java
@@ -310,8 +310,6 @@ void expand(Class< ? extends FrameI> f) {
return;
localCount++;
globalCount++;
- if (localCount % 20000 == 0)
- stats(f);
if (!eventList.test(f)) {
if (!shorterTestFails(f))
data.add(eventListName(f,null)+" $ " + testInfo(f));
@@ -381,14 +379,6 @@ public int compare(String arg1, String arg2) {
}}
);
- void stats(Class< ? extends FrameI> f) {
- if (false)
- System.out.println(state2ShortName.get(f) + ":" + state2Name.get(f)
- + ":" + getSimpleName(f) + " " + localCount + "/"
- + globalCount);
-
- }
-
void test1() throws IOException {
Iterator> it = state2Name.keySet().iterator();
while (it.hasNext()) {
@@ -405,7 +395,6 @@ void test1() throws IOException {
expand( f );
}
}
- stats(f);
}
try ( FileWriter fw = new FileWriter(dataFile) ) {
Iterator it2 = data.iterator();
diff --git a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestInferenceReification.java b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestInferenceReification.java
index ec70aaec9cb..5dcafa33488 100644
--- a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestInferenceReification.java
+++ b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestInferenceReification.java
@@ -62,9 +62,6 @@ public void testSimpleReification() {
TestUtil.assertIteratorLength( m.listReifiedStatements(), 1 );
}
- private Reasoner ruleBaseReasoner()
- { return new FBRuleReasoner( Rule.parseRules( "" ) ); }
-
public void testConstructingModelDoesntForcePreparation()
{
Model m = makeInfModel( "", "" );
diff --git a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestOWLMisc.java b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestOWLMisc.java
index 38641eecd65..c4d864d777f 100644
--- a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestOWLMisc.java
+++ b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestOWLMisc.java
@@ -23,10 +23,6 @@
import junit.framework.TestCase ;
import junit.framework.TestSuite ;
-import org.apache.jena.datatypes.RDFDatatype ;
-import org.apache.jena.datatypes.xsd.XSDDatatype ;
-import org.apache.jena.graph.Triple ;
-import org.apache.jena.ontology.DatatypeProperty ;
import org.apache.jena.ontology.OntDocumentManager ;
import org.apache.jena.ontology.OntModel ;
import org.apache.jena.ontology.OntModelSpec ;
@@ -91,27 +87,6 @@ public void doTestSameAsDifferentFrom(OntModelSpec os) {
assertTrue( inf.contains(l4, OWL.differentFrom, l3) );
}
- private void doTestDatatypeRangeValidation(RDFDatatype over12Type, OntModelSpec spec) {
- String NS = "http://jena.hpl.hp.com/example#";
- OntModel ont = ModelFactory.createOntologyModel(spec);
- Resource over12 = ont.createResource( over12Type.getURI() );
- DatatypeProperty hasValue = ont.createDatatypeProperty(NS + "hasValue");
- hasValue.addRange( over12 );
-
- ont.createResource(NS + "a").addProperty(hasValue, "15", over12Type);
- ont.createResource(NS + "b").addProperty(hasValue, "16", XSDDatatype.XSDinteger);
- ont.createResource(NS + "c").addProperty(hasValue, "10", XSDDatatype.XSDinteger);
-
- ValidityReport validity = ont.validate();
- assertTrue (! validity.isValid());
-
- // Check culprit reporting
- ValidityReport.Report report = (validity.getReports().next());
- Triple culprit = (Triple)report.getExtension();
- assertEquals(culprit.getSubject().getURI(), NS + "c");
- assertEquals(culprit.getPredicate(), hasValue.asNode());
- }
-
/**
* Test reported problem with OWL property axioms.
*/
diff --git a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestRDFSRules.java b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestRDFSRules.java
index f17634ab870..59f5af2af58 100755
--- a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestRDFSRules.java
+++ b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestRDFSRules.java
@@ -22,14 +22,10 @@
import junit.framework.TestSuite;
import java.io.IOException;
-import java.util.Iterator;
-
-import org.apache.jena.rdf.model.* ;
import org.apache.jena.reasoner.* ;
import org.apache.jena.reasoner.rulesys.* ;
import org.apache.jena.reasoner.test.* ;
import org.apache.jena.vocabulary.OWL ;
-import org.apache.jena.vocabulary.RDF ;
import org.apache.jena.vocabulary.RDFS ;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -100,33 +96,5 @@ public void testRDFSDescription() {
assertTrue(r.supportsProperty(RDFS.subClassOf));
assertTrue(r.supportsProperty(RDFS.domain));
assertTrue( ! r.supportsProperty(OWL.allValuesFrom));
- }
-
- /**
- * Time a trial list of results from an inf graph.
- */
- private static void doTiming(Reasoner r, Model tbox, Model data, String name, int loop) {
- Resource C1 = ResourceFactory.createResource("http://www.hpl.hp.com/semweb/2003/eg#C1");
- Resource C2 = ResourceFactory.createResource("http://www.hpl.hp.com/semweb/2003/eg#C2");
-
- long t1 = System.currentTimeMillis();
- int count = 0;
- for (int lp = 0; lp < loop; lp++) {
- Model m = ModelFactory.createModelForGraph(r.bindSchema(tbox.getGraph()).bind(data.getGraph()));
- count = 0;
- for (Iterator i = m.listStatements(null, RDF.type, C1); i.hasNext(); i.next()) count++;
- }
- long t2 = System.currentTimeMillis();
- long time10 = (t2-t1)*10/loop;
- long time = time10/10;
- long timeFraction = time10 - (time*10);
- System.out.println(name + ": " + count +" results in " + time + "." + timeFraction +"ms");
-// t1 = System.currentTimeMillis();
-// for (int j = 0; j < 10; j++) {
-// count = 0;
-// for (Iterator i = m.listStatements(null, RDF.type, C1); i.hasNext(); i.next()) count++;
-// }
-// t2 = System.currentTimeMillis();
-// System.out.println(name + ": " + count + " results in " + (t2-t1)/10 +"ms");
}
}
diff --git a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestSetRules.java b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestSetRules.java
index 239ba4df830..4f19afb9fcd 100644
--- a/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestSetRules.java
+++ b/jena-core/src/test/java/org/apache/jena/reasoner/rulesys/test/TestSetRules.java
@@ -58,10 +58,6 @@ private static class MockFactory implements ReasonerFactory
static final String uri = "eg:mockURI";
static final Reasoner reasoner = new GenericRuleReasoner( rules );
- public void addRules( List rules )
- { assertEquals( TestSetRules.rules, rules );
- done.add( "addRules" ); }
-
@Override
public Reasoner create(Resource configuration)
{ done.add( "create" );
diff --git a/jena-core/src/test/java/org/apache/jena/reasoner/test/TestRDFSReasoners.java b/jena-core/src/test/java/org/apache/jena/reasoner/test/TestRDFSReasoners.java
index 56bd1d29819..d29bc8a2212 100644
--- a/jena-core/src/test/java/org/apache/jena/reasoner/test/TestRDFSReasoners.java
+++ b/jena-core/src/test/java/org/apache/jena/reasoner/test/TestRDFSReasoners.java
@@ -92,15 +92,6 @@ public static TestSuite suite() {
return suite;
}
- /**
- * Build a single named query test
- */
- private static void constructSingleQuerytests(TestSuite suite, String manifest, String test, ReasonerFactory rf, Resource config) throws IOException {
- ReasonerTester tester = new ReasonerTester(manifest);
- Reasoner r = rf.create(config);
- suite.addTest(new TestReasonerFromManifest(tester, test, r));
- }
-
/**
* Build the query tests for the given reasoner.
*/
diff --git a/jena-core/src/test/java/org/apache/jena/reasoner/test/WGReasonerTester.java b/jena-core/src/test/java/org/apache/jena/reasoner/test/WGReasonerTester.java
index db1221eed23..b27924e4e6e 100644
--- a/jena-core/src/test/java/org/apache/jena/reasoner/test/WGReasonerTester.java
+++ b/jena-core/src/test/java/org/apache/jena/reasoner/test/WGReasonerTester.java
@@ -27,7 +27,6 @@
import java.util.List ;
import junit.framework.TestCase ;
-import org.apache.jena.graph.Factory ;
import org.apache.jena.graph.Graph ;
import org.apache.jena.rdf.model.* ;
import org.apache.jena.rdf.model.impl.PropertyImpl ;
@@ -182,23 +181,6 @@ public Model loadFile(String file) throws IOException {
return result;
}
- /**
- * Load the datafile given by the property name.
- * @param test the test being processed
- * @param predicate the property of the test giving the file name to load
- * @return a graph containing the file contents or an empty graph if the property
- * is not present
- * @throws IOException if the property is present but the file can't be found
- */
- private Graph loadTestFile(Resource test, Property predicate) throws IOException {
- if (test.hasProperty(predicate)) {
- String fileName = test.getRequiredProperty(predicate).getObject().toString();
- return loadFile(fileName).getGraph();
- } else {
- return Factory.createGraphMem();
- }
- }
-
/**
* Run all the tests in the manifest
* @param reasonerF the factory for the reasoner to be tested
diff --git a/jena-core/src/test/java/org/apache/jena/shared/uuid/TestUUID_JRE.java b/jena-core/src/test/java/org/apache/jena/shared/uuid/TestUUID_JRE.java
index 01da19d9fd0..ce84d3b5ce6 100644
--- a/jena-core/src/test/java/org/apache/jena/shared/uuid/TestUUID_JRE.java
+++ b/jena-core/src/test/java/org/apache/jena/shared/uuid/TestUUID_JRE.java
@@ -97,29 +97,4 @@ public void testU5_6()
assertEquals(u1.getLeastSignificantBits(), u2.getLeastSignificantBits()) ;
assertEquals(u1.toString(), u2.toString()) ;
}
-
- private void check(String uuidString)
- {
- JenaUUID uuid = JenaUUID.parse(uuidString) ;
- // assertFalse(u.equals(JenaUUID.nil())) ;
- String s2 = uuid.asString() ;
-
- String s = uuidString ;
- if (s.matches("[uU][rR][nN]:")) s = s.substring(4) ;
- if (s.startsWith("[uU][uU][iI][dD]:")) s = s.substring(5) ;
-
- assertTrue(uuidString.equalsIgnoreCase(s)) ;
- }
-
- private void check(JenaUUID uuid)
- {
- String s = uuid.asString() ;
- if (uuid.isNil())
- {
- assertEquals(JenaUUID.strNil(), s) ;
- return ;
- }
- JenaUUID uuid2 = JenaUUID.parse(s) ;
- assertTrue(uuid2.equals(uuid)) ;
- }
}
diff --git a/jena-csv/src/main/java/org/apache/jena/propertytable/graph/QueryIterPropertyTableRow.java b/jena-csv/src/main/java/org/apache/jena/propertytable/graph/QueryIterPropertyTableRow.java
index 8aeec573316..0b001931b30 100644
--- a/jena-csv/src/main/java/org/apache/jena/propertytable/graph/QueryIterPropertyTableRow.java
+++ b/jena-csv/src/main/java/org/apache/jena/propertytable/graph/QueryIterPropertyTableRow.java
@@ -23,7 +23,6 @@
import org.apache.jena.graph.Node ;
import org.apache.jena.graph.Triple ;
-import org.apache.jena.propertytable.PropertyTable;
import org.apache.jena.propertytable.Row;
@@ -40,7 +39,6 @@
import org.apache.jena.util.iterator.ClosableIterator ;
import org.apache.jena.util.iterator.ExtendedIterator ;
import org.apache.jena.util.iterator.NiceIterator ;
-import org.apache.jena.util.iterator.WrappedIterator ;
/**
* If the triple size within a BasicePattern is greater than 1 (i.e. at least 2 triples), it's turned into a row querying.
@@ -68,8 +66,6 @@ protected QueryIterator nextStage(Binding binding)
static int countMapper = 0 ;
static class RowMapper extends QueryIter
{
- private PropertyTable table;
-
private BasicPattern pattern;
private Binding binding ;
private ClosableIterator graphIter ;
@@ -88,16 +84,8 @@ static class RowMapper extends QueryIter
ExtendedIterator iter = graph.propertyTableBaseFind( new RowMatch( pattern2) );
- if ( false )
- {
- // Materialize the results now. Debugging only.
- List x = iter.toList() ;
- this.graphIter = WrappedIterator.create(x.iterator()) ;
- iter.close();
- }
- else
- // Stream.
- this.graphIter = iter ;
+ // Stream.
+ this.graphIter = iter ;
}
private static Node tripleNode(Node node)
diff --git a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/ConstructBuilder.java b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/ConstructBuilder.java
index 1d95a4b8a8d..3411dcde5c0 100644
--- a/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/ConstructBuilder.java
+++ b/jena-extras/jena-querybuilder/src/main/java/org/apache/jena/arq/querybuilder/ConstructBuilder.java
@@ -28,7 +28,6 @@
import org.apache.jena.arq.querybuilder.handlers.SolutionModifierHandler;
import org.apache.jena.arq.querybuilder.handlers.WhereHandler;
import org.apache.jena.graph.FrontsTriple ;
-import org.apache.jena.graph.Node ;
import org.apache.jena.graph.Triple ;
import org.apache.jena.sparql.lang.sparql_11.ParseException ;
@@ -145,23 +144,6 @@ public ConstructBuilder setOffset(int offset) {
return this;
}
- // convert a node to a string
- private static String toString(Node node) {
- if (node.isBlank()) {
- return node.getBlankNodeLabel();
- }
- if (node.isLiteral()) {
- return node.toString();
- }
- if (node.isURI()) {
- return String.format("<%s>", node.getURI());
- }
- if (node.isVariable()) {
- return String.format("?%s", node.getName());
- }
- return node.toString();
- }
-
@Override
public ConstructBuilder addWhere(Triple t) {
whereHandler.addWhere(t);
diff --git a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/FusekiCmd.java b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
index 6e79ceee792..688aa763570 100644
--- a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
+++ b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
@@ -21,11 +21,9 @@
import static org.apache.jena.fuseki.Fuseki.serverLog ;
import java.io.File ;
-import java.io.InputStream ;
import java.util.List ;
import java.util.Objects;
-import org.apache.jena.atlas.io.IO ;
import org.apache.jena.atlas.lib.FileOps ;
import org.apache.jena.atlas.lib.StrUtils ;
import org.apache.jena.atlas.logging.LogCtl ;
@@ -44,7 +42,6 @@
import org.apache.jena.tdb.TDB ;
import org.apache.jena.tdb.TDBFactory ;
import org.apache.jena.tdb.sys.Names ;
-import org.apache.jena.tdb.transaction.TransactionManager ;
import org.eclipse.jetty.server.Server ;
import org.slf4j.Logger ;
@@ -184,10 +181,6 @@ public FusekiCmd(String...argv)
{
super(argv) ;
- if ( false )
- // Consider ...
- TransactionManager.QueueBatchSize = TransactionManager.QueueBatchSize / 2 ;
-
getUsage().startCategory("Fuseki") ;
addModule(modDataset) ;
add(argMem, "--mem", "Create an in-memory, non-persistent dataset for the server") ;
@@ -271,8 +264,6 @@ protected void processModulesAndArgs()
Lang language = RDFLanguages.filenameToLang(filename) ;
if ( language == null )
throw new CmdException("Can't guess language for file: "+filename) ;
- InputStream input = IO.openFile(filename) ;
-
if ( RDFLanguages.isQuads(language) )
RDFDataMgr.read(dsg, filename) ;
else
diff --git a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java
index c4bdcc63dd7..9479c60b8ca 100644
--- a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java
+++ b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java
@@ -162,20 +162,12 @@ public static void backup(DatasetGraph dsg, String backupfile)
OutputStream out = null ;
try
{
- if ( true )
- {
- // This seems to achive about the same as "gzip -6"
- // It's not too expensive in elapsed time but it's not zero cost.
- // GZip, large buffer.
- out = new FileOutputStream(backupfile+".gz") ;
- out = new GZIPOutputStream(out, 8*1024) ;
- out = new BufferedOutputStream(out) ;
- }
- else
- {
- out = new FileOutputStream(backupfile) ;
- out = new BufferedOutputStream(out) ;
- }
+ // This seems to achive about the same as "gzip -6"
+ // It's not too expensive in elapsed time but it's not zero cost.
+ // GZip, large buffer.
+ out = new FileOutputStream(backupfile+".gz") ;
+ out = new GZIPOutputStream(out, 8*1024) ;
+ out = new BufferedOutputStream(out) ;
RDFDataMgr.write(out, dsg,Lang.NQUADS) ;
out.close() ;
diff --git a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/mgt/ActionDataset.java b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/mgt/ActionDataset.java
index fc3d3958c38..e97ec52f5dc 100644
--- a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/mgt/ActionDataset.java
+++ b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/mgt/ActionDataset.java
@@ -19,15 +19,11 @@
package org.apache.jena.fuseki.mgt;
import java.io.IOException ;
-import java.io.UnsupportedEncodingException ;
-
-import javax.servlet.ServletOutputStream ;
import javax.servlet.http.HttpServlet ;
import javax.servlet.http.HttpServletRequest ;
import javax.servlet.http.HttpServletResponse ;
import javax.servlet.http.HttpSession ;
-import org.apache.commons.codec.binary.Base64 ;
import org.apache.jena.fuseki.FusekiLib ;
import org.apache.jena.fuseki.HttpNames ;
import org.apache.jena.fuseki.server.DatasetRegistry ;
@@ -54,68 +50,14 @@ protected void doPost(HttpServletRequest request, HttpServletResponse response)
return ;
}
- if ( true )
- {
- // Redirect to GET page.
- response.setHeader(HttpNames.hLocation, PageNames.pageAfterLogin) ;
- response.setStatus(HttpSC.SEE_OTHER_303) ;
- }
- else
- {
- // Welcome style - but HTML inline :-(
- response.setContentType("text/html");
- response.setStatus(HttpSC.OK_200) ;
- ServletOutputStream out = response.getOutputStream() ;
- out.print(""+dataset+"("+known+")
") ;
-
- for ( String name : DatasetRegistry.get().keys() ) {
- out.print("") ;
- out.print(name) ;
- out.println(" ") ;
- }
- out.println("") ;
- out.println("Next
") ;
- }
+ // Redirect to GET page.
+ response.setHeader(HttpNames.hLocation, PageNames.pageAfterLogin) ;
+ response.setStatus(HttpSC.SEE_OTHER_303) ;
// Cookie cookie = new Cookie("org.apache.jena.fuseki.session", dataset) ;
// // 24 hours.
// cookie.setMaxAge(24*60*60) ;
}
-
- /**
- * This method returns true if the HttpServletRequest contains a valid
- * authorisation header
- * @param req The HttpServletRequest to test
- * @return true if the Authorisation header is valid
- */
-
- private boolean authenticate(HttpServletRequest req)
- {
- String authhead=req.getHeader("Authorization");
-
- if(authhead!=null)
- {
- byte[] up = Base64.decodeBase64(authhead.substring(6)) ;
- // Decode the authorisation String
- String usernpass ;
- try
- {
- usernpass = new String(up, "ascii") ;
- } catch (UnsupportedEncodingException e)
- {
- e.printStackTrace();
- usernpass = null ;
- }
- // Split the username from the password
- String user=usernpass.substring(0,usernpass.indexOf(":"));
- String password=usernpass.substring(usernpass.indexOf(":")+1);
-
- if (user.equals("user") && password.equals("pass"))
- return true;
- }
-
- return false;
- }
}
diff --git a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/mgt/ManagementServer.java b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/mgt/ManagementServer.java
index 5e9dca98310..b18e4fef6fa 100644
--- a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/mgt/ManagementServer.java
+++ b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/mgt/ManagementServer.java
@@ -20,8 +20,6 @@
import static org.apache.jena.fuseki.Fuseki.serverLog ;
-import java.util.List ;
-
import javax.servlet.http.HttpServlet ;
import org.apache.jena.fuseki.Fuseki ;
@@ -70,19 +68,6 @@ public static Server createManagementServer(int mgtPort)
// addServlet(context, new ActionBackup(), "/backup") ;
}
- // SHARE
- private static void addServlet(ServletContextHandler context, String datasetPath, HttpServlet servlet, List pathSpecs)
- {
- for ( String pathSpec : pathSpecs )
- {
- if ( pathSpec.endsWith("/") )
- pathSpec = pathSpec.substring(0, pathSpec.length()-1) ;
- if ( pathSpec.startsWith("/") )
- pathSpec = pathSpec.substring(1, pathSpec.length()) ;
- addServlet(context, servlet, datasetPath+"/"+pathSpec) ;
- }
- }
-
private static void addServlet(ServletContextHandler context, HttpServlet servlet, String pathSpec)
{
ServletHolder holder = new ServletHolder(servlet) ;
diff --git a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/mgt/StatsServlet.java b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/mgt/StatsServlet.java
index e1653553b80..c0185571600 100644
--- a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/mgt/StatsServlet.java
+++ b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/mgt/StatsServlet.java
@@ -19,8 +19,6 @@
package org.apache.jena.fuseki.mgt;
import java.io.IOException ;
-import java.util.Iterator ;
-
import javax.servlet.ServletOutputStream ;
import javax.servlet.http.HttpServlet ;
import javax.servlet.http.HttpServletRequest ;
@@ -108,64 +106,6 @@ private void statsJSON(JsonObject epStats, ServiceRef srvRef) {
epStats.put(cn.name(), c.value()) ;
}
}
-
- private void statsTxt(HttpServletResponse resp) throws IOException
- {
- ServletOutputStream out = resp.getOutputStream() ;
- resp.setContentType(WebContent.contentTypeTextPlain);
- resp.setCharacterEncoding(WebContent.charsetUTF8) ;
-
- Iterator iter = DatasetRegistry.get().keys().iterator() ;
- while(iter.hasNext())
- {
- String ds = iter.next() ;
- DatasetRef desc = DatasetRegistry.get().get(ds) ;
- statsTxt(out, desc) ;
- if ( iter.hasNext() )
- out.println() ;
- }
- out.flush() ;
- }
- private void statsTxt(ServletOutputStream out, DatasetRef desc) throws IOException
- {
- out.println("Dataset: "+desc.name) ;
- out.println(" Requests = "+desc.getCounters().value(CounterName.Requests)) ;
- out.println(" Good = "+desc.getCounters().value(CounterName.RequestsGood)) ;
- out.println(" Bad = "+desc.getCounters().value(CounterName.RequestsBad)) ;
-
- out.println(" SPARQL Query:") ;
- out.println(" Request = "+desc.query.getCounters().value(CounterName.Requests)) ;
- out.println(" Good = "+desc.query.getCounters().value(CounterName.RequestsGood)) ;
- out.println(" Bad requests = "+desc.query.getCounters().value(CounterName.RequestsBad)) ;
- out.println(" Timeouts = "+desc.query.getCounters().value(CounterName.QueryTimeouts)) ;
- out.println(" Bad exec = "+desc.query.getCounters().value(CounterName.QueryExecErrors)) ;
-
- out.println(" SPARQL Update:") ;
- out.println(" Request = "+desc.update.getCounters().value(CounterName.Requests)) ;
- out.println(" Good = "+desc.update.getCounters().value(CounterName.RequestsGood)) ;
- out.println(" Bad requests = "+desc.update.getCounters().value(CounterName.RequestsBad)) ;
- out.println(" Bad exec = "+desc.update.getCounters().value(CounterName.UpdateExecErrors)) ;
-
- out.println(" Upload:") ;
- out.println(" Requests = "+desc.upload.getCounters().value(CounterName.Requests)) ;
- out.println(" Good = "+desc.upload.getCounters().value(CounterName.RequestsGood)) ;
- out.println(" Bad = "+desc.upload.getCounters().value(CounterName.RequestsBad)) ;
-
- out.println(" SPARQL Graph Store Protocol:") ;
- out.println(" GETs = "+gspValue(desc, CounterName.GSPget)+ " (good="+gspValue(desc, CounterName.GSPgetGood)+"/bad="+gspValue(desc, CounterName.GSPgetBad)+")") ;
- out.println(" PUTs = "+gspValue(desc, CounterName.GSPput)+ " (good="+gspValue(desc, CounterName.GSPputGood)+"/bad="+gspValue(desc, CounterName.GSPputBad)+")") ;
- out.println(" POSTs = "+gspValue(desc, CounterName.GSPpost)+ " (good="+gspValue(desc, CounterName.GSPpostGood)+"/bad="+gspValue(desc, CounterName.GSPpostBad)+")") ;
- out.println(" DELETEs = "+gspValue(desc, CounterName.GSPdelete)+ " (good="+gspValue(desc, CounterName.GSPdeleteGood)+"/bad="+gspValue(desc, CounterName.GSPdeleteBad)+")") ;
- out.println(" HEADs = "+gspValue(desc, CounterName.GSPhead)+ " (good="+gspValue(desc, CounterName.GSPheadGood)+"/bad="+gspValue(desc, CounterName.GSPheadBad)+")") ;
- }
-
- private long gspValue(DatasetRef desc, CounterName cn) {
- long x1 = desc.readGraphStore.getCounters().value(cn) ;
- long x2 = desc.readWriteGraphStore.getCounters().value(cn) ;
- return x1+x2 ;
- }
-
-
}
diff --git a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java
index fe71cbf1ba7..07b10d06175 100644
--- a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java
+++ b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java
@@ -447,14 +447,6 @@ private static void addServlet(ServletContextHandler context, ServletHolder hold
context.addFilter(GzipFilter.class, pathSpec, EnumSet.allOf(DispatcherType.class)) ;
}
- private void addJMX() {
- DatasetRegistry registry = DatasetRegistry.get() ;
- for (String ds : registry.keys()) {
- DatasetRef dsRef = registry.get(ds) ;
- addJMX(dsRef) ;
- }
- }
-
private void addJMX(DatasetRef dsRef) {
String x = dsRef.name ;
// if ( x.startsWith("/") )
@@ -472,12 +464,4 @@ private void removeJMX() {
DatasetRef ref = registry.get(ds) ;
}
}
-
- private void removeJMX(DatasetRef dsRef) {
- String x = dsRef.getName() ;
- ARQMgt.unregister(Fuseki.PATH + ".dataset:name=" + x) ;
- for (ServiceRef sRef : dsRef.getServiceRefs()) {
- ARQMgt.unregister(Fuseki.PATH + ".dataset:name=" + x + "/" + sRef.name) ;
- }
- }
}
diff --git a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java
index f7a546dd407..50dd1e2c6be 100644
--- a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java
+++ b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java
@@ -41,7 +41,6 @@
import org.apache.jena.query.* ;
import org.apache.jena.rdf.model.Model ;
import org.apache.jena.riot.WebContent ;
-import org.apache.jena.riot.web.HttpOp ;
import org.apache.jena.sparql.core.Prologue ;
import org.apache.jena.sparql.resultset.SPARQLResult ;
import org.apache.jena.web.HttpSC ;
@@ -377,10 +376,5 @@ private String formatForLog(Query query)
query.serialize(out) ;
return out.asString() ;
}
-
- private String getRemoteString(String queryURI)
- {
- return HttpOp.execHttpGetString(queryURI) ;
- }
}
diff --git a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_REST.java b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_REST.java
index aadbe490896..4bf7079ac53 100644
--- a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_REST.java
+++ b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_REST.java
@@ -165,11 +165,6 @@ protected void service(HttpServletRequest request, HttpServletResponse response)
doCommon(request, response) ;
}
- private void maybeSetLastModified(HttpServletResponse resp, long lastModified) {
- if (resp.containsHeader(HEADER_LASTMOD)) return ;
- if (lastModified >= 0) resp.setDateHeader(HEADER_LASTMOD, lastModified);
- }
-
@Override
protected void perform(HttpAction action) {
dispatch(action) ;
diff --git a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_UberServlet.java b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_UberServlet.java
index 0c10cee80ff..706724df69c 100644
--- a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_UberServlet.java
+++ b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_UberServlet.java
@@ -20,8 +20,6 @@
import static java.lang.String.format ;
-import java.util.List ;
-
import javax.servlet.http.HttpServletRequest ;
import javax.servlet.http.HttpServletResponse ;
@@ -101,17 +99,6 @@ public static class AccessByConfig extends SPARQL_UberServlet
public SPARQL_UberServlet() { super(); }
- private String getEPName(String dsname, List endpoints)
- {
- if (endpoints == null || endpoints.size() == 0) return null ;
- String x = endpoints.get(0) ;
- if ( ! dsname.endsWith("/") )
- x = dsname+"/"+x ;
- else
- x = dsname+x ;
- return x ;
- }
-
// These calls should not happen because we hook in at executeAction
@Override protected void validate(HttpAction action) { throw new FusekiException("Call to SPARQL_UberServlet.validate") ; }
@Override protected void perform(HttpAction action) { throw new FusekiException("Call to SPARQL_UberServlet.perform") ; }
@@ -264,24 +251,6 @@ private void executeRequest(HttpAction action, SPARQL_ServletBase servlet, Servi
servlet.executeLifecycle(action) ;
}
- private void executeRequest(HttpAction action,SPARQL_ServletBase servlet)
- {
- servlet.executeLifecycle(action) ;
-// // Forwarded dispatch.
-// try
-// {
-// String target = getEPName(desc.name, endpointList) ;
-// if ( target == null )
-// errorMethodNotAllowed(request.getMethod()) ;
-// // ** relative servlet forward
-// request.getRequestDispatcher(target).forward(request, response) ;
-
-
-// // ** absolute srvlet forward
-// // getServletContext().getRequestDispatcher(target) ;
-// } catch (Exception e) { errorOccurred(e) ; }
- }
-
protected static MediaType contentNegotationQuads(HttpAction action)
{
MediaType mt = ConNeg.chooseContentType(action.request, DEF.quadsOffer, DEF.acceptNQuads) ;
diff --git a/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TestQuery.java b/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TestQuery.java
index 5c0674f6f1c..5fd01efc8a4 100644
--- a/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TestQuery.java
+++ b/jena-fuseki1/src/test/java/org/apache/jena/fuseki/TestQuery.java
@@ -31,7 +31,6 @@
import org.apache.jena.query.* ;
import org.apache.jena.sparql.core.Var ;
import org.apache.jena.sparql.engine.binding.Binding ;
-import org.apache.jena.sparql.resultset.ResultSetCompare ;
import org.apache.jena.sparql.sse.Item ;
import org.apache.jena.sparql.sse.SSE ;
import org.apache.jena.sparql.sse.builders.BuilderResultSet ;
@@ -105,12 +104,4 @@ private void execQuery(String queryString, int exceptedRowCount)
int x = ResultSetFormatter.consume(rs) ;
assertEquals(exceptedRowCount, x) ;
}
-
- private void execQuery(String queryString, ResultSet expectedResultSet)
- {
- QueryExecution qExec = QueryExecutionFactory.sparqlService(serviceQuery, queryString) ;
- ResultSet rs = qExec.execSelect() ;
- boolean b = ResultSetCompare.equalsByTerm(rs, expectedResultSet) ;
- assertTrue("Result sets different", b) ;
- }
}
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java
index a18976c129e..dacbfe0094c 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/DataServiceDesc.java
@@ -81,8 +81,6 @@ protected DataServiceDescResource(Resource resource) {
this.resource = resource ;
}
- public Resource getResource() { return resource ; }
-
@Override
public DataService build() {
return Builder.buildDataService(resource) ;
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
index 5da6b07e20b..777650f1ffe 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
@@ -30,14 +30,12 @@
import org.apache.jena.fuseki.server.FusekiServerListener ;
import org.apache.jena.fuseki.server.ServerInitialConfig ;
import org.apache.jena.query.ARQ ;
-import org.apache.jena.query.Dataset ;
import org.apache.jena.riot.Lang ;
import org.apache.jena.riot.RDFDataMgr ;
import org.apache.jena.riot.RDFLanguages ;
import org.apache.jena.sparql.core.DatasetGraphFactory ;
import org.apache.jena.tdb.TDB ;
import org.apache.jena.tdb.sys.Names ;
-import org.apache.jena.tdb.transaction.TransactionManager ;
import org.slf4j.Logger ;
import arq.cmd.ArgDecl ;
import arq.cmd.CmdException ;
@@ -111,10 +109,6 @@ static public void innerMain(String... argv) {
public FusekiCmdInner(String... argv) {
super(argv) ;
- if ( false )
- // Consider ...
- TransactionManager.QueueBatchSize = TransactionManager.QueueBatchSize / 2 ;
-
getUsage().startCategory("Fuseki") ;
addModule(modDataset) ;
add(argMem, "--mem", "Create an in-memory, non-persistent dataset for the server") ;
@@ -227,9 +221,6 @@ protected void processModulesAndArgs() {
// Otherwise
if ( contains(assemblerDescDecl) ) {
log.info("Dataset from assembler") ;
- // Need to add service details.
- Dataset ds = modDataset.createDataset() ;
- //cmdLineDataset.dsg = ds.asDatasetGraph() ;
}
if ( cmdlineConfigPresent && getPositional().size() == 0 )
@@ -321,13 +312,6 @@ protected void processModulesAndArgs() {
}
}
- private static String sort_out_dir(String path) {
- path.replace('\\', '/') ;
- if ( !path.endsWith("/") )
- path = path + "/" ;
- return path ;
- }
-
@Override
protected void exec() {
FusekiServerListener.initialSetup = cmdLineDataset ;
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionStats.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionStats.java
index 490bce20da1..cad2d564540 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionStats.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionStats.java
@@ -19,14 +19,8 @@
package org.apache.jena.fuseki.mgt;
import static java.lang.String.format ;
-import static org.apache.jena.riot.WebContent.charsetUTF8 ;
-import static org.apache.jena.riot.WebContent.contentTypeTextPlain ;
-
-import java.io.IOException ;
-import java.util.Iterator ;
import java.util.List ;
-import javax.servlet.ServletOutputStream ;
import javax.servlet.http.HttpServletRequest ;
import javax.servlet.http.HttpServletResponse ;
@@ -136,70 +130,6 @@ private void operationCounters(JsonBuilder builder, Endpoint operation) {
}
}
- private void statsTxt(HttpServletResponse resp) throws IOException
- {
- ServletOutputStream out = resp.getOutputStream() ;
- resp.setContentType(contentTypeTextPlain);
- resp.setCharacterEncoding(charsetUTF8) ;
-
- Iterator iter = DataAccessPointRegistry.get().keys().iterator() ;
- while(iter.hasNext())
- {
- String ds = iter.next() ;
- DataAccessPoint desc = DataAccessPointRegistry.get().get(ds) ;
- statsTxt(out, desc) ;
- if ( iter.hasNext() )
- out.println() ;
- }
- out.flush() ;
- }
-
- private void statsTxt(ServletOutputStream out, DataAccessPoint desc) throws IOException
- {
- DataService dSrv = desc.getDataService() ;
- out.println("Dataset: "+desc.getName()) ;
- out.println(" Requests = "+dSrv.getCounters().value(CounterName.Requests)) ;
- out.println(" Good = "+dSrv.getCounters().value(CounterName.RequestsGood)) ;
- out.println(" Bad = "+dSrv.getCounters().value(CounterName.RequestsBad)) ;
-
- out.println(" SPARQL Query:") ;
- out.println(" Request = "+counter(dSrv, OperationName.Query, CounterName.Requests)) ;
- out.println(" Good = "+counter(dSrv, OperationName.Query, CounterName.RequestsGood)) ;
- out.println(" Bad requests = "+counter(dSrv, OperationName.Query, CounterName.RequestsBad)) ;
- out.println(" Timeouts = "+counter(dSrv, OperationName.Query, CounterName.QueryTimeouts)) ;
- out.println(" Bad exec = "+counter(dSrv, OperationName.Query, CounterName.QueryExecErrors)) ;
- out.println(" IO Errors = "+counter(dSrv, OperationName.Query, CounterName.QueryIOErrors)) ;
-
- out.println(" SPARQL Update:") ;
- out.println(" Request = "+counter(dSrv, OperationName.Update, CounterName.Requests)) ;
- out.println(" Good = "+counter(dSrv, OperationName.Update, CounterName.RequestsGood)) ;
- out.println(" Bad requests = "+counter(dSrv, OperationName.Update, CounterName.RequestsBad)) ;
- out.println(" Bad exec = "+counter(dSrv, OperationName.Update, CounterName.UpdateExecErrors)) ;
-
- out.println(" Upload:") ;
- out.println(" Requests = "+counter(dSrv, OperationName.Upload, CounterName.Requests)) ;
- out.println(" Good = "+counter(dSrv, OperationName.Upload, CounterName.RequestsGood)) ;
- out.println(" Bad = "+counter(dSrv, OperationName.Upload, CounterName.RequestsBad)) ;
-
- out.println(" SPARQL Graph Store Protocol:") ;
- out.println(" GETs = "+gspValue(dSrv, CounterName.HTTPget)+ " (good="+gspValue(dSrv, CounterName.HTTPgetGood)+"/bad="+gspValue(dSrv, CounterName.HTTPGetBad)+")") ;
- out.println(" PUTs = "+gspValue(dSrv, CounterName.HTTPput)+ " (good="+gspValue(dSrv, CounterName.HTTPputGood)+"/bad="+gspValue(dSrv, CounterName.HTTPputBad)+")") ;
- out.println(" POSTs = "+gspValue(dSrv, CounterName.HTTPpost)+ " (good="+gspValue(dSrv, CounterName.HTTPpostGood)+"/bad="+gspValue(dSrv, CounterName.HTTPpostBad)+")") ;
- out.println(" DELETEs = "+gspValue(dSrv, CounterName.HTTPdelete)+ " (good="+gspValue(dSrv, CounterName.HTTPdeleteGood)+"/bad="+gspValue(dSrv, CounterName.HTTPdeleteBad)+")") ;
- out.println(" HEADs = "+gspValue(dSrv, CounterName.HTTPhead)+ " (good="+gspValue(dSrv, CounterName.HTTPheadGood)+"/bad="+gspValue(dSrv, CounterName.HTTPheadBad)+")") ;
- }
-
- private long counter(DataService dSrv, OperationName opName, CounterName cName) {
- return 0 ;
- }
-
- private long gspValue(DataService dSrv, CounterName cn) {
- return counter(dSrv, OperationName.GSP, cn) +
- counter(dSrv, OperationName.GSP_R, cn) ;
- }
-
- // We shouldn't get here - no doPost above.
-
@Override
protected JsonValue execPostContainer(HttpAction action) {
throw new InternalError(METHOD_POST+" container") ;
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/Backup.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/Backup.java
index e9a1fca597a..9a353531dc9 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/Backup.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/Backup.java
@@ -93,18 +93,12 @@ private static void backup(DatasetGraph dsg, String backupfile) {
OutputStream out = null ;
try {
-
- if ( true ) {
- // This seems to achive about the same as "gzip -6"
- // It's not too expensive in elapsed time but it's not
- // zero cost. GZip, large buffer.
- out = new FileOutputStream(backupfile + ".gz") ;
- out = new GZIPOutputStream(out, 8 * 1024) ;
- out = new BufferedOutputStream(out) ;
- } else {
- out = new FileOutputStream(backupfile) ;
- out = new BufferedOutputStream(out) ;
- }
+ // This seems to achive about the same as "gzip -6"
+ // It's not too expensive in elapsed time but it's not
+ // zero cost. GZip, large buffer.
+ out = new FileOutputStream(backupfile + ".gz") ;
+ out = new GZIPOutputStream(out, 8 * 1024) ;
+ out = new BufferedOutputStream(out) ;
RDFDataMgr.write(out, dsg, Lang.NQUADS) ;
out.close() ;
out = null ;
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
index f6488c5a30b..39511d9a748 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/FusekiServer.java
@@ -174,10 +174,6 @@ public synchronized static void init() {
}
}
- private static boolean emptyDir(Path dir) {
- return dir.toFile().list().length <= 2 ;
- }
-
/** Copy a file from src to dst under name fn.
* If src is null, try as a classpath resource
* @param src Source directory, or null meaning use java resource.
@@ -364,19 +360,6 @@ else if ( ! dir.isDirectory())
throw new FusekiConfigException("Not a directory: "+directory) ;
}
- private static void mustExist(Path directory) {
- File dir = directory.toFile() ;
- if ( ! dir.exists() )
- throw new FusekiConfigException("Does not exist: "+directory) ;
- if ( ! dir.isDirectory())
- throw new FusekiConfigException("Not a directory: "+directory) ;
- }
-
- private static boolean exists(Path directory) {
- File dir = directory.toFile() ;
- return dir.exists() ;
- }
-
private static Path writeableDirectory(Path root , String relName ) {
Path p = makePath(root, relName) ;
ensureDir(p);
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java
index 28212a80ab3..21cdacf970a 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Query.java
@@ -52,7 +52,6 @@
import org.apache.jena.query.* ;
import org.apache.jena.rdf.model.Model ;
import org.apache.jena.riot.web.HttpNames ;
-import org.apache.jena.riot.web.HttpOp ;
import org.apache.jena.sparql.core.Prologue ;
import org.apache.jena.sparql.resultset.SPARQLResult ;
import org.apache.jena.web.HttpSC ;
@@ -388,8 +387,4 @@ private String formatForLog(Query query) {
return out.asString() ;
}
- private String getRemoteString(String queryURI) {
- return HttpOp.execHttpGetString(queryURI) ;
- }
-
}
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_UberServlet.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_UberServlet.java
index efc72221387..13482f92a09 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_UberServlet.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_UberServlet.java
@@ -22,8 +22,6 @@
import static org.apache.jena.riot.WebContent.contentTypeSPARQLQuery ;
import static org.apache.jena.riot.WebContent.contentTypeSPARQLUpdate ;
-import java.util.List ;
-
import javax.servlet.http.HttpServletRequest ;
import javax.servlet.http.HttpServletResponse ;
@@ -116,17 +114,6 @@ private boolean isEnabled(HttpAction action, OperationName opName) {
public SPARQL_UberServlet() { super(); }
- private String getEPName(String dsname, List endpoints) {
- if (endpoints == null || endpoints.size() == 0)
- return null ;
- String x = endpoints.get(0) ;
- if ( ! dsname.endsWith("/") )
- x = dsname+"/"+x ;
- else
- x = dsname+x ;
- return x ;
- }
-
// These calls should not happen because we hook in at executeAction
@Override protected void validate(HttpAction action) { throw new FusekiException("Call to SPARQL_UberServlet.validate") ; }
@Override protected void perform(HttpAction action) { throw new FusekiException("Call to SPARQL_UberServlet.perform") ; }
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/DataValidator.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/DataValidator.java
index 055d7986e45..779978c5798 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/DataValidator.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/DataValidator.java
@@ -18,17 +18,11 @@
package org.apache.jena.fuseki.validation;
-import static org.apache.jena.riot.SysRIOT.fmtMessage ;
-
import java.io.StringReader ;
-import java.util.ArrayList ;
-import java.util.List ;
-
import org.apache.jena.atlas.json.JsonBuilder ;
import org.apache.jena.atlas.json.JsonObject ;
import org.apache.jena.fuseki.servlets.ServletOps ;
import org.apache.jena.riot.* ;
-import org.apache.jena.riot.system.ErrorHandler ;
import org.apache.jena.riot.system.StreamRDF ;
import org.apache.jena.riot.system.StreamRDFLib ;
@@ -99,33 +93,6 @@ protected JsonObject execute(ValidationAction action) {
protected String validatorName() {
return "RDF Data" ;
}
-
- // Error handler that records messages
- private static class ErrorHandlerMsg implements ErrorHandler
- {
- private List messages = new ArrayList<>() ;
-
- ErrorHandlerMsg(List messages) { this.messages = messages; }
-
- @Override
- public void warning(String message, long line, long col)
- { output(message, line, col, "Warning", "warning") ; }
-
- // Attempt to continue.
- @Override
- public void error(String message, long line, long col)
- { output(message, line, col, "Error", "error") ; }
-
- @Override
- public void fatal(String message, long line, long col)
- { output(message, line, col, "Fatal", "error") ; throw new RiotException(fmtMessage(message, line, col)) ; }
-
- private void output(String message, long line, long col, String typeName, String className)
- {
- String str = fmtMessage(message, line, col) ;
- messages.add(str) ;
- }
- }
}
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAdmin.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAdmin.java
index d5e6ddbba24..45821218e68 100644
--- a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAdmin.java
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestAdmin.java
@@ -343,12 +343,6 @@ private static void deleteDataset(String name) {
checkInTasks(x) ;
}
- private JsonValue getTask(String taskId) {
- String url = urlRoot+"$/tasks/"+taskId ;
- return httpGetJson(url) ;
- }
-
-
static class JsonResponseHandler implements HttpResponseHandler {
private JsonValue result = null ;
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestQuery.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestQuery.java
index f8742a558ef..cc8b8fa5143 100644
--- a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestQuery.java
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestQuery.java
@@ -31,7 +31,6 @@
import org.apache.jena.query.* ;
import org.apache.jena.sparql.core.Var ;
import org.apache.jena.sparql.engine.binding.Binding ;
-import org.apache.jena.sparql.resultset.ResultSetCompare ;
import org.apache.jena.sparql.sse.Item ;
import org.apache.jena.sparql.sse.SSE ;
import org.apache.jena.sparql.sse.builders.BuilderResultSet ;
@@ -103,12 +102,4 @@ private void execQuery(String queryString, int exceptedRowCount)
int x = ResultSetFormatter.consume(rs) ;
assertEquals(exceptedRowCount, x) ;
}
-
- private void execQuery(String queryString, ResultSet expectedResultSet)
- {
- QueryExecution qExec = QueryExecutionFactory.sparqlService(serviceQuery, queryString) ;
- ResultSet rs = qExec.execSelect() ;
- boolean b = ResultSetCompare.equalsByTerm(rs, expectedResultSet) ;
- assertTrue("Result sets different", b) ;
- }
}
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/ViolationCodes.java b/jena-iri/src/main/java/org/apache/jena/iri/ViolationCodes.java
index 97d085309f4..188f56298ca 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/ViolationCodes.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/ViolationCodes.java
@@ -1,8 +1,5 @@
-
-
-
- /*
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -23,7 +20,6 @@
AUTOGENERATED FILE: DO NOT EDIT
*/
-
package org.apache.jena.iri;
import org.apache.jena.iri.impl.ViolationCodeInfo;
@@ -36,7583 +32,6584 @@
import org.apache.jena.iri.impl.Specification;
import org.apache.jena.iri.impl.SchemeSpecification;
import org.apache.jena.iri.impl.Force;
-
+
/**
- * Detailed description of problems detected.
- * This interface lists the codes returned by
- * {@link Violation#getViolationCode()}.
- * Note: not all are errors, some merely reflect internal workings.
-
- The violations are evaluated against the following standards:
-
-
-
- [RDF]
-
-
-
-
-Resource Description Framework (RDF):
-Concepts and Abstract Syntax
-
- (section RDF URI References)
-
-
-
-
- The SCHEME component is required.
-
-
- The following are examples of ill-formed IRIs using this scheme:
-
-
- <foo/bar>
-
- <#frag>
-
- <//example.org/foo/bar#frag>
-
-
-
-
-
- [URI]
-
- RFC 3986
-
-
- Uniform Resource Identifier (URI): Generic Syntax
-
-
- [Unicode]
-
-
-
- Unicode
-
-
- [IRI]
-
- RFC 3987
-
-
- Internationalized Resource Identifiers (IRIs)
-
-
- [XML]
-
-
-
- Extensible Markup Language (XML) 1.0 (Third Edition)
- (section system identifier)
-
-
-
-
- The FRAGMENT component must be omitted.
-
-
-
- [XLink]
-
-
-
- XML Linking Language (XLink) Version 1.0
- (section Locator Attribute (href))
-
-
-
- [Schema]
-
-
-
- XML Schema Part 2: Datatypes Second Edition
- (section anyURI)
-
-
-
-
-
- Scheme specific checks are enabled. The syntax of the following schemes is fully supported:
-
-
-
- [http]
-
- RFC 2616
-
-
- Hypertext Transfer Protocol -- HTTP/1.1
-
-
-
- Pertinent text from the specification includes:
-
-
-
-
- See
- section 3.2.2
-
-
-
-
-http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]
-
-
-
-
-
-
-
-
-
-
- This scheme requires the use of hostnames conforming to DNS syntax.
- The IDNA compatibile processing of IRIs for this scheme is enabled if this scheme is enabled.
- To disable this behaviour, this scheme has to be disabled using // TODO how to disable scheme
- and DNS compatibile rules have to be disabled using {@link IRIFactory#dnsViolation}.
-
- The default port is 80.
-
- The USER component must be omitted.
-
- The HOST component is required.
-
-
- The following are examples of well-formed IRIs using this scheme:
-
-
- <http://www.example.org/foo/bar>
-
-
-
-
- The following are examples of ill-formed IRIs using this scheme:
-
-
- <http://www.example.org:80/foo/bar>
-
- <http:foo/bar>
-
- <http://user@www.example.org/foo/bar>
-
-
-
-
-
- [https]
-
- RFC 2818
-
-
- Hypertext Transfer Protocol Secure
-
-
-
- Pertinent text from the specification includes:
-
-
-
-
- See
- section 2.4
-
-
-HTTP/TLS is differentiated from HTTP URIs by using the 'https' protocol identifier in place of the 'http' protocol identifier.
-
-
-
-
- See
- [http] , specifically,
- section 3.2.2
-
-
-
-
-http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]
-
-
-
-
-
-
-
-
-
-
- This scheme requires the use of hostnames conforming to DNS syntax.
- The IDNA compatibile processing of IRIs for this scheme is enabled if this scheme is enabled.
- To disable this behaviour, this scheme has to be disabled using // TODO how to disable scheme
- and DNS compatibile rules have to be disabled using {@link IRIFactory#dnsViolation}.
-
- The default port is 443.
-
- The USER component must be omitted.
-
- The HOST component is required.
-
-
- The following are examples of well-formed IRIs using this scheme:
-
-
- <https://www.example.org/foo/bar>
-
-
-
-
- The following are examples of ill-formed IRIs using this scheme:
-
-
- <https://www.example.org:443/foo/bar>
-
- <https:foo/bar>
-
- <https://user@www.example.org/foo/bar>
-
-
-
-
-
- [ftp]
-
- RFC 1738
-
-
- File Transfer Protocol
- (section 3.2)
-
-
-
-
- Pertinent text from the specification includes:
-
-
-
-
- See
- section 5
-
-
-
-
-ftpurl = "ftp://" login [ "/" fpath [ ";type=" ftptype ]]
-fpath = fsegment *[ "/" fsegment ]
-fsegment = *[ uchar | "?" | ":" | "@" | "&" | "=" ]
-ftptype = "A" | "I" | "D" | "a" | "i" | "d"
-
-
-
-
-login = [ user [ ":" password ] "@" ] hostport
-
-
-
-
-safe = "$" | "-" | "_" | "." | "+"
-extra = "!" | "*" | "'" | "(" | ")" | ","
-escape = "%" hex hex
-unreserved = alpha | digit | safe | extra
-uchar = unreserved | escape
-
-
-
-
-
-
-
-
-
-
- This scheme requires the use of hostnames conforming to DNS syntax.
- The IDNA compatibile processing of IRIs for this scheme is enabled if this scheme is enabled.
- To disable this behaviour, this scheme has to be disabled using // TODO how to disable scheme
- and DNS compatibile rules have to be disabled using {@link IRIFactory#dnsViolation}.
-
- The default port is 21.
-
- The HOST component is required.
-
- The PATHQUERY component:
-
-
- is required to match the regular expression: [^;~]*(;@{mustLowerCase(type)}=@{shouldLowerCase([aid])}|)
-
-
- may use ~; as sub-delimiters, and care must
- be taken when percent escaping or unescaping these delimiters to not disrupt
- the scheme specific syntax.
-
-
-
-
- The following are examples of well-formed IRIs using this scheme:
-
-
- <ftp://user@example.org/foo/bar;type=d>
-
-
-
-
- The following are examples of ill-formed IRIs using this scheme:
-
-
- <ftp:///foo/bar>
-
- <ftp://user@example.org/foo/bar;type=z>
-
- <ftp://user@example.org/foo/b;ar;type=d>
-
-
-
-
-
- [news]
-
- RFC 1738
-
-
- USENET news
- (section 3.6)
-
-
-
-
- Pertinent text from the specification includes:
-
-
-
-
- See
- section 5
-
-
-
-
-newsurl = "news:" grouppart
-grouppart = "*" | group | article
-group = alpha *[ alpha | digit | "-" | "." | "+" | "_" ]
-article = 1*[ uchar | ";" | "/" | "?" | ":" | "&" | "=" ] "@" host
-
-
-
-
-safe = "$" | "-" | "_" | "." | "+"
-extra = "!" | "*" | "'" | "(" | ")" | ","
-escape = "%" hex hex
-unreserved = alpha | digit | safe | extra
-uchar = unreserved | escape
-
-
-
-
-
-
-
-
-
- The AUTHORITY component must be omitted.
-
- The PATH component is required.
-
- The PATHQUERY component:
-
-
- is required to match the regular expression: [^@]+@@{host}|[*]|[a-zA-Z][-a-zA-Z0-9.+_]*
-
-
- may use ~@ as sub-delimiters, and care must
- be taken when percent escaping or unescaping these delimiters to not disrupt
- the scheme specific syntax.
-
-
-
-
- The following are examples of well-formed IRIs using this scheme:
-
-
- <news:*>
-
- <news:group.it>
-
- <news:arb?itrary@news.example.org>
-
- <news:arbitrary@news.example.org>
-
-
-
-
- The following are examples of ill-formed IRIs using this scheme:
-
-
- <news:arbitrary@news.exampl\u00E7.org>
-
- <news:arbitr?ary@news.exampl\u00E7.org>
-
- <news:///foo/bar>
-
- <news://user@example.org/foo>
-
-
-
-
-
- [nntp]
-
- RFC 1738
-
-
- USENET news using NNTP access
- (section 3.7)
-
-
-
-
- Pertinent text from the specification includes:
-
-
-
-
- See
- section 5
-
-
-
-
-nntpurl = "nntp://" hostport "/" group [ "/" digits ]
-
-
-
-
-group = alpha *[ alpha | digit | "-" | "." | "+" | "_" ]
-
-
-
-
-
-
-
-
-
-
- This scheme requires the use of hostnames conforming to DNS syntax.
- The IDNA compatibile processing of IRIs for this scheme is enabled if this scheme is enabled.
- To disable this behaviour, this scheme has to be disabled using // TODO how to disable scheme
- and DNS compatibile rules have to be disabled using {@link IRIFactory#dnsViolation}.
-
- The default port is 119.
-
- The QUERY component must be omitted.
-
- The USER component must be omitted.
-
- The HOST component is required.
-
- The PATH component
- is required to match the regular expression: /[a-zA-Z][-a-zA-Z0-9.+_]*(/[0-9]+)?
-
-
-
- The following are examples of well-formed IRIs using this scheme:
-
-
- <nntp://example.org/foo4>
-
- <nntp://example.org/foo/4>
-
-
-
-
- The following are examples of ill-formed IRIs using this scheme:
-
-
- <nntp://user@example.org/foo>
-
- <nntp:/foo>
-
- <nntp:///foo>
-
- <nntp://example.org/foo/4/3>
-
- <nntp://example.org/>
-
- <nntp://example.org/foo/>
-
- <nntp://example.org/*>
-
-
-
-
-
- [file]
-
- RFC 1738
-
-
- Host-specific file names
- (section 3.10)
-
-
-
-
- Pertinent text from the specification includes:
-
-
-
-
- See
- section 5
-
-
-
-
-fileurl = "file://" [ host | "localhost" ] "/" fpath
-
-
-
-
-fpath = fsegment *[ "/" fsegment ]
-fsegment = *[ uchar | "?" | ":" | "@" | "&" | "=" ]
-
-
-
-
-safe = "$" | "-" | "_" | "." | "+"
-extra = "!" | "*" | "'" | "(" | ")" | ","
-escape = "%" hex hex
-unreserved = alpha | digit | safe | extra
-uchar = unreserved | escape
-
-
-
-
-
-
-
-
-
-
- This scheme requires the use of hostnames conforming to DNS syntax.
- The IDNA compatibile processing of IRIs for this scheme is enabled if this scheme is enabled.
- To disable this behaviour, this scheme has to be disabled using // TODO how to disable scheme
- and DNS compatibile rules have to be disabled using {@link IRIFactory#dnsViolation}.
-
- The USER component must be omitted.
-
- The PORT component must be omitted.
-
- The PATH component is required.
-
- The AUTHORITY component is required.
-
- The PATHQUERY component:
-
-
- is required to match the regular expression: [^;~]*
-
-
- may use ~; as sub-delimiters, and care must
- be taken when percent escaping or unescaping these delimiters to not disrupt
- the scheme specific syntax.
-
-
-
-
- The following are examples of well-formed IRIs using this scheme:
-
-
- <file:///foo/b>
-
- <file:///foo/b?ar/yuk>
-
-
-
-
- The following are examples of ill-formed IRIs using this scheme:
-
-
- <file://user@example.org/foo/bar>
-
- <file://eg:4029/foo/bar>
-
- <file:/foo/bar>
-
- <file://example.org>
-
- <file://foo/bar;t>
-
- <file://foo/~jjc>
-
-
-
-
-
-
-
-
- The syntax of the following schemes is partially supported:
-
-
-
- [mailto]
-
- RFC 2368
-
-
- Electronic mail address
-
-
-
- The AUTHORITY component must be omitted.
-
-
-
- [urn]
-
- RFC 2141
-
-
- Uniform Resource Names
-
-
-
- Pertinent text from the specification includes:
-
-
-
-
- See
- section 2
-
-
- All URNs have the following syntax (phrases enclosed in quotes are REQUIRED):
-
-
-<URN> ::= "urn:" <NID> ":" <NSS>
-
-
-
-
-
-
- See
- section 2.1
-
-
-
-
-<NID> ::= <let-num> [ 1,31<let-num-hyp> ]
-
-<let-num-hyp> ::= <upper> | <lower> | <number> | "-"
-
-<let-num> ::= <upper> | <lower> | <number>
-
-
-
-
-
-
- See
- section 2.2
-
-
-
-
-<NSS> ::= 1*<URN chars>
-
-<URN chars> ::= <trans> | "%" <hex> <hex>
-
-<trans> ::= <upper> | <lower> | <number> | <other> | <reserved>
-
-<other> ::= "(" | ")" | "+" | "," | "-" | "." |
- ":" | "=" | "@" | ";" | "$" |
- "_" | "!" | "*" | "'"
-
-
-
-
-
-
- See
- section 2.3.2
-
-
-RFC 1630 [2] reserves the characters "/", "?", and "#" for particular purposes.
-The URN-WG has not yet debated the applicability and precise semantics of those
-purposes as applied to URNs. Therefore, these characters are RESERVED for future
-developments. Namespace developers SHOULD NOT use these characters in unencoded form,
-but rather use the appropriate %-encoding for each character.
-
-
-
-
-
-
-
- The AUTHORITY component must be omitted.
-
- The QUERY component must be omitted.
-
- The PATH component is required.
-
- The PATH component:
-
-
- is required to match the regular expression: (?![uU][rR][nN]:)[a-zA-Z0-9][-a-zA-Z0-9]{1,31}:[^/~]+
-
-
- may use /~ as sub-delimiters, and care must
- be taken when percent escaping or unescaping these delimiters to not disrupt
- the scheme specific syntax.
-
-
- TODO: case of NIS TODO:
- registry of URNs, implement something of the NSS with Namespace specific rules.
- TODO:
- To avoid confusion with the "urn:" identifier, the NID "urn" is reserved and MUST NOT be used.
- TODO: e-mail about frags in URNs TODO:
-In addition, octet 0 (0 hex) should NEVER be used, in either unencoded or %-encoded form.
-
-
- The following are examples of well-formed IRIs using this scheme:
-
-
- <urn:x-hp:foo\u00E9>
-
- <urn:urn-1:foo>
-
-
-
-
- The following are examples of ill-formed IRIs using this scheme:
-
-
- <urn:x-hp:foo/bar>
-
- <urn:urn:foo>
-
- <urn://foo>
-
- <urn:foo:bar?query>
-
- <urn:foo:ff~>
-
-
-
-
-
-
-
-
- The names of the following registered schemes are known, but they are otherwise unsupported:
-
-
-
- [telnet]
-
- RFC 4248
-
-
- Reference to interactive sessions
-
-
- [wais]
-
- RFC 4156
-
-
- Wide Area Information Servers
-
-
- [prospero]
-
- RFC 4157
-
-
- Prospero Directory Service
-
-
- [gopher]
-
- RFC 4266
-
-
- The gopher URI scheme
-
-
- [z39.50s]
-
- RFC 2056
-
-
- Z39.50 Session
-
-
- [z39.50r]
-
- RFC 2056
-
-
- Z39.50 Retrieval
-
-
- [cid]
-
- RFC 2392
-
-
- content identifier
-
-
- [mid]
-
- RFC 2392
-
-
- message identifier
-
-
- [vemmi]
-
- RFC 2122
-
-
- versatile multimedia interface
-
-
- [service]
-
- RFC 2609
-
-
- service location
-
-
- [imap]
-
- RFC 2192
-
-
- internet message access protocol
-
-
- [nfs]
-
- RFC 2224
-
-
- network file system protocol
-
-
- [acap]
-
- RFC 2244
-
-
- application configuration access protocol
-
-
- [rtsp]
-
- RFC 2326
-
-
- real time streaming protocol
-
-
- [tip]
-
- RFC 2371
-
-
- Transaction Internet Protocol
-
-
- [pop]
-
- RFC 2384
-
-
- Post Office Protocol v3
-
-
- [data]
-
- RFC 2397
-
-
- data
-
-
- [dav]
-
- RFC 2518
-
-
- dav
-
-
- [opaquelocktoken]
-
- RFC 2518
-
-
- opaquelocktoken
-
-
- [sip]
-
- RFC 3261
-
-
- session initiation protocol
-
-
- [sips]
-
- RFC 3261
-
-
- secure session intitiaion protocol
-
-
- [tel]
-
- RFC 2806
-
-
- telephone
-
-
- [fax]
-
- RFC 2806
-
-
- fax
-
-
- [modem]
-
- RFC 2806
-
-
- modem
-
-
- [soap.beep]
-
- RFC 3288
-
-
- soap.beep
-
-
- [soap.beeps]
-
- RFC 3288
-
-
- soap.beeps
-
-
- [xmlrpc.beep]
-
- RFC 3529
-
-
- xmlrpc.beep
-
-
- [xmlrpc.beeps]
-
- RFC 3529
-
-
- xmlrpc.beeps
-
-
- [go]
-
- RFC 3368
-
-
- go
-
-
- [h323]
-
- RFC 3508
-
-
- H.323
-
-
- [ipp]
-
- RFC 3510
-
-
- Internet Printing Protocol
-
-
- [tftp]
-
- RFC 3617
-
-
- Trivial File Transfer Protocol
-
-
- [mupdate]
-
- RFC 3656
-
-
- Mailbox Update (MUPDATE) Protocol
-
-
- [pres]
-
- RFC 3859
-
-
- Presence
-
-
- [im]
-
- RFC 3860
-
-
- Instant Messaging
-
-
- [mtqp]
-
- RFC 3887
-
-
- Message Tracking Query Protocol
-
-
- [iris.beep]
-
- RFC 3983
-
-
- iris.beep
-
-
- [dict]
-
- RFC 2229
-
-
- dictionary service protocol
-
-
- [snmp]
-
- RFC 4088
-
-
- Simple Network Management Protocol
-
-
- [crid]
-
- RFC 4078
-
-
- TV-Anytime Content Reference Identifier
-
-
- [tag]
-
- RFC 4151
-
-
- tag
-
-
- [afs]
-
-
-
- Andrew File System global file names
-
-
- [tn3270]
-
-
-
- Interactive 3270 emulation sessions
-
-
- [mailserver]
-
-
-
- Access to data available from mail servers
-
-
- [dns]
-
-
-
- Domain Name System
-
-
- [info]
-
-
-
- Information Assets with Identifiers in Public Namespaces
-
-
- [ldap]
-
-
-
- Lightweight Directory Access Protocol
-
-
-
-
- Other relevant standards include:
-
-
-
- [URL_Registratrion]
-
- RFC 2717
-
-
-
- Registration Procedures for URL
- Scheme Names
-
-
-
-
+ * Detailed description of problems detected. This interface lists the codes
+ * returned by {@link Violation#getViolationCode()}. Note: not all are errors,
+ * some merely reflect internal workings.
+ *
+ *
+ * The violations are evaluated against the following standards:
+ *
+ *
+ *
+ * [RDF]
+ *
+ *
+ *
+ *
+ * Resource Description Framework (RDF): Concepts and Abstract Syntax
+ *
+ * (section RDF URI References)
+ *
+ *
+ * The SCHEME component is required.
+ *
+ *
+ * The following are examples of ill-formed IRIs using this scheme:
+ *
+ *
+ * <foo/bar>
+ *
+ * <#frag>
+ *
+ * <//example.org/foo/bar#frag>
+ *
+ *
+ *
+ *
+ *
+ * [URI]
+ *
+ * RFC 3986
+ * Uniform Resource
+ * Identifier (URI): Generic Syntax
+ *
+ * [Unicode]
+ *
+ *
+ * Unicode
+ *
+ * [IRI]
+ *
+ * RFC 3987
+ * Internationalized
+ * Resource Identifiers (IRIs)
+ *
+ * [XML]
+ *
+ *
+ *
+ * Extensible Markup Language (XML) 1.0 (Third Edition) (section system
+ * identifier)
+ *
+ *
+ * The FRAGMENT component must be omitted.
+ *
+ *
+ *
+ * [XLink]
+ *
+ *
+ *
+ * XML Linking Language (XLink) Version 1.0 (section Locator Attribute (href))
+ *
+ *
+ * [Schema]
+ *
+ *
+ * XML
+ * Schema Part 2: Datatypes Second Edition (section anyURI)
+ *
+ *
+ *
+ *
+ * Scheme specific checks are enabled. The syntax of the following schemes is
+ * fully supported:
+ *
+ *
+ *
+ * [http]
+ *
+ * RFC 2616
+ * Hypertext Transfer
+ * Protocol -- HTTP/1.1
+ *
+ *
+ * Pertinent text from the specification includes:
+ *
+ *
+ *
+ * See section
+ * 3.2.2
+ *
+ *
+ *
+ * http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This scheme requires the use of hostnames conforming to DNS syntax. The IDNA
+ * compatibile processing of IRIs for this scheme is enabled if this scheme is
+ * enabled. To disable this behaviour, this scheme has to be disabled using //
+ * TODO how to disable scheme and DNS compatibile rules have to be disabled
+ * using {@link IRIFactory#dnsViolation}.
+ *
+ * The default port is 80.
+ *
+ * The USER component must be omitted.
+ *
+ * The HOST component is required.
+ *
+ *
+ * The following are examples of well-formed IRIs using this scheme:
+ *
+ *
+ * <http://www.example.org/foo/bar>
+ *
+ *
+ *
+ *
+ * The following are examples of ill-formed IRIs using this scheme:
+ *
+ *
+ * <http://www.example.org:80/foo/bar>
+ *
+ * <http:foo/bar>
+ *
+ * <http://user@www.example.org/foo/bar>
+ *
+ *
+ *
+ *
+ *
+ * [https]
+ *
+ * RFC 2818
+ * Hypertext Transfer
+ * Protocol Secure
+ *
+ *
+ * Pertinent text from the specification includes:
+ *
+ *
+ *
+ * See section
+ * 2.4
+ *
+ * HTTP/TLS is differentiated from HTTP URIs by using the 'https' protocol
+ * identifier in place of the 'http' protocol identifier.
+ *
+ *
+ *
+ *
+ * See [http] , specifically, section 3.2.2
+ *
+ *
+ *
+ * http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This scheme requires the use of hostnames conforming to DNS syntax. The IDNA
+ * compatibile processing of IRIs for this scheme is enabled if this scheme is
+ * enabled. To disable this behaviour, this scheme has to be disabled using //
+ * TODO how to disable scheme and DNS compatibile rules have to be disabled
+ * using {@link IRIFactory#dnsViolation}.
+ *
+ * The default port is 443.
+ *
+ * The USER component must be omitted.
+ *
+ * The HOST component is required.
+ *
+ *
+ * The following are examples of well-formed IRIs using this scheme:
+ *
+ *
+ * <https://www.example.org/foo/bar>
+ *
+ *
+ *
+ *
+ * The following are examples of ill-formed IRIs using this scheme:
+ *
+ *
+ * <https://www.example.org:443/foo/bar>
+ *
+ * <https:foo/bar>
+ *
+ * <https://user@www.example.org/foo/bar>
+ *
+ *
+ *
+ *
+ *
+ * [ftp]
+ *
+ * RFC 1738
+ * File
+ * Transfer Protocol (section 3.2)
+ *
+ *
+ * Pertinent text from the specification includes:
+ *
+ *
+ *
+ * See section 5
+ *
+ *
+ *
+ * ftpurl = "ftp://" login [ "/" fpath [ ";type=" ftptype ]]
+ * fpath = fsegment *[ "/" fsegment ]
+ * fsegment = *[ uchar | "?" | ":" | "@" | "&" | "=" ]
+ * ftptype = "A" | "I" | "D" | "a" | "i" | "d"
+ *
+ *
+ *
+ *
+ * login = [ user [ ":" password ] "@" ] hostport
+ *
+ *
+ *
+ *
+ * safe = "$" | "-" | "_" | "." | "+"
+ * extra = "!" | "*" | "'" | "(" | ")" | ","
+ * escape = "%" hex hex
+ * unreserved = alpha | digit | safe | extra
+ * uchar = unreserved | escape
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This scheme requires the use of hostnames conforming to DNS syntax. The IDNA
+ * compatibile processing of IRIs for this scheme is enabled if this scheme is
+ * enabled. To disable this behaviour, this scheme has to be disabled using //
+ * TODO how to disable scheme and DNS compatibile rules have to be disabled
+ * using {@link IRIFactory#dnsViolation}.
+ *
+ * The default port is 21.
+ *
+ * The HOST component is required.
+ *
+ * The PATHQUERY component:
+ *
+ *
+ * is required to match the regular expression:
+ * [^;~]*(;@{mustLowerCase(type)}=@{shouldLowerCase([aid])}|)
+ *
+ * may use ~; as sub-delimiters, and care must be taken when percent escaping or
+ * unescaping these delimiters to not disrupt the scheme specific syntax.
+ *
+ *
+ *
+ * The following are examples of well-formed IRIs using this scheme:
+ *
+ *
+ * <ftp://user@example.org/foo/bar;type=d>
+ *
+ *
+ *
+ *
+ * The following are examples of ill-formed IRIs using this scheme:
+ *
+ *
+ * <ftp:///foo/bar>
+ *
+ * <ftp://user@example.org/foo/bar;type=z>
+ *
+ * <ftp://user@example.org/foo/b;ar;type=d>
+ *
+ *
+ *
+ *
+ *
+ * [news]
+ *
+ * RFC 1738
+ * USENET news
+ * (section 3.6)
+ *
+ *
+ * Pertinent text from the specification includes:
+ *
+ *
+ *
+ * See section 5
+ *
+ *
+ *
+ * newsurl = "news:" grouppart
+ * grouppart = "*" | group | article
+ * group = alpha *[ alpha | digit | "-" | "." | "+" | "_" ]
+ * article = 1*[ uchar | ";" | "/" | "?" | ":" | "&" | "=" ] "@" host
+ *
+ *
+ *
+ *
+ * safe = "$" | "-" | "_" | "." | "+"
+ * extra = "!" | "*" | "'" | "(" | ")" | ","
+ * escape = "%" hex hex
+ * unreserved = alpha | digit | safe | extra
+ * uchar = unreserved | escape
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * The AUTHORITY component must be omitted.
+ *
+ * The PATH component is required.
+ *
+ * The PATHQUERY component:
+ *
+ *
+ * is required to match the regular expression:
+ * [^@]+@@{host}|[*]|[a-zA-Z][-a-zA-Z0-9.+_]*
+ *
+ * may use ~@ as sub-delimiters, and care must be taken when percent escaping or
+ * unescaping these delimiters to not disrupt the scheme specific syntax.
+ *
+ *
+ *
+ * The following are examples of well-formed IRIs using this scheme:
+ *
+ *
+ * <news:*>
+ *
+ * <news:group.it>
+ *
+ * <news:arb?itrary@news.example.org>
+ *
+ * <news:arbitrary@news.example.org>
+ *
+ *
+ *
+ *
+ * The following are examples of ill-formed IRIs using this scheme:
+ *
+ *
+ * <news:arbitrary@news.exampl\u00E7.org>
+ *
+ * <news:arbitr?ary@news.exampl\u00E7.org>
+ *
+ * <news:///foo/bar>
+ *
+ * <news://user@example.org/foo>
+ *
+ *
+ *
+ *
+ *
+ * [nntp]
+ *
+ * RFC 1738
+ * USENET news
+ * using NNTP access (section 3.7)
+ *
+ *
+ * Pertinent text from the specification includes:
+ *
+ *
+ *
+ * See section 5
+ *
+ *
+ *
+ * nntpurl = "nntp://" hostport "/" group [ "/" digits ]
+ *
+ *
+ *
+ *
+ * group = alpha *[ alpha | digit | "-" | "." | "+" | "_" ]
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This scheme requires the use of hostnames conforming to DNS syntax. The IDNA
+ * compatibile processing of IRIs for this scheme is enabled if this scheme is
+ * enabled. To disable this behaviour, this scheme has to be disabled using //
+ * TODO how to disable scheme and DNS compatibile rules have to be disabled
+ * using {@link IRIFactory#dnsViolation}.
+ *
+ * The default port is 119.
+ *
+ * The QUERY component must be omitted.
+ *
+ * The USER component must be omitted.
+ *
+ * The HOST component is required.
+ *
+ * The PATH component is required to match the regular expression:
+ * /[a-zA-Z][-a-zA-Z0-9.+_]*(/[0-9]+)?
+ *
+ *
+ * The following are examples of well-formed IRIs using this scheme:
+ *
+ *
+ * <nntp://example.org/foo4>
+ *
+ * <nntp://example.org/foo/4>
+ *
+ *
+ *
+ *
+ * The following are examples of ill-formed IRIs using this scheme:
+ *
+ *
+ * <nntp://user@example.org/foo>
+ *
+ * <nntp:/foo>
+ *
+ * <nntp:///foo>
+ *
+ * <nntp://example.org/foo/4/3>
+ *
+ * <nntp://example.org/>
+ *
+ * <nntp://example.org/foo/>
+ *
+ * <nntp://example.org/*>
+ *
+ *
+ *
+ *
+ *
+ * [file]
+ *
+ * RFC 1738
+ *
+ * Host-specific file names (section 3.10)
+ *
+ *
+ * Pertinent text from the specification includes:
+ *
+ *
+ *
+ * See section 5
+ *
+ *
+ *
+ * fileurl = "file://" [ host | "localhost" ] "/" fpath
+ *
+ *
+ *
+ *
+ * fpath = fsegment *[ "/" fsegment ]
+ * fsegment = *[ uchar | "?" | ":" | "@" | "&" | "=" ]
+ *
+ *
+ *
+ *
+ * safe = "$" | "-" | "_" | "." | "+"
+ * extra = "!" | "*" | "'" | "(" | ")" | ","
+ * escape = "%" hex hex
+ * unreserved = alpha | digit | safe | extra
+ * uchar = unreserved | escape
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This scheme requires the use of hostnames conforming to DNS syntax. The IDNA
+ * compatibile processing of IRIs for this scheme is enabled if this scheme is
+ * enabled. To disable this behaviour, this scheme has to be disabled using //
+ * TODO how to disable scheme and DNS compatibile rules have to be disabled
+ * using {@link IRIFactory#dnsViolation}.
+ *
+ * The USER component must be omitted.
+ *
+ * The PORT component must be omitted.
+ *
+ * The PATH component is required.
+ *
+ * The AUTHORITY component is required.
+ *
+ * The PATHQUERY component:
+ *
+ *
+ * is required to match the regular expression: [^;~]*
+ *
+ * may use ~; as sub-delimiters, and care must be taken when percent escaping or
+ * unescaping these delimiters to not disrupt the scheme specific syntax.
+ *
+ *
+ *
+ * The following are examples of well-formed IRIs using this scheme:
+ *
+ *
+ * <file:///foo/b>
+ *
+ * <file:///foo/b?ar/yuk>
+ *
+ *
+ *
+ *
+ * The following are examples of ill-formed IRIs using this scheme:
+ *
+ *
+ * <file://user@example.org/foo/bar>
+ *
+ * <file://eg:4029/foo/bar>
+ *
+ * <file:/foo/bar>
+ *
+ * <file://example.org>
+ *
+ * <file://foo/bar;t>
+ *
+ * <file://foo/~jjc>
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * The syntax of the following schemes is partially supported:
+ *
+ *
+ *
+ * [mailto]
+ *
+ * RFC 2368
+ * Electronic mail
+ * address
+ *
+ *
+ * The AUTHORITY component must be omitted.
+ *
+ *
+ *
+ * [urn]
+ *
+ * RFC 2141
+ * Uniform Resource
+ * Names
+ *
+ *
+ * Pertinent text from the specification includes:
+ *
+ *
+ *
+ * See section 2
+ *
+ * All URNs have the following syntax (phrases enclosed in quotes are REQUIRED):
+ *
+ *
+ * <URN> ::= "urn:" <NID> ":" <NSS>
+ *
+ *
+ *
+ *
+ *
+ *
+ * See section
+ * 2.1
+ *
+ *
+ *
+ * <NID> ::= <let-num> [ 1,31<let-num-hyp> ]
+ *
+ * <let-num-hyp> ::= <upper> | <lower> | <number> | "-"
+ *
+ * <let-num> ::= <upper> | <lower> | <number>
+ *
+ *
+ *
+ *
+ *
+ *
+ * See section
+ * 2.2
+ *
+ *
+ *
+ * <NSS> ::= 1*<URN chars>
+ *
+ * <URN chars> ::= <trans> | "%" <hex> <hex>
+ *
+ * <trans> ::= <upper> | <lower> | <number> | <other> | <reserved>
+ *
+ * <other> ::= "(" | ")" | "+" | "," | "-" | "." |
+ * ":" | "=" | "@" | ";" | "$" |
+ * "_" | "!" | "*" | "'"
+ *
+ *
+ *
+ *
+ *
+ *
+ * See section
+ * 2.3.2
+ *
+ * RFC 1630 [2] reserves the characters "/", "?", and "#" for particular
+ * purposes. The URN-WG has not yet debated the applicability and precise
+ * semantics of those purposes as applied to URNs. Therefore, these characters
+ * are RESERVED for future developments. Namespace developers SHOULD NOT use
+ * these characters in unencoded form, but rather use the appropriate %-encoding
+ * for each character.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * The AUTHORITY component must be omitted.
+ *
+ * The QUERY component must be omitted.
+ *
+ * The PATH component is required.
+ *
+ * The PATH component:
+ *
+ *
+ * is required to match the regular expression:
+ * (?![uU][rR][nN]:)[a-zA-Z0-9][-a-zA-Z0-9]{1,31}:[^/~]+
+ *
+ * may use /~ as sub-delimiters, and care must be taken when percent escaping or
+ * unescaping these delimiters to not disrupt the scheme specific syntax.
+ *
+ *
+ * TODO: case of NIS
+ * TODO: registry of URNs, implement something of the NSS with Namespace
+ * specific rules.
+ * TODO: To avoid confusion with the "urn:" identifier, the NID "urn" is
+ * reserved and MUST NOT be used.
+ * TODO: e-mail about frags in URNs
+ * TODO: In addition, octet 0 (0 hex) should NEVER be used, in either unencoded
+ * or %-encoded form.
+ *
+ *
+ * The following are examples of well-formed IRIs using this scheme:
+ *
+ *
+ * <urn:x-hp:foo\u00E9>
+ *
+ * <urn:urn-1:foo>
+ *
+ *
+ *
+ *
+ * The following are examples of ill-formed IRIs using this scheme:
+ *
+ *
+ * <urn:x-hp:foo/bar>
+ *
+ * <urn:urn:foo>
+ *
+ * <urn://foo>
+ *
+ * <urn:foo:bar?query>
+ *
+ * <urn:foo:ff~>
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * The names of the following registered schemes are known, but they are
+ * otherwise unsupported:
+ *
+ *
+ *
+ * [telnet]
+ *
+ * RFC 4248
+ * Reference to interactive
+ * sessions
+ *
+ * [wais]
+ *
+ * RFC 4156
+ * Wide Area Information
+ * Servers
+ *
+ * [prospero]
+ *
+ * RFC 4157
+ * Prospero Directory
+ * Service
+ *
+ * [gopher]
+ *
+ * RFC 4266
+ * The gopher URI scheme
+ *
+ * [z39.50s]
+ *
+ * RFC 2056
+ * Z39.50 Session
+ *
+ * [z39.50r]
+ *
+ * RFC 2056
+ * Z39.50 Retrieval
+ *
+ *
+ * [cid]
+ *
+ * RFC 2392
+ * content
+ * identifier
+ *
+ * [mid]
+ *
+ * RFC 2392
+ * message
+ * identifier
+ *
+ * [vemmi]
+ *
+ * RFC 2122
+ * versatile multimedia
+ * interface
+ *
+ * [service]
+ *
+ * RFC 2609
+ * service location
+ *
+ *
+ * [imap]
+ *
+ * RFC 2192
+ * internet message
+ * access protocol
+ *
+ * [nfs]
+ *
+ * RFC 2224
+ * network file system
+ * protocol
+ *
+ * [acap]
+ *
+ * RFC 2244
+ * application
+ * configuration access protocol
+ *
+ * [rtsp]
+ *
+ * RFC 2326
+ * real time streaming
+ * protocol
+ *
+ * [tip]
+ *
+ * RFC 2371
+ * Transaction Internet
+ * Protocol
+ *
+ * [pop]
+ *
+ * RFC 2384
+ * Post Office Protocol
+ * v3
+ *
+ * [data]
+ *
+ * RFC 2397
+ * data
+ *
+ * [dav]
+ *
+ * RFC 2518
+ * dav
+ *
+ * [opaquelocktoken]
+ *
+ * RFC 2518
+ * opaquelocktoken
+ *
+ * [sip]
+ *
+ * RFC 3261
+ * session initiation
+ * protocol
+ *
+ * [sips]
+ *
+ * RFC 3261
+ * secure session
+ * intitiaion protocol
+ *
+ * [tel]
+ *
+ * RFC 2806
+ * telephone
+ *
+ * [fax]
+ *
+ * RFC 2806
+ * fax
+ *
+ * [modem]
+ *
+ * RFC 2806
+ * modem
+ *
+ * [soap.beep]
+ *
+ * RFC 3288
+ * soap.beep
+ *
+ * [soap.beeps]
+ *
+ * RFC 3288
+ * soap.beeps
+ *
+ * [xmlrpc.beep]
+ *
+ * RFC 3529
+ * xmlrpc.beep
+ *
+ * [xmlrpc.beeps]
+ *
+ * RFC 3529
+ * xmlrpc.beeps
+ *
+ * [go]
+ *
+ * RFC 3368
+ * go
+ *
+ * [h323]
+ *
+ * RFC 3508
+ * H.323
+ *
+ * [ipp]
+ *
+ * RFC 3510
+ * Internet Printing
+ * Protocol
+ *
+ * [tftp]
+ *
+ * RFC 3617
+ * Trivial File
+ * Transfer Protocol
+ *
+ * [mupdate]
+ *
+ * RFC 3656
+ * Mailbox Update
+ * (MUPDATE) Protocol
+ *
+ * [pres]
+ *
+ * RFC 3859
+ * Presence
+ *
+ * [im]
+ *
+ * RFC 3860
+ * Instant
+ * Messaging
+ *
+ * [mtqp]
+ *
+ * RFC 3887
+ * Message Tracking
+ * Query Protocol
+ *
+ * [iris.beep]
+ *
+ * RFC 3983
+ * iris.beep
+ *
+ * [dict]
+ *
+ * RFC 2229
+ * dictionary service
+ * protocol
+ *
+ * [snmp]
+ *
+ * RFC 4088
+ * Simple Network Management
+ * Protocol
+ *
+ * [crid]
+ *
+ * RFC 4078
+ * TV-Anytime Content
+ * Reference Identifier
+ *
+ * [tag]
+ *
+ * RFC 4151
+ * tag
+ *
+ * [afs]
+ *
+ *
+ * Andrew File System
+ * global file names
+ *
+ * [tn3270]
+ *
+ *
+ * Interactive 3270
+ * emulation sessions
+ *
+ * [mailserver]
+ *
+ *
+ * Access to data
+ * available from mail servers
+ *
+ * [dns]
+ *
+ *
+ * Domain Name
+ * System
+ *
+ * [info]
+ *
+ *
+ * Information Assets
+ * with Identifiers in Public Namespaces
+ *
+ * [ldap]
+ *
+ *
+ * Lightweight
+ * Directory Access Protocol
+ *
+ *
+ *
+ *
+ * Other relevant standards include:
+ *
+ *
+ *
+ * [URL_Registratrion]
+ *
+ * RFC 2717
+ *
+ *
+ * Registration Procedures for URL Scheme Names
+ *
+ *
*/
public interface ViolationCodes {
-
-/**
-This class is not part of the API.
-*/
- class Initialize implements IRIComponents, Force {
- static {
-
- Specification spec;
-
-
- spec =
- new Specification(
- "RDF",
- "iri",
- "",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref",
- "Resource Description Framework (RDF): Concepts and Abstract Syntax",
- "RDF URI References",
-
- new String[]{
-
- "foo/bar",
-
- "#frag",
-
- "//example.org/foo/bar#frag",
-
- },
-
- new String[]{
-
- }
- );
-
- spec.require(
- IRIComponents.SCHEME
- );
-
- spec =
- new Specification(
- "URI",
- "iri",
- "3986",
- "http://www.apps.ietf.org/rfc/rfc3986.html",
- "Uniform Resource Identifier (URI): Generic Syntax",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
- spec =
- new Specification(
- "Unicode",
- "iri",
- "",
- "http://www.unicode.org/",
- "Unicode",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
- spec =
- new Specification(
- "IRI",
- "iri",
- "3987",
- "http://www.apps.ietf.org/rfc/rfc3987.html",
- "Internationalized Resource Identifiers (IRIs)",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
- spec =
- new Specification(
- "XML",
- "iri",
- "",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid",
- "Extensible Markup Language (XML) 1.0 (Third Edition)",
- "system identifier",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
- spec.prohibit(
- IRIComponents.FRAGMENT
- );
-
- spec =
- new Specification(
- "XLink",
- "iri",
- "",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators",
- "XML Linking Language (XLink) Version 1.0",
- "Locator Attribute (href)",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
- spec =
- new Specification(
- "Schema",
- "iri",
- "",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI",
- "XML Schema Part 2: Datatypes Second Edition",
- "anyURI",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
- spec =
- new Specification(
- "URL_Registratrion",
- "other",
- "2717",
- "http://www.apps.ietf.org/rfc/rfc2717.html",
- "Registration Procedures for URL Scheme Names",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
- spec =
- new SchemeSpecification(
- "http",
- "2616",
- "http://www.apps.ietf.org/rfc/rfc2616.html",
- "Hypertext Transfer Protocol -- HTTP/1.1",
- "",
-
- new String[]{
-
- "http://www.example.org:80/foo/bar",
-
- "http:foo/bar",
-
- "http://user@www.example.org/foo/bar",
-
- },
-
- new String[]{
-
- "http://www.example.org/foo/bar",
-
- }
- );
-
-
- spec
- .addDefinition(
- "http://www.apps.ietf.org/rfc/rfc2616.html#sec-3.2.2",
- ""+
- "\n"+
- "http_URL = \"http:\" \"//\" host [ \":\" port ] [ abs_path [ \"?\" query ]]\n"+
- "",
- ""+
- "
\n"+
- "http_URL = \"http:\" \"//\" host [ \":\" port ] [ abs_path [ \"?\" query ]]\n"+
- " "+
- ""
- );
-
- spec.setDNS(true);
-
- spec.port(80);
-
- spec.prohibit(
- IRIComponents.USER
- );
-
- spec.require(
- IRIComponents.HOST
- );
-
- spec =
- new SchemeSpecification(
- "https",
- "2818",
- "http://www.apps.ietf.org/rfc/rfc2818.html",
- "Hypertext Transfer Protocol Secure",
- "",
-
- new String[]{
-
- "https://www.example.org:443/foo/bar",
-
- "https:foo/bar",
-
- "https://user@www.example.org/foo/bar",
-
- },
-
- new String[]{
-
- "https://www.example.org/foo/bar",
-
- }
- );
-
-
- spec
- .addDefinition(
- "http://www.apps.ietf.org/rfc/rfc2818.html#sec-2.4",
- "HTTP/TLS is differentiated from HTTP URIs by using the 'https' protocol identifier in place of the 'http' protocol identifier.",
- "HTTP/TLS is differentiated from HTTP URIs by using the 'https' protocol identifier in place of the 'http' protocol identifier."
- );
-
- spec
- .addDefinition(
- "http://www.apps.ietf.org/rfc/rfc2818.html#sec-3.2.2",
- ""+
- "\n"+
- "http_URL = \"http:\" \"//\" host [ \":\" port ] [ abs_path [ \"?\" query ]]\n"+
- "",
- ""+
- "
\n"+
- "http_URL = \"http:\" \"//\" host [ \":\" port ] [ abs_path [ \"?\" query ]]\n"+
- " "+
- ""
- );
-
- spec.setDNS(true);
-
- spec.port(443);
-
- spec.prohibit(
- IRIComponents.USER
- );
-
- spec.require(
- IRIComponents.HOST
- );
-
- spec =
- new SchemeSpecification(
- "ftp",
- "1738",
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-3.2",
- "File Transfer Protocol",
- "3.2",
-
- new String[]{
-
- "ftp:///foo/bar",
-
- "ftp://user@example.org/foo/bar;type=z",
-
- "ftp://user@example.org/foo/b;ar;type=d",
-
- },
-
- new String[]{
-
- "ftp://user@example.org/foo/bar;type=d",
-
- }
- );
-
-
- spec
- .addDefinition(
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
- ""+
- "\n"+
- "ftpurl = \"ftp://\" login [ \"/\" fpath [ \";type=\" ftptype ]]\n"+
- "fpath = fsegment *[ \"/\" fsegment ]\n"+
- "fsegment = *[ uchar | \"?\" | \":\" | \"@\" | \"&\" | \"=\" ]\n"+
- "ftptype = \"A\" | \"I\" | \"D\" | \"a\" | \"i\" | \"d\"\n"+
- ""+
- "\n"+
- "login = [ user [ \":\" password ] \"@\" ] hostport\n"+
- ""+
- "\n"+
- "safe = \"$\" | \"-\" | \"_\" | \".\" | \"+\"\n"+
- "extra = \"!\" | \"*\" | \"'\" | \"(\" | \")\" | \",\"\n"+
- "escape = \"%\" hex hex\n"+
- "unreserved = alpha | digit | safe | extra\n"+
- "uchar = unreserved | escape\n"+
- "",
- ""+
- "
\n"+
- "ftpurl = \"ftp://\" login [ \"/\" fpath [ \";type=\" ftptype ]]\n"+
- "fpath = fsegment *[ \"/\" fsegment ]\n"+
- "fsegment = *[ uchar | \"?\" | \":\" | \"@\" | \"&\" | \"=\" ]\n"+
- "ftptype = \"A\" | \"I\" | \"D\" | \"a\" | \"i\" | \"d\"\n"+
- " "+
- ""+
- "
\n"+
- "login = [ user [ \":\" password ] \"@\" ] hostport\n"+
- " "+
- ""+
- "
\n"+
- "safe = \"$\" | \"-\" | \"_\" | \".\" | \"+\"\n"+
- "extra = \"!\" | \"*\" | \"'\" | \"(\" | \")\" | \",\"\n"+
- "escape = \"%\" hex hex\n"+
- "unreserved = alpha | digit | safe | extra\n"+
- "uchar = unreserved | escape\n"+
- " "+
- ""
- );
-
- spec.setDNS(true);
-
- spec.port(21);
-
- spec.require(
- IRIComponents.HOST
- );
-
- spec.setPattern(PATHQUERY,
- "[^;~]*(;@{mustLowerCase(type)}=@{shouldLowerCase([aid])}|)" );
-
- spec.setReserved(PATHQUERY,"~;");
-
- spec =
- new SchemeSpecification(
- "mailto",
- "2368",
- "http://www.apps.ietf.org/rfc/rfc2368.html",
- "Electronic mail address",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec.prohibit(
- IRIComponents.AUTHORITY
- );
-
- spec =
- new SchemeSpecification(
- "news",
- "1738",
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-3.6",
- "USENET news",
- "3.6",
-
- new String[]{
-
- "news:arbitrary@news.exampl\u00E7.org",
-
- "news:arbitr?ary@news.exampl\u00E7.org",
-
- "news:///foo/bar",
-
- "news://user@example.org/foo",
-
- },
-
- new String[]{
-
- "news:*",
-
- "news:group.it",
-
- "news:arb?itrary@news.example.org",
-
- "news:arbitrary@news.example.org",
-
- }
- );
-
-
- spec
- .addDefinition(
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
- ""+
- "\n"+
- "newsurl = \"news:\" grouppart\n"+
- "grouppart = \"*\" | group | article\n"+
- "group = alpha *[ alpha | digit | \"-\" | \".\" | \"+\" | \"_\" ]\n"+
- "article = 1*[ uchar | \";\" | \"/\" | \"?\" | \":\" | \"&\" | \"=\" ] \"@\" host\n"+
- ""+
- "\n"+
- "safe = \"$\" | \"-\" | \"_\" | \".\" | \"+\"\n"+
- "extra = \"!\" | \"*\" | \"'\" | \"(\" | \")\" | \",\"\n"+
- "escape = \"%\" hex hex\n"+
- "unreserved = alpha | digit | safe | extra\n"+
- "uchar = unreserved | escape\n"+
- "",
- ""+
- "
\n"+
- "newsurl = \"news:\" grouppart\n"+
- "grouppart = \"*\" | group | article\n"+
- "group = alpha *[ alpha | digit | \"-\" | \".\" | \"+\" | \"_\" ]\n"+
- "article = 1*[ uchar | \";\" | \"/\" | \"?\" | \":\" | \"&\" | \"=\" ] \"@\" host\n"+
- " "+
- ""+
- "
\n"+
- "safe = \"$\" | \"-\" | \"_\" | \".\" | \"+\"\n"+
- "extra = \"!\" | \"*\" | \"'\" | \"(\" | \")\" | \",\"\n"+
- "escape = \"%\" hex hex\n"+
- "unreserved = alpha | digit | safe | extra\n"+
- "uchar = unreserved | escape\n"+
- " "+
- ""
- );
-
- spec.prohibit(
- IRIComponents.AUTHORITY
- );
-
- spec.require(
- IRIComponents.PATH
- );
-
- spec.setPattern(PATHQUERY,
- "[^@]+@@{host}|[*]|[a-zA-Z][-a-zA-Z0-9.+_]*" );
-
- spec.setReserved(PATHQUERY,"~@");
-
- spec =
- new SchemeSpecification(
- "nntp",
- "1738",
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-3.7",
- "USENET news using NNTP access",
- "3.7",
-
- new String[]{
-
- "nntp://user@example.org/foo",
-
- "nntp:/foo",
-
- "nntp:///foo",
-
- "nntp://example.org/foo/4/3",
-
- "nntp://example.org/",
-
- "nntp://example.org/foo/",
-
- "nntp://example.org/*",
-
- },
-
- new String[]{
-
- "nntp://example.org/foo4",
-
- "nntp://example.org/foo/4",
-
- }
- );
-
-
- spec
- .addDefinition(
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
- ""+
- "\n"+
- "nntpurl = \"nntp://\" hostport \"/\" group [ \"/\" digits ]\n"+
- ""+
- "\n"+
- "group = alpha *[ alpha | digit | \"-\" | \".\" | \"+\" | \"_\" ]\n"+
- "",
- ""+
- "
\n"+
- "nntpurl = \"nntp://\" hostport \"/\" group [ \"/\" digits ]\n"+
- " "+
- ""+
- "
\n"+
- "group = alpha *[ alpha | digit | \"-\" | \".\" | \"+\" | \"_\" ]\n"+
- " "+
- ""
- );
-
- spec.setDNS(true);
-
- spec.port(119);
-
- spec.prohibit(
- IRIComponents.QUERY
- );
-
- spec.prohibit(
- IRIComponents.USER
- );
-
- spec.require(
- IRIComponents.HOST
- );
-
- spec.setPattern(PATH,
- "/[a-zA-Z][-a-zA-Z0-9.+_]*(/[0-9]+)?" );
-
- spec =
- new SchemeSpecification(
- "telnet",
- "4248",
- "http://www.ietf.org/rfc/rfc4248.txt",
- "Reference to interactive sessions",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "wais",
- "4156",
- "http://www.ietf.org/rfc/rfc4156.txt",
- "Wide Area Information Servers",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "file",
- "1738",
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-3.10",
- "Host-specific file names",
- "3.10",
-
- new String[]{
-
- "file://user@example.org/foo/bar",
-
- "file://eg:4029/foo/bar",
-
- "file:/foo/bar",
-
- "file://example.org",
-
- "file://foo/bar;t",
-
- "file://foo/~jjc",
-
- },
-
- new String[]{
-
- "file:///foo/b",
-
- "file:///foo/b?ar/yuk",
-
- }
- );
-
-
- spec
- .addDefinition(
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
- ""+
- "\n"+
- "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"+
- ""+
- "\n"+
- "fpath = fsegment *[ \"/\" fsegment ]\n"+
- "fsegment = *[ uchar | \"?\" | \":\" | \"@\" | \"&\" | \"=\" ]\n"+
- ""+
- "\n"+
- "safe = \"$\" | \"-\" | \"_\" | \".\" | \"+\"\n"+
- "extra = \"!\" | \"*\" | \"'\" | \"(\" | \")\" | \",\"\n"+
- "escape = \"%\" hex hex\n"+
- "unreserved = alpha | digit | safe | extra\n"+
- "uchar = unreserved | escape\n"+
- "",
- ""+
- "
\n"+
- "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"+
- " "+
- ""+
- "
\n"+
- "fpath = fsegment *[ \"/\" fsegment ]\n"+
- "fsegment = *[ uchar | \"?\" | \":\" | \"@\" | \"&\" | \"=\" ]\n"+
- " "+
- ""+
- "
\n"+
- "safe = \"$\" | \"-\" | \"_\" | \".\" | \"+\"\n"+
- "extra = \"!\" | \"*\" | \"'\" | \"(\" | \")\" | \",\"\n"+
- "escape = \"%\" hex hex\n"+
- "unreserved = alpha | digit | safe | extra\n"+
- "uchar = unreserved | escape\n"+
- " "+
- ""
- );
-
- spec.setDNS(true);
-
- spec.prohibit(
- IRIComponents.USER
- );
-
- spec.prohibit(
- IRIComponents.PORT
- );
-
- spec.require(
- IRIComponents.PATH
- );
-
- spec.require(
- IRIComponents.AUTHORITY
- );
-
- spec.setPattern(PATHQUERY,
- "[^;~]*" );
-
- spec.setReserved(PATHQUERY,"~;");
-
- spec =
- new SchemeSpecification(
- "prospero",
- "4157",
- "http://www.ietf.org/rfc/rfc4157.txt",
- "Prospero Directory Service",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "gopher",
- "4266",
- "http://www.ietf.org/rfc/rfc4266.txt",
- "The gopher URI scheme",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "z39.50s",
- "2056",
- "http://www.apps.ietf.org/rfc/rfc2056.html",
- "Z39.50 Session",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "z39.50r",
- "2056",
- "http://www.apps.ietf.org/rfc/rfc2056.html",
- "Z39.50 Retrieval",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "cid",
- "2392",
- "http://www.apps.ietf.org/rfc/rfc2392.html",
- "content identifier",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "mid",
- "2392",
- "http://www.apps.ietf.org/rfc/rfc2392.html",
- "message identifier",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "vemmi",
- "2122",
- "http://www.apps.ietf.org/rfc/rfc2122.html",
- "versatile multimedia interface",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "service",
- "2609",
- "http://www.apps.ietf.org/rfc/rfc2609.html",
- "service location",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "imap",
- "2192",
- "http://www.apps.ietf.org/rfc/rfc2192.html",
- "internet message access protocol",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "nfs",
- "2224",
- "http://www.apps.ietf.org/rfc/rfc2224.html",
- "network file system protocol",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "acap",
- "2244",
- "http://www.apps.ietf.org/rfc/rfc2244.html",
- "application configuration access protocol",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "rtsp",
- "2326",
- "http://www.apps.ietf.org/rfc/rfc2326.html",
- "real time streaming protocol",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "tip",
- "2371",
- "http://www.apps.ietf.org/rfc/rfc2371.html",
- "Transaction Internet Protocol",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "pop",
- "2384",
- "http://www.apps.ietf.org/rfc/rfc2384.html",
- "Post Office Protocol v3",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "data",
- "2397",
- "http://www.apps.ietf.org/rfc/rfc2397.html",
- "data",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "dav",
- "2518",
- "http://www.apps.ietf.org/rfc/rfc2518.html",
- "dav",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "opaquelocktoken",
- "2518",
- "http://www.apps.ietf.org/rfc/rfc2518.html",
- "opaquelocktoken",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "sip",
- "3261",
- "http://www.apps.ietf.org/rfc/rfc3261.html",
- "session initiation protocol",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "sips",
- "3261",
- "http://www.apps.ietf.org/rfc/rfc3261.html",
- "secure session intitiaion protocol",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "tel",
- "2806",
- "http://www.apps.ietf.org/rfc/rfc2806.html",
- "telephone",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "fax",
- "2806",
- "http://www.apps.ietf.org/rfc/rfc2806.html",
- "fax",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "modem",
- "2806",
- "http://www.apps.ietf.org/rfc/rfc2806.html",
- "modem",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "soap.beep",
- "3288",
- "http://www.apps.ietf.org/rfc/rfc3288.html",
- "soap.beep",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "soap.beeps",
- "3288",
- "http://www.apps.ietf.org/rfc/rfc3288.html",
- "soap.beeps",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "xmlrpc.beep",
- "3529",
- "http://www.apps.ietf.org/rfc/rfc3529.html",
- "xmlrpc.beep",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "xmlrpc.beeps",
- "3529",
- "http://www.apps.ietf.org/rfc/rfc3529.html",
- "xmlrpc.beeps",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "urn",
- "2141",
- "http://www.apps.ietf.org/rfc/rfc2141.html",
- "Uniform Resource Names",
- "",
-
- new String[]{
-
- "urn:x-hp:foo/bar",
-
- "urn:urn:foo",
-
- "urn://foo",
-
- "urn:foo:bar?query",
-
- "urn:foo:ff~",
-
- },
-
- new String[]{
-
- "urn:x-hp:foo\u00E9",
-
- "urn:urn-1:foo",
-
- }
- );
-
-
- spec
- .addDefinition(
- "http://www.apps.ietf.org/rfc/rfc2141.html#sec-2",
- "All URNs have the following syntax (phrases enclosed in quotes are REQUIRED):"+
- "\n"+
- " ::= \"urn:\" \":\" \n"+
- "",
- "All URNs have the following syntax (phrases enclosed in quotes are REQUIRED):"+
- "
\n"+
- "<URN> ::= \"urn:\" <NID> \":\" <NSS>\n"+
- " "+
- ""
- );
-
- spec
- .addDefinition(
- "http://www.apps.ietf.org/rfc/rfc2141.html#sec-2.1",
- ""+
- "\n"+
- " ::= [ 1,31 ]\n"+
- "\n"+
- " ::= | | | \"-\"\n"+
- "\n"+
- " ::= | | \n"+
- "",
- ""+
- "
\n"+
- "<NID> ::= <let-num> [ 1,31<let-num-hyp> ]\n"+
- "\n"+
- "<let-num-hyp> ::= <upper> | <lower> | <number> | \"-\"\n"+
- "\n"+
- "<let-num> ::= <upper> | <lower> | <number>\n"+
- " "+
- ""
- );
-
- spec
- .addDefinition(
- "http://www.apps.ietf.org/rfc/rfc2141.html#sec-2.2",
- ""+
- "\n"+
- " ::= 1*\n"+
- "\n"+
- " ::= | \"%\" \n"+
- "\n"+
- " ::= | | | | \n"+
- "\n"+
- " ::= \"(\" | \")\" | \"+\" | \",\" | \"-\" | \".\" |\n"+
- " \":\" | \"=\" | \"@\" | \";\" | \"$\" |\n"+
- " \"_\" | \"!\" | \"*\" | \"'\"\n"+
- "",
- ""+
- "
\n"+
- "<NSS> ::= 1*<URN chars>\n"+
- "\n"+
- "<URN chars> ::= <trans> | \"%\" <hex> <hex>\n"+
- "\n"+
- "<trans> ::= <upper> | <lower> | <number> | <other> | <reserved>\n"+
- "\n"+
- "<other> ::= \"(\" | \")\" | \"+\" | \",\" | \"-\" | \".\" |\n"+
- " \":\" | \"=\" | \"@\" | \";\" | \"$\" |\n"+
- " \"_\" | \"!\" | \"*\" | \"'\"\n"+
- " "+
- ""
- );
-
- spec
- .addDefinition(
- "http://www.apps.ietf.org/rfc/rfc2141.html#sec-2.3.2",
- "RFC 1630 [2] reserves the characters \"/\", \"?\", and \"#\" for particular purposes. The URN-WG has not yet debated the applicability and precise semantics of those purposes as applied to URNs. Therefore, these characters are RESERVED for future developments. Namespace developers SHOULD NOT use these characters in unencoded form, but rather use the appropriate %-encoding for each character.",
- "RFC 1630 [2] reserves the characters \"/\", \"?\", and \"#\" for particular purposes. The URN-WG has not yet debated the applicability and precise semantics of those purposes as applied to URNs. Therefore, these characters are RESERVED for future developments. Namespace developers SHOULD NOT use these characters in unencoded form, but rather use the appropriate %-encoding for each character."
- );
-
- spec.prohibit(
- IRIComponents.AUTHORITY
- );
-
- spec.prohibit(
- IRIComponents.QUERY
- );
-
- spec.require(
- IRIComponents.PATH
- );
-
- spec.setPattern(PATH,
- "(?![uU][rR][nN]:)[a-zA-Z0-9][-a-zA-Z0-9]{1,31}:[^/~]+" );
-
- spec.setReserved(PATH,"/~");
-
- spec =
- new SchemeSpecification(
- "go",
- "3368",
- "http://www.apps.ietf.org/rfc/rfc3368.html",
- "go",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "h323",
- "3508",
- "http://www.apps.ietf.org/rfc/rfc3508.html",
- "H.323",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "ipp",
- "3510",
- "http://www.apps.ietf.org/rfc/rfc3510.html",
- "Internet Printing Protocol",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "tftp",
- "3617",
- "http://www.apps.ietf.org/rfc/rfc3617.html",
- "Trivial File Transfer Protocol",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "mupdate",
- "3656",
- "http://www.apps.ietf.org/rfc/rfc3656.html",
- "Mailbox Update (MUPDATE) Protocol",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "pres",
- "3859",
- "http://www.apps.ietf.org/rfc/rfc3859.html",
- "Presence",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "im",
- "3860",
- "http://www.apps.ietf.org/rfc/rfc3860.html",
- "Instant Messaging",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "mtqp",
- "3887",
- "http://www.apps.ietf.org/rfc/rfc3887.html",
- "Message Tracking Query Protocol",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "iris.beep",
- "3983",
- "http://www.apps.ietf.org/rfc/rfc3983.html",
- "iris.beep",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "dict",
- "2229",
- "http://www.apps.ietf.org/rfc/rfc2229.html",
- "dictionary service protocol",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "snmp",
- "4088",
- "http://www.ietf.org/rfc/rfc4088.txt",
- "Simple Network Management Protocol",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "crid",
- "4078",
- "http://www.ietf.org/rfc/rfc4078.txt",
- "TV-Anytime Content Reference Identifier",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "tag",
- "4151",
- "http://www.ietf.org/rfc/rfc4151.txt",
- "tag",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "afs",
- "",
- "http://www.iana.org/assignments/uri-schemes",
- "Andrew File System global file names",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "tn3270",
- "",
- "http://www.iana.org/assignments/uri-schemes",
- "Interactive 3270 emulation sessions",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "mailserver",
- "",
- "http://www.iana.org/assignments/uri-schemes",
- "Access to data available from mail servers",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "dns",
- "",
- "http://www.iana.org/assignments/uri-schemes",
- "Domain Name System",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "info",
- "",
- "http://www.iana.org/assignments/uri-schemes",
- "Information Assets with Identifiers in Public Namespaces",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- spec =
- new SchemeSpecification(
- "ldap",
- "",
- "http://www.iana.org/assignments/uri-schemes",
- "Lightweight Directory Access Protocol",
- "",
-
- new String[]{
-
- },
-
- new String[]{
-
- }
- );
-
-
- new ViolationCodeInfo(
- ILLEGAL_CHARACTER,
- "ILLEGAL_CHARACTER",
- "The character violates the grammar rules for URIs/IRIs.",
- "
The character violates the grammar rules for URIs/IRIs.
",
- 0,
- new InSpec[]{
-
- new FromAlso(
- "URI",
- "http://www.apps.ietf.org/rfc/rfc3986.html#page-49"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html#sec-2.2"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "ht$tp://example.org/foo",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- PERCENT_ENCODING_SHOULD_BE_UPPERCASE,
- "PERCENT_ENCODING_SHOULD_BE_UPPERCASE",
- "Percent-escape sequences should use uppercase.",
- "Percent-escape sequences should use uppercase.
",
- 0|Force.minting,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-2.1",
- "URI producers and normalizers should use *uppercase* hexadecimal digits for all percent-encodings.",
- "URI producers and normalizers should use"+
- " uppercase "+
- "hexadecimal digits for all percent-encodings.
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "http://example.org/foo%c3%80",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- SUPERFLUOUS_NON_ASCII_PERCENT_ENCODING,
- "SUPERFLUOUS_NON_ASCII_PERCENT_ENCODING",
- "Percent-escape sequences should not be used unnecessarily.",
- "Percent-escape sequences should not be used unnecessarily.
",
- 0|Force.minting,
- new InSpec[]{
-
- new FromSpec_iri(
- "IRI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3987.html#sec-3.2",
- "URI-to-IRI conversion removes percent-encodings",
- "URI-to-IRI conversion removes percent-encodings
"
- ),
-
- },
- new String[]{
-
- "http://example.org/foo%C3%A9r",
-
- },
-
- new String[]{
-
- },
- true||
- false
- );
-
- new ViolationCodeInfo(
- SUPERFLUOUS_ASCII_PERCENT_ENCODING,
- "SUPERFLUOUS_ASCII_PERCENT_ENCODING",
- "Percent-escape sequences should not be used unnecessarily.",
- "Percent-escape sequences should not be used unnecessarily.
",
- 0|Force.minting,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-2.3",
- "For consistency, percent-encoded octets in the ranges of ALPHA (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should not be created by URI producers",
- "For consistency, percent-encoded octets in the ranges of ALPHA (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should not be created by URI producers
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "http://example.org/foo%5Fb%61r",
-
- },
-
- new String[]{
-
- },
- true||
- false
- );
-
- new ViolationCodeInfo(
- UNWISE_CHARACTER,
- "UNWISE_CHARACTER",
- "The character matches no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, XML system identifiers, and XML Schema anyURIs.",
- "The character matches no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, XML system identifiers, and XML Schema anyURIs.
",
- 0|Force.minting,
- new InSpec[]{
-
- new FromSpec_iri(
- "IRI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3987.html#page-13",
- "Systems accepting IRIs MAY also deal with the printable characters in US-ASCII that are not allowed in URIs, namely \"<\", \">\", '\"', space, \"{\", \"}\", \"|\", \"\\\", \"^\", and \"`\", in step 2 above. If these characters are found but are not converted, then the conversion SHOULD fail.",
- "Systems accepting IRIs MAY also deal with the printable characters in US-ASCII that are not allowed in URIs, namely \"<\", \">\", '\"', space, \"{\", \"}\", \"|\", \"\\\", \"^\", and \"`\", in step 2 above. If these characters are found but are not converted, then the conversion SHOULD fail.
"
- ),
-
- new FromAlso(
- "URI",
- "http://www.apps.ietf.org/rfc/rfc3986.html#page-49"
- ),
-
- },
- new String[]{
-
- "http://example.org/fo|o",
-
- "http://example.org/foo",
-
- "http://example.org/fo\"o",
-
- "http://example.org/fo`o",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- CONTROL_CHARACTER,
- "CONTROL_CHARACTER",
- "Control characters are not allowed in URIs or RDF URI References.",
- "Control characters are not allowed in URIs or RDF URI References.
",
- 0,
- new InSpec[]{
-
- new FromSpec_iri(
- "RDF",
- -1,
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref",
- "A URI reference within an RDF graph (an RDF URI reference) is a Unicode string [UNICODE] that: (0)does not contain any control characters ( #x00 - #x1F, #x7F-#x9F) ",
- "A URI reference within an RDF graph (an RDF URI reference) is a Unicode string [UNICODE] that:"+
- "
"+
- " does not contain any control characters ( #x00 - #x1F, #x7F-#x9F) "+
- " "+
- "
"
- ),
-
- new FromSpec_iri(
- "IRI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3987.html",
- ""+
- "\n"+
- "ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF\n"+
- " / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD\n"+
- " / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD\n"+
- " / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD\n"+
- " / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD\n"+
- " / %xD0000-DFFFD / %xE1000-EFFFD\n"+
- "",
- ""+
- "
\n"+
- "ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF\n"+
- " / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD\n"+
- " / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD\n"+
- " / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD\n"+
- " / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD\n"+
- " / %xD0000-DFFFD / %xE1000-EFFFD\n"+
- " "+
- "
"
- ),
-
- new FromAlso(
- "URI",
- "http://www.apps.ietf.org/rfc/rfc3986.html"
- ),
-
- },
- new String[]{
-
- "http://example.org/fo\u007Fo",
-
- "http://example.org/fo\u0085o",
-
- "http://example.org/fo\u0009o",
-
- "http://example.org/fo\u0001o",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- NON_XML_CHARACTER,
- "NON_XML_CHARACTER",
- "The character is not legal in XML.",
- "The character is not legal in XML.
",
- 0,
- new InSpec[]{
-
- new FromSpec_iri(
- "XML",
- -1,
- "http://www.w3.org/TR/2004/REC-xml-20040204/#NT-Char",
- "Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]",
- "Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "http://example.org/foo\u0001",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- DISCOURAGED_XML_CHARACTER,
- "DISCOURAGED_XML_CHARACTER",
- "The character is discouraged in XML documents.",
- "The character is discouraged in XML documents.
",
- 0|Force.minting,
- new InSpec[]{
-
- new FromSpec_iri(
- "XML",
- -1,
- "http://www.w3.org/TR/2004/REC-xml-20040204/#char32",
- "Document authors are encouraged to avoid \"compatibility characters\", as defined in section 6.8 of [Unicode] (see also D21 in section 3.6 of [Unicode3]). The characters defined in the following ranges are also discouraged. They are either control characters or permanently undefined Unicode characters: [#x7F-#x84], [#x86-#x9F], [#xFDD0-#xFDDF],",
- "Document authors are encouraged to avoid \"compatibility characters\", as defined in section 6.8 of [Unicode] (see also D21 in section 3.6 of [Unicode3]). The characters defined in the following ranges are also discouraged. They are either control characters or permanently undefined Unicode characters: [#x7F-#x84], [#x86-#x9F], [#xFDD0-#xFDDF],
"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "http://example.org/foo\u0080",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- NON_INITIAL_DOT_SEGMENT,
- "NON_INITIAL_DOT_SEGMENT",
- "The path contains a segment /../ not at the beginning of a relative reference, or it contains a /./ These should be removed.",
- "The path contains a segment /../ not at the beginning of a relative reference, or it contains a /./ These should be removed.
",
- 0|Force.minting|Force.security,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-6.2.2.3",
- "The complete path segments \".\" and \"..\" are intended *only* for use within relative references",
- "The complete path segments \".\" and \"..\" are intended"+
- " only "+
- "for use within relative references
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "http://example.org/../foo",
-
- "http://example.org/foo/../foo",
-
- "http://example.org/foo/..",
-
- "http://example.org/foo/./foo",
-
- "http://example.org/./foo",
-
- "http://example.org/foo/.",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- EMPTY_SCHEME,
- "EMPTY_SCHEME",
- "The scheme component is empty.",
- "The scheme component is empty.
",
- 0,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.1",
- "Scheme names consist of a sequence of characters *beginning with a letter* and followed by any combination of letters, digits, plus (\"+\"), period (\".\"), or hyphen (\"-\").",
- "Scheme names consist of a sequence of characters"+
- " beginning with a letter "+
- "and followed by any combination of letters, digits, plus (\"+\"), period (\".\"), or hyphen (\"-\").
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "://example.org/foo",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- SCHEME_MUST_START_WITH_LETTER,
- "SCHEME_MUST_START_WITH_LETTER",
- "The scheme component must start with a letter.",
- "The scheme component must start with a letter.
",
- 0,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.1",
- "Scheme names consist of a sequence of characters *beginning with a letter* and followed by any combination of letters, digits, plus (\"+\"), period (\".\"), or hyphen (\"-\").",
- "Scheme names consist of a sequence of characters"+
- " beginning with a letter "+
- "and followed by any combination of letters, digits, plus (\"+\"), period (\".\"), or hyphen (\"-\").
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "007://example.org/foo",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- LOWERCASE_PREFERRED,
- "LOWERCASE_PREFERRED",
- "lowercase is preferred in this component",
- "lowercase is preferred in this component
",
- 0|Force.minting,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- SCHEME,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.1",
- "An implementation should accept uppercase letters as equivalent to lowercase in scheme names (e.g., allow \"HTTP\" as well as \"http\") for the sake of robustness but should only produce lowercase scheme names for consistency.",
- "An implementation should accept uppercase letters as equivalent to lowercase in scheme names (e.g., allow \"HTTP\" as well as \"http\") for the sake of robustness but should only produce lowercase scheme names for consistency.
"
- ),
-
- new FromSpec_iri(
- "URI",
- HOST,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
- "Although host is case-insensitive, producers and normalizers should use *lowercase for registered names* and hexadecimal addresses for the sake of uniformity, while only using uppercase letters for percent-encodings.",
- "Although host is case-insensitive, producers and normalizers should use"+
- " lowercase for registered names "+
- "and hexadecimal addresses for the sake of uniformity, while only using uppercase letters for percent-encodings.
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "HTTP://example.org/foo",
-
- "http://eXamPle.org/foo",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- PORT_SHOULD_NOT_BE_EMPTY,
- "PORT_SHOULD_NOT_BE_EMPTY",
- "The colon introducing an empty port component should be omitted entirely, or a port number should be specified.",
- "The colon introducing an empty port component should be omitted entirely, or a port number should be specified.
",
- 0|Force.minting,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
- "URI producers and normalizers should omit the port component *and its \":\" delimiter* if port is empty",
- "URI producers and normalizers should omit the port component"+
- " and its \":\" delimiter "+
- "if port is empty
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "http://example.org:/foo",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- DEFAULT_PORT_SHOULD_BE_OMITTED,
- "DEFAULT_PORT_SHOULD_BE_OMITTED",
- "If the port is the default one for the scheme it should be omitted.",
- "If the port is the default one for the scheme it should be omitted.
",
- 0|Force.minting,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
- "URI producers and normalizers should omit the port component and its \":\" delimiter if port is empty or if its value would be the *same as that of the scheme's default.* ",
- "URI producers and normalizers should omit the port component and its \":\" delimiter if port is empty or if its value would be the"+
- " same as that of the scheme's default. "+
- "
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "http://example.org:80/foo",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- PORT_SHOULD_NOT_BE_WELL_KNOWN,
- "PORT_SHOULD_NOT_BE_WELL_KNOWN",
- "Ports under 1024 should be accessed using the appropriate scheme name.",
- "Ports under 1024 should be accessed using the appropriate scheme name.
",
- 0|Force.security,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-7.2",
- "Applications should prevent dereference of a URI that specifies a TCP port number within the \"well-known port\" range *(0 - 1023)* unless the protocol being used to dereference that URI is compatible with the protocol expected on that well-known port.",
- "Applications should prevent dereference of a URI that specifies a TCP port number within the \"well-known port\" range"+
- " (0 - 1023) "+
- "unless the protocol being used to dereference that URI is compatible with the protocol expected on that well-known port.
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "http://example.org:180/foo",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- PORT_SHOULD_NOT_START_IN_ZERO,
- "PORT_SHOULD_NOT_START_IN_ZERO",
- "Leading zeros in the port number should be omitted. This is an added feature of this implementation, not mandated by any standard.",
- "Leading zeros in the port number should be omitted. This is an added feature of this implementation, not mandated by any standard.
",
- 0|Force.minting,
- new InSpec[]{
-
- new FromAlso(
- "URI",
- "http://www.apps.ietf.org/rfc/rfc3986.html"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "http://example.org:08080/foo",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- BIDI_FORMATTING_CHARACTER,
- "BIDI_FORMATTING_CHARACTER",
- "A prohibited bi-directional control character was found.",
- "A prohibited bi-directional control character was found.
",
- 0,
- new InSpec[]{
-
- new FromSpec_iri(
- "IRI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3987.html#sec-4.1",
- "IRIs MUST NOT contain bidirectional formatting characters (LRM, RLM, LRE, RLE, LRO, RLO, and PDF).",
- "IRIs MUST NOT contain bidirectional formatting characters (LRM, RLM, LRE, RLE, LRO, RLO, and PDF).
"
- ),
-
- },
- new String[]{
-
- "http://example.org/Andr\u202Abar",
-
- "http://example.org/Andr\u202Bbar",
-
- "http://example.org/Andr\u202Cbar",
-
- "http://example.org/Andr\u202Dbar",
-
- "http://example.org/Andr\u202Ebar",
-
- "http://example.org/Andr\u200Ebar",
-
- "http://example.org/Andr\u200Fbar",
-
- },
-
- new String[]{
-
- },
- true||
- false
- );
-
- new ViolationCodeInfo(
- WHITESPACE,
- "WHITESPACE",
- "A single whitespace character. These match no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, XML system identifiers, and XML Schema anyURIs.",
- "A single whitespace character. These match no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, XML system identifiers, and XML Schema anyURIs.
",
- 0,
- new InSpec[]{
-
- new FromAlso(
- "URI",
- "http://www.apps.ietf.org/rfc/rfc3986.html"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- },
- new String[]{
-
- "http://example.org/ foo",
-
- "file:///Program Files",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- DOUBLE_WHITESPACE,
- "DOUBLE_WHITESPACE",
- "Either two or more consecutive whitespace characters, or leading or trailing whitespace. These match no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, XML system identifiers, but not XML Schema anyURIs.",
- "Either two or more consecutive whitespace characters, or leading or trailing whitespace. These match no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, XML system identifiers, but not XML Schema anyURIs.
",
- 0,
- new InSpec[]{
-
- new FromAlso(
- "URI",
- "http://www.apps.ietf.org/rfc/rfc3986.html"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "http://example.org/ foo",
-
- "file:///Program Files",
-
- "file:///TabBar ",
-
- " rel-with-initial-space",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- NOT_XML_SCHEMA_WHITESPACE,
- "NOT_XML_SCHEMA_WHITESPACE",
- "Whitespace characters match no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, and XML system identifiers. However, tab and new line characters, and consecutive space characters cannot occur in XML Schema anyURIs.",
- "Whitespace characters match no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, and XML system identifiers. However, tab and new line characters, and consecutive space characters cannot occur in XML Schema anyURIs.
",
- 0,
- new InSpec[]{
-
- new FromAlso(
- "URI",
- "http://www.apps.ietf.org/rfc/rfc3986.html"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromSpec_iri(
- "Schema",
- -1,
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#schema",
- ""+
- "\n"+
- "\n"+
- " [...]\n"+
- " \n"+
- " \n"+
- "\n"+
- " \n"+
- " \n"+
- "",
- ""+
- "
\n"+
- "<xs:simpleType name=\"anyURI\" id=\"anyURI\">\n"+
- " [...]\n"+
- " <xs:restriction base=\"xs:anySimpleType\">\n"+
- " <xs:whiteSpace fixed=\"true\" value=\"collapse\" id=\"anyURI.whiteSpace\"/>\n"+
- "\n"+
- " </xs:restriction>\n"+
- "</xs:simpleType>\n"+
- " "+
- "
"
- ),
-
- },
- new String[]{
-
- "file:///Tab\u0009Bar",
-
- "file:///Tab\nBar",
-
- "file:///Tab\rBar",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- DOUBLE_DASH_IN_REG_NAME,
- "DOUBLE_DASH_IN_REG_NAME",
- new String[]{
-
- "http://foo--bar//",
-
- },
- new String[]{
-
- },
- true||
- false
- );
-
- new ViolationCodeInfo(
- SCHEME_INCLUDES_DASH,
- "SCHEME_INCLUDES_DASH",
- new String[]{
-
- "ht-tp://foo.bar//",
-
- "-http://foo.bar//",
-
- "http-://foo.bar//",
-
- },
- new String[]{
-
- },
- true||
- false
- );
-
- new ViolationCodeInfo(
- NON_URI_CHARACTER,
- "NON_URI_CHARACTER",
- new String[]{
-
- "http://foo-bar//̳a",
-
- "http://foo-b̳ar//",
-
- },
- new String[]{
-
- },
- true||
- false
- );
-
- new ViolationCodeInfo(
- PERCENT_20,
- "PERCENT_20",
- new String[]{
-
- "http://foo-bar//%20a",
-
- },
- new String[]{
-
- },
- true||
- false
- );
-
- new ViolationCodeInfo(
- PERCENT,
- "PERCENT",
- new String[]{
-
- "http://foo-bar//%AAa",
-
- },
- new String[]{
-
- },
- true||
- false
- );
-
- new ViolationCodeInfo(
- IP_V6_OR_FUTURE_ADDRESS_SYNTAX,
- "IP_V6_OR_FUTURE_ADDRESS_SYNTAX",
- "A syntax violation was detected in an IP V6 (or future) address.",
- "A syntax violation was detected in an IP V6 (or future) address.
",
- 0,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
- ""+
- "\n"+
- "IP-literal = \"[\" ( IPv6address / IPvFuture ) \"]\"\n"+
- "IPvFuture = \"v\" 1*HEXDIG \".\" 1*( unreserved / sub-delims / \":\" )\n"+
- "IPv6address = 6( h16 \":\" ) ls32\n"+
- " / \"::\" 5( h16 \":\" ) ls32\n"+
- " / [ h16 ] \"::\" 4( h16 \":\" ) ls32\n"+
- " / [ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n"+
- " / [ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n"+
- " / [ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n"+
- " / [ *4( h16 \":\" ) h16 ] \"::\" ls32\n"+
- " / [ *5( h16 \":\" ) h16 ] \"::\" h16\n"+
- " / [ *6( h16 \":\" ) h16 ] \"::\"\n"+
- "\n"+
- "ls32 = ( h16 \":\" h16 ) / IPv4address\n"+
- " ; least-significant 32 bits of address\n"+
- "h16 = 1*4HEXDIG \n"+
- " ; 16 bits of address represented in hexadecimal\n"+
- "",
- ""+
- "
\n"+
- "IP-literal = \"[\" ( IPv6address / IPvFuture ) \"]\"\n"+
- "IPvFuture = \"v\" 1*HEXDIG \".\" 1*( unreserved / sub-delims / \":\" )\n"+
- "IPv6address = 6( h16 \":\" ) ls32\n"+
- " / \"::\" 5( h16 \":\" ) ls32\n"+
- " / [ h16 ] \"::\" 4( h16 \":\" ) ls32\n"+
- " / [ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n"+
- " / [ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n"+
- " / [ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n"+
- " / [ *4( h16 \":\" ) h16 ] \"::\" ls32\n"+
- " / [ *5( h16 \":\" ) h16 ] \"::\" h16\n"+
- " / [ *6( h16 \":\" ) h16 ] \"::\"\n"+
- "\n"+
- "ls32 = ( h16 \":\" h16 ) / IPv4address\n"+
- " ; least-significant 32 bits of address\n"+
- "h16 = 1*4HEXDIG \n"+
- " ; 16 bits of address represented in hexadecimal\n"+
- " "+
- "
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "http://[/",
-
- "ldap://[20015:db8::7]/c=GB?objectClass?one",
-
- "ldap://[2001:db8:::7]/c=GB?objectClass?one",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- IPv6ADDRESS_SHOULD_BE_LOWERCASE,
- "IPv6ADDRESS_SHOULD_BE_LOWERCASE",
- "IP version 6 addresses should use lowercase hexadecimal",
- "IP version 6 addresses should use lowercase hexadecimal
",
- 0|Force.minting,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
- "Although host is case-insensitive, producers and normalizers *should use lowercase* for registered names and *hexadecimal addresses* for the sake of uniformity",
- "Although host is case-insensitive, producers and normalizers"+
- " should use lowercase "+
- "for registered names and"+
- " hexadecimal addresses "+
- "for the sake of uniformity
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "ldap://[2001:Db8::7]/c=GB?objectClass?one",
-
- "ldap://[2001:dB8::7]/c=GB?objectClass?one",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- IP_V4_OCTET_RANGE,
- "IP_V4_OCTET_RANGE",
- "A host entry consists of four numbers, but they are not in the range 0-255, or have leading zeros.",
- "A host entry consists of four numbers, but they are not in the range 0-255, or have leading zeros.
",
- 0,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
- "A host identified by an IPv4 literal address is represented in dotted-decimal notation (a sequence of *four decimal numbers* in the range *0 to 255* , separated by \".\"),",
- "A host identified by an IPv4 literal address is represented in dotted-decimal notation (a sequence of"+
- " four decimal numbers "+
- "in the range"+
- " 0 to 255 "+
- ", separated by \".\"),
"
- ),
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
- ""+
- "\n"+
- "dec-octet = DIGIT ; 0-9\n"+
- " / %x31-39 DIGIT ; 10-99\n"+
- " / \"1\" 2DIGIT ; 100-199\n"+
- " / \"2\" %x30-34 DIGIT ; 200-249\n"+
- " / \"25\" %x30-35 ; 250-255\n"+
- "",
- ""+
- "
\n"+
- "dec-octet = DIGIT ; 0-9\n"+
- " / %x31-39 DIGIT ; 10-99\n"+
- " / \"1\" 2DIGIT ; 100-199\n"+
- " / \"2\" %x30-34 DIGIT ; 200-249\n"+
- " / \"25\" %x30-35 ; 250-255\n"+
- " "+
- "
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "ldap://155.00.55.102/c=GB?objectClass?one",
-
- "ldap://20.256.20.20/c=GB?objectClass?one",
-
- "ldap://20.1000.20.20/c=GB?objectClass?one",
-
- "ldap://20.010.20.20/c=GB?objectClass?one",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- NOT_DNS_NAME,
- "NOT_DNS_NAME",
- "The host component did not meet the restrictions on DNS names.",
- "The host component did not meet the restrictions on DNS names.
",
- 0|Force.dns,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
- "URI producers should use names that *conform to the DNS syntax* , even when use of DNS is not immediately apparent, and should limit these names to no more than 255 characters in length.",
- "URI producers should use names that"+
- " conform to the DNS syntax "+
- ", even when use of DNS is not immediately apparent, and should limit these names to no more than 255 characters in length.
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "ldap://foo$/c=GB?objectClass?one",
-
- "http://foo.example.$org/",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- USE_PUNYCODE_NOT_PERCENTS,
- "USE_PUNYCODE_NOT_PERCENTS",
- "The host component used percent encoding, where punycode is preferred.",
- "The host component used percent encoding, where punycode is preferred.
",
- 0|Force.minting|Force.dns,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
- "URI producers should provide these registered names in the IDNA encoding, rather than a percent-encoding, if they wish to maximize interoperability with legacy URI resolvers.",
- "URI producers should provide these registered names in the IDNA encoding, rather than a percent-encoding, if they wish to maximize interoperability with legacy URI resolvers.
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "ftp://andr%C3%A9.example.org/",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- ILLEGAL_PERCENT_ENCODING,
- "ILLEGAL_PERCENT_ENCODING",
- "The host component a percent occurred without two following hexadecimal digits.",
- "The host component a percent occurred without two following hexadecimal digits.
",
- 0,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-2.1",
- "A percent-encoded octet is encoded as a character triplet, consisting of the percent character \"%\" followed by the two hexadecimal digits representing that octet's numeric value.",
- "A percent-encoded octet is encoded as a character triplet, consisting of the percent character \"%\" followed by the two hexadecimal digits representing that octet's numeric value.
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "ftp://andr%%A9.example.org/",
-
- "ftp://andr%.example.org/",
-
- "ftp://andre.example.org/%",
-
- "ftp://andre.example.org/%A",
-
- "ftp://andre.example.org/%A?",
-
- "ftp://andre.example.org/%A#",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- ACE_PREFIX,
- "ACE_PREFIX",
- new String[]{
-
- },
- new String[]{
-
- },
- true||
- false
- );
-
- new ViolationCodeInfo(
- LONE_SURROGATE,
- "LONE_SURROGATE",
- "A unicode surrogate character that is not of a surrogate pair.",
- "A unicode surrogate character that is not of a surrogate pair.
",
- 0,
- new InSpec[]{
-
- },
- new String[]{
-
- "http:/foo/p\uD800",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- DNS_LABEL_DASH_START_OR_END,
- "DNS_LABEL_DASH_START_OR_END",
- "A DNS name had a - at the beginning or end.",
- "A DNS name had a - at the beginning or end.
",
- 0|Force.dns,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
- "Such a name consists of a sequence of domain labels separated by \".\", each domain label starting and ending with an alphanumeric character and possibly also containing \"-\" characters.",
- "Such a name consists of a sequence of domain labels separated by \".\", each domain label starting and ending with an alphanumeric character and possibly also containing \"-\" characters.
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "ldap://-foo/c=GB?objectClass?one",
-
- "http://foo.example.org-/",
-
- "http://foo.example.org--/",
-
- "http://--foo.example.org/",
-
- "http://-fo-o.example.org/",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- BAD_IDN_UNASSIGNED_CHARS,
- "BAD_IDN_UNASSIGNED_CHARS",
- "Characters used in the IRI were unassigned in the version of Unicode known by this system. They may have been assigned since.",
- "Characters used in the IRI were unassigned in the version of Unicode known by this system. They may have been assigned since.
",
- 0|Force.minting,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
- "When a non-ASCII registered name represents an internationalized domain name intended for resolution via the DNS, the name must be transformed to the IDNA encoding [RFC3490] prior to name lookup. URI producers should provide these registered names in the IDNA encoding, rather than a percent-encoding, if they wish to maximize interoperability with legacy URI resolvers.",
- "When a non-ASCII registered name represents an internationalized domain name intended for resolution via the DNS, the name must be transformed to the IDNA encoding [RFC3490] prior to name lookup. URI producers should provide these registered names in the IDNA encoding, rather than a percent-encoding, if they wish to maximize interoperability with legacy URI resolvers.
"
- ),
-
- new FromSpec_iri(
- "IRI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3987.html#sec-3.1",
- "Replace the ireg-name part of the IRI by the part converted using the ToASCII operation specified in section 4.1 of [RFC3490] on each dot-separated label, and by using U+002E (FULL STOP) as a label separator, with the flag UseSTD3ASCIIRules set to TRUE, and with the flag AllowUnassigned set to FALSE for creating IRIs and set to TRUE otherwise.",
- "Replace the ireg-name part of the IRI by the part converted using the ToASCII operation specified in section 4.1 of [RFC3490] on each dot-separated label, and by using U+002E (FULL STOP) as a label separator, with the flag UseSTD3ASCIIRules set to TRUE, and with the flag AllowUnassigned set to FALSE for creating IRIs and set to TRUE otherwise.
"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "http://foo.example\u0221.org/",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- BAD_IDN,
- "BAD_IDN",
- "The Internationalized Domain Name check failed.",
- "The Internationalized Domain Name check failed.
",
- 0,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
- "When a non-ASCII registered name represents an internationalized domain name intended for resolution via the DNS, the name must be transformed to the IDNA encoding [RFC3490] prior to name lookup. URI producers should provide these registered names in the IDNA encoding, rather than a percent-encoding, if they wish to maximize interoperability with legacy URI resolvers.",
- "When a non-ASCII registered name represents an internationalized domain name intended for resolution via the DNS, the name must be transformed to the IDNA encoding [RFC3490] prior to name lookup. URI producers should provide these registered names in the IDNA encoding, rather than a percent-encoding, if they wish to maximize interoperability with legacy URI resolvers.
"
- ),
-
- new FromSpec_iri(
- "IRI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3987.html#sec-3.1",
- "Replace the ireg-name part of the IRI by the part converted using the ToASCII operation specified in section 4.1 of [RFC3490] on each dot-separated label, and by using U+002E (FULL STOP) as a label separator, with the flag UseSTD3ASCIIRules set to TRUE, and with the flag AllowUnassigned set to FALSE for creating IRIs and set to TRUE otherwise.",
- "Replace the ireg-name part of the IRI by the part converted using the ToASCII operation specified in section 4.1 of [RFC3490] on each dot-separated label, and by using U+002E (FULL STOP) as a label separator, with the flag UseSTD3ASCIIRules set to TRUE, and with the flag AllowUnassigned set to FALSE for creating IRIs and set to TRUE otherwise.
"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "http://--foo.example.org/",
-
- "http://xn--andr--ep-.example.org/",
-
- "http://xn.example.\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333/",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- HAS_PASSWORD,
- "HAS_PASSWORD",
- "Including passwords in URIs is deprecated.",
- "Including passwords in URIs is deprecated.
",
- 0|Force.must|Force.security,
- new InSpec[]{
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.1",
- "Use of the format \"user:password\" in the userinfo field is deprecated.",
- "Use of the format \"user:password\" in the userinfo field is deprecated.
"
- ),
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.1",
- "Applications may choose to ignore or reject such data when it is received as part of a reference and should reject the storage of such data in unencrypted form. The passing of authentication information in clear text has proven to be a security risk in almost every case where it has been used.",
- "Applications may choose to ignore or reject such data when it is received as part of a reference and should reject the storage of such data in unencrypted form. The passing of authentication information in clear text has proven to be a security risk in almost every case where it has been used.
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "http://user:pass@example.org/",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- DISCOURAGED_IRI_CHARACTER,
- "DISCOURAGED_IRI_CHARACTER",
- "Certain characters are discouraged in IRIs.",
- "Certain characters are discouraged in IRIs.
",
- 0|Force.minting,
- new InSpec[]{
-
- new FromSpec_iri(
- "IRI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3987.html#sec-6.1",
- "The UCS contains many areas of characters for which there are strong visual look-alikes. Because of the likelihood of transcription errors, these also should be avoided. This includes the full-width equivalents of Latin characters, half-width Katakana characters for Japanese, and many others. It also includes many look-alikes of \"space\", \"delims\", and \"unwise\", characters excluded in [RFC3491].",
- "The UCS contains many areas of characters for which there are strong visual look-alikes. Because of the likelihood of transcription errors, these also should be avoided. This includes the full-width equivalents of Latin characters, half-width Katakana characters for Japanese, and many others. It also includes many look-alikes of \"space\", \"delims\", and \"unwise\", characters excluded in [RFC3491].
"
- ),
-
- },
- new String[]{
-
- "http://example.org/\u2000en-quad",
-
- "http://example.org/\u205Fmedium-mathematical-space",
-
- "http://example\uFF95.org/",
-
- "http://example\uFF47.org/",
-
- },
-
- new String[]{
-
- },
- true||
- false
- );
-
- new ViolationCodeInfo(
- BAD_BIDI_SUBCOMPONENT,
- "BAD_BIDI_SUBCOMPONENT",
- "There are restrictions on bidi characters in subcomponents of IRIs",
- "There are restrictions on bidi characters in subcomponents of IRIs
",
- 0|Force.should,
- new InSpec[]{
-
- new FromSpec_iri(
- "IRI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3987.html#sec-4.2",
- " (0)A component SHOULD NOT use both right-to-left and left-to-right characters. (1)A component using right-to-left characters SHOULD start and end with right-to-left characters. ",
- ""+
- "
"+
- " A component SHOULD NOT use both right-to-left and left-to-right characters. "+
- ""+
- " A component using right-to-left characters SHOULD start and end with right-to-left characters. "+
- " "+
- "
"
- ),
-
- },
- new String[]{
-
- },
-
- new String[]{
-
- },
- true||
- false
- );
-
- new ViolationCodeInfo(
- DNS_LENGTH_LIMIT,
- "DNS_LENGTH_LIMIT",
- new String[]{
-
- },
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- DNS_LABEL_LENGTH_LIMIT,
- "DNS_LABEL_LENGTH_LIMIT",
- new String[]{
-
- },
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- NOT_UTF8_ESCAPE,
- "NOT_UTF8_ESCAPE",
- new String[]{
-
- },
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- NOT_UTF8_ESCAPE_IN_HOST,
- "NOT_UTF8_ESCAPE_IN_HOST",
- new String[]{
-
- },
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- BAD_DOT_IN_IDN,
- "BAD_DOT_IN_IDN",
- new String[]{
-
- },
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- UNREGISTERED_IANA_SCHEME,
- "UNREGISTERED_IANA_SCHEME",
- "The scheme name does not have a \"-\" in it, but is not in the IANA registry. (Last updated from the registry January 2006)",
- "The scheme name does not have a \"-\" in it, but is not in the IANA registry. (Last updated from the registry January 2006)
",
- 0,
- new InSpec[]{
-
- new FromSpec_other(
- "URL_Registratrion",
- -1,
- "http://www.apps.ietf.org/rfc/rfc2717.html#sec-",
- "",
- "
"
- ),
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2",
- "The NAMES of schemes registered in the IETF tree MUST NOT contain the dash (also known as the hyphen and minus sign) character ('-') USASCII value 2Dh. Use of this character can cause confusion with schemes registered in alternative trees (see section 3.3).",
- "The NAMES of schemes registered in the IETF tree MUST NOT contain the dash (also known as the hyphen and minus sign) character ('-') USASCII value 2Dh. Use of this character can cause confusion with schemes registered in alternative trees (see section 3.3).
"
- ),
-
- new FromSpec_iri(
- "URI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.3",
- "The syntax for alternative trees shall be as follows: each tree will be identified by a unique prefix, which must be established in the same fashion as a URL scheme name in the IETF tree, except that the prefix must be defined by a Standards Track document. Scheme names in the new tree are then constructed by prepending the prefix to an identifier unique to each scheme in that tree, as prescribed by that tree's identifying document:"+
- "\n"+
- " '-'\n"+
- "For instance, the \"foo\" tree would allow creation of scheme names of the form: \"foo-blahblah:\" and \"foo-bar:\", where the tree prescribes an arbitrary USASCII string following the tree's unique prefix.",
- "The syntax for alternative trees shall be as follows: each tree will be identified by a unique prefix, which must be established in the same fashion as a URL scheme name in the IETF tree, except that the prefix must be defined by a Standards Track document. Scheme names in the new tree are then constructed by prepending the prefix to an identifier unique to each scheme in that tree, as prescribed by that tree's identifying document:"+
- "
\n"+
- " <prefix>'-'<tree-specific identifier>\n"+
- " "+
- "For instance, the \"foo\" tree would allow creation of scheme names of the form: \"foo-blahblah:\" and \"foo-bar:\", where the tree prescribes an arbitrary USASCII string following the tree's unique prefix.
"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "foo://example.org/bar",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- UNREGISTERED_NONIETF_SCHEME_TREE,
- "UNREGISTERED_NONIETF_SCHEME_TREE",
- "The scheme name has a \"-\" in it, but it does not start in \"x-\" and the prefix is not known as the prefix of an alternative tree for URI schemes.",
- "The scheme name has a \"-\" in it, but it does not start in \"x-\" and the prefix is not known as the prefix of an alternative tree for URI schemes.
",
- 0,
- new InSpec[]{
-
- new FromSpec_other(
- "URL_Registratrion",
- -1,
- "http://www.apps.ietf.org/rfc/rfc2717.html#sec-3.3",
- "The syntax for alternative trees shall be as follows: each tree will be identified by a unique prefix, which must be established in the same fashion as a URL scheme name in the IETF tree, except that the prefix must be defined by a Standards Track document. Scheme names in the new tree are then constructed by prepending the prefix to an identifier unique to each scheme in that tree, as prescribed by that tree's identifying document:"+
- "\n"+
- " '-'\n"+
- "For instance, the \"foo\" tree would allow creation of scheme names of the form: \"foo-blahblah:\" and \"foo-bar:\", where the tree prescribes an arbitrary USASCII string following the tree's unique prefix.",
- "The syntax for alternative trees shall be as follows: each tree will be identified by a unique prefix, which must be established in the same fashion as a URL scheme name in the IETF tree, except that the prefix must be defined by a Standards Track document. Scheme names in the new tree are then constructed by prepending the prefix to an identifier unique to each scheme in that tree, as prescribed by that tree's identifying document:"+
- "
\n"+
- " <prefix>'-'<tree-specific identifier>\n"+
- " "+
- "For instance, the \"foo\" tree would allow creation of scheme names of the form: \"foo-blahblah:\" and \"foo-bar:\", where the tree prescribes an arbitrary USASCII string following the tree's unique prefix.
"
- ),
-
- new FromAlso(
- "URI",
- "http://www.apps.ietf.org/rfc/rfc3986.html"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- new FromAlso(
- "XLink",
- "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"
- ),
-
- new FromAlso(
- "XML",
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"
- ),
-
- new FromAlso(
- "RDF",
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"
- ),
-
- new FromAlso(
- "Schema",
- "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"
- ),
-
- },
- new String[]{
-
- "foo-bar://example.org/bar",
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- NOT_NFC,
- "NOT_NFC",
- "The IRI is not in Unicode Normal Form C.",
- "The IRI is not in Unicode Normal Form C.
",
- 0|Force.should,
- new InSpec[]{
-
- new FromSpec_iri(
- "IRI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3987.html#sec-5.3.2.2",
- "To avoid false negatives and problems with transcoding, IRIs SHOULD be created by using NFC.",
- "To avoid false negatives and problems with transcoding, IRIs SHOULD be created by using NFC.
"
- ),
-
- },
- new String[]{
-
- "http://example.org/#Andre\u0301",
-
- },
-
- new String[]{
-
- },
- true||
- false
- );
-
- new ViolationCodeInfo(
- NOT_NFKC,
- "NOT_NFKC",
- "The IRI is not in Unicode Normal Form KC.",
- "The IRI is not in Unicode Normal Form KC.
",
- 0|Force.minting,
- new InSpec[]{
-
- new FromSpec_iri(
- "IRI",
- -1,
- "http://www.apps.ietf.org/rfc/rfc3987.html#sec-7.5",
- "Although there may be exceptions, newly created resource names should generally be in NFKC",
- "Although there may be exceptions, newly created resource names should generally be in NFKC
"
- ),
-
- },
- new String[]{
-
- "http://example.org/#Andre\u0301",
-
- },
-
- new String[]{
-
- },
- true||
- false
- );
-
- new ViolationCodeInfo(
- DEPRECATED_UNICODE_CHARACTER,
- "DEPRECATED_UNICODE_CHARACTER",
- "TODO",
- "TODO
",
- 0,
- new InSpec[]{
-
- new FromAlso(
- "Unicode",
- "http://www.unicode.org/"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- },
- new String[]{
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- UNDEFINED_UNICODE_CHARACTER,
- "UNDEFINED_UNICODE_CHARACTER",
- "TODO",
- "TODO
",
- 0,
- new InSpec[]{
-
- new FromAlso(
- "Unicode",
- "http://www.unicode.org/"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- },
- new String[]{
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- PRIVATE_USE_CHARACTER,
- "PRIVATE_USE_CHARACTER",
- "TODO",
- "TODO
",
- 0,
- new InSpec[]{
-
- new FromAlso(
- "Unicode",
- "http://www.unicode.org/"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- },
- new String[]{
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- UNICODE_CONTROL_CHARACTER,
- "UNICODE_CONTROL_CHARACTER",
- "TODO",
- "TODO
",
- 0,
- new InSpec[]{
-
- new FromAlso(
- "Unicode",
- "http://www.unicode.org/"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- },
- new String[]{
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- UNASSIGNED_UNICODE_CHARACTER,
- "UNASSIGNED_UNICODE_CHARACTER",
- "The character code is not assigned in the version of Unicode implemented here.",
- "The character code is not assigned in the version of Unicode implemented here.
",
- 0|Force.minting,
- new InSpec[]{
-
- new FromAlso(
- "Unicode",
- "http://www.unicode.org/"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- },
- new String[]{
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- MAYBE_NOT_NFC,
- "MAYBE_NOT_NFC",
- new String[]{
-
- },
- new String[]{
-
- },
- true||
- false
- );
-
- new ViolationCodeInfo(
- MAYBE_NOT_NFKC,
- "MAYBE_NOT_NFKC",
- new String[]{
-
- },
- new String[]{
-
- },
- true||
- false
- );
-
- new ViolationCodeInfo(
- UNICODE_WHITESPACE,
- "UNICODE_WHITESPACE",
- "TODO",
- "TODO
",
- 0,
- new InSpec[]{
-
- new FromAlso(
- "Unicode",
- "http://www.unicode.org/"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- },
- new String[]{
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- COMPATIBILITY_CHARACTER,
- "COMPATIBILITY_CHARACTER",
- "Bad character",
- "Bad character
",
- 0,
- new InSpec[]{
-
- new FromAlso(
- "Unicode",
- "http://www.unicode.org/"
- ),
-
- new FromAlso(
- "IRI",
- "http://www.apps.ietf.org/rfc/rfc3987.html"
- ),
-
- },
- new String[]{
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- REQUIRED_COMPONENT_MISSING,
- "REQUIRED_COMPONENT_MISSING",
- "A component that is required by the scheme is missing.",
- "A component that is required by the scheme is missing.
",
- 0,
- new InSpec[]{
-
- new FromSpec_iri(
- "RDF",
- SCHEME,
- "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref",
- "representing an *absolute URI* with optional fragment identifier",
- "representing an"+
- " absolute URI "+
- "with optional fragment identifier
"
- ),
-
- new FromSpec_scheme(
- "http",
- HOST,
- "http://www.apps.ietf.org/rfc/rfc2616.html"
- ),
-
- new FromSpec_scheme(
- "https",
- HOST,
- "http://www.apps.ietf.org/rfc/rfc2818.html"
- ),
-
- new FromSpec_scheme(
- "ftp",
- HOST,
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
- ""+
- "\n"+
- "ftpurl = \"ftp://\" login [ \"/\" fpath [ \";type=\" ftptype ]]\n"+
- "\n"+
- "login = [ user [ \":\" password ] \"@\" ] hostport\n"+
- "",
- ""+
- "
\n"+
- "ftpurl = \"ftp://\" login [ \"/\" fpath [ \";type=\" ftptype ]]\n"+
- "\n"+
- "login = [ user [ \":\" password ] \"@\" ] hostport\n"+
- " "+
- "
"
- ),
-
- new FromSpec_scheme(
- "news",
- PATH,
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
- ""+
- "\n"+
- "newsurl = \"news:\" grouppart\n"+
- "grouppart = \"*\" | group | article\n"+
- "group = alpha *[ alpha | digit | \"-\" | \".\" | \"+\" | \"_\" ]\n"+
- "article = 1*[ uchar | \";\" | \"/\" | \"?\" | \":\" | \"&\" | \"=\" ] \"@\" host\n"+
- "",
- ""+
- "
\n"+
- "newsurl = \"news:\" grouppart\n"+
- "grouppart = \"*\" | group | article\n"+
- "group = alpha *[ alpha | digit | \"-\" | \".\" | \"+\" | \"_\" ]\n"+
- "article = 1*[ uchar | \";\" | \"/\" | \"?\" | \":\" | \"&\" | \"=\" ] \"@\" host\n"+
- " "+
- "
"
- ),
-
- new FromSpec_scheme(
- "nntp",
- HOST,
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-3.7"
- ),
-
- new FromSpec_scheme(
- "file",
- PATH,
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
- ""+
- "\n"+
- "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"+
- "",
- ""+
- "
\n"+
- "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"+
- " "+
- "
"
- ),
-
- new FromSpec_scheme(
- "file",
- AUTHORITY,
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
- ""+
- "\n"+
- "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"+
- "",
- ""+
- "
\n"+
- "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"+
- " "+
- "
"
- ),
-
- new FromSpec_scheme(
- "urn",
- PATH,
- "http://www.apps.ietf.org/rfc/rfc2141.html#sec-2",
- ""+
- "\n"+
- " ::= \"urn:\" \":\" \n"+
- "",
- ""+
- "
\n"+
- "<URN> ::= \"urn:\" <NID> \":\" <NSS>\n"+
- " "+
- "
"
- ),
-
- },
- new String[]{
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- PROHIBITED_COMPONENT_PRESENT,
- "PROHIBITED_COMPONENT_PRESENT",
- "A component that is prohibited by the scheme is present.",
- "A component that is prohibited by the scheme is present.
",
- 0,
- new InSpec[]{
-
- new FromSpec_iri(
- "XML",
- FRAGMENT,
- "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid",
- "TODO",
- "TODO
"
- ),
-
- new FromSpec_scheme(
- "http",
- USER,
- "http://www.apps.ietf.org/rfc/rfc2616.html"
- ),
-
- new FromSpec_scheme(
- "https",
- USER,
- "http://www.apps.ietf.org/rfc/rfc2818.html"
- ),
-
- new FromSpec_scheme(
- "mailto",
- AUTHORITY,
- "http://www.apps.ietf.org/rfc/rfc2368.html",
- ""+
- "\n"+
- " mailtoURL = \"mailto:\" [ to ] [ headers ]\n"+
- " to = #mailbox\n"+
- " headers = \"?\" header *( \"&\" header )\n"+
- " header = hname \"=\" hvalue\n"+
- " hname = *urlc\n"+
- " hvalue = *urlc\n"+
- "",
- ""+
- "
\n"+
- " mailtoURL = \"mailto:\" [ to ] [ headers ]\n"+
- " to = #mailbox\n"+
- " headers = \"?\" header *( \"&\" header )\n"+
- " header = hname \"=\" hvalue\n"+
- " hname = *urlc\n"+
- " hvalue = *urlc\n"+
- " "+
- "
"
- ),
-
- new FromSpec_scheme(
- "news",
- AUTHORITY,
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
- ""+
- "\n"+
- "newsurl = \"news:\" grouppart\n"+
- "grouppart = \"*\" | group | article\n"+
- "group = alpha *[ alpha | digit | \"-\" | \".\" | \"+\" | \"_\" ]\n"+
- "article = 1*[ uchar | \";\" | \"/\" | \"?\" | \":\" | \"&\" | \"=\" ] \"@\" host\n"+
- "",
- ""+
- "
\n"+
- "newsurl = \"news:\" grouppart\n"+
- "grouppart = \"*\" | group | article\n"+
- "group = alpha *[ alpha | digit | \"-\" | \".\" | \"+\" | \"_\" ]\n"+
- "article = 1*[ uchar | \";\" | \"/\" | \"?\" | \":\" | \"&\" | \"=\" ] \"@\" host\n"+
- " "+
- "
"
- ),
-
- new FromSpec_scheme(
- "nntp",
- QUERY,
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-3.7"
- ),
-
- new FromSpec_scheme(
- "nntp",
- USER,
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-3.7"
- ),
-
- new FromSpec_scheme(
- "file",
- USER,
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
- ""+
- "\n"+
- "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"+
- "",
- ""+
- "
\n"+
- "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"+
- " "+
- "
"
- ),
-
- new FromSpec_scheme(
- "file",
- PORT,
- "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
- ""+
- "\n"+
- "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"+
- "",
- ""+
- "
\n"+
- "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"+
- " "+
- "
"
- ),
-
- new FromSpec_scheme(
- "urn",
- AUTHORITY,
- "http://www.apps.ietf.org/rfc/rfc2141.html#sec-2",
- ""+
- "\n"+
- " ::= \"urn:\" \":\" \n"+
- "",
- ""+
- "
\n"+
- "<URN> ::= \"urn:\" <NID> \":\" <NSS>\n"+
- " "+
- "
"
- ),
-
- new FromSpec_scheme(
- "urn",
- AUTHORITY,
- "http://www.apps.ietf.org/rfc/rfc2141.html#sec-2.1",
- ""+
- "\n"+
- " ::= [ 1,31 ]\n"+
- "",
- ""+
- "
\n"+
- "<NID> ::= <let-num> [ 1,31<let-num-hyp> ]\n"+
- " "+
- "
"
- ),
-
- new FromSpec_scheme(
- "urn",
- QUERY,
- "http://www.apps.ietf.org/rfc/rfc2141.html#sec-2.3.2"
- ),
-
- },
- new String[]{
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- SCHEME_REQUIRES_LOWERCASE,
- "SCHEME_REQUIRES_LOWERCASE",
- "Some part of the scheme specific syntax requires lowercase.",
- "Some part of the scheme specific syntax requires lowercase.
",
- 0,
- new InSpec[]{
-
- },
- new String[]{
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- SCHEME_PREFERS_LOWERCASE,
- "SCHEME_PREFERS_LOWERCASE",
- "Some part of the scheme specific syntax prefers lowercase.",
- "Some part of the scheme specific syntax prefers lowercase.
",
- 0|Force.minting,
- new InSpec[]{
-
- },
- new String[]{
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- SCHEME_PATTERN_MATCH_FAILED,
- "SCHEME_PATTERN_MATCH_FAILED",
- "The scheme specific syntax rules are violated.",
- "The scheme specific syntax rules are violated.
",
- 0,
- new InSpec[]{
-
- },
- new String[]{
-
- },
-
- new String[]{
-
- },
-
- false
- );
-
- new ViolationCodeInfo(
- QUERY_IN_LEGACY_SCHEME,
- "QUERY_IN_LEGACY_SCHEME",
- new String[]{
-
- },
- new String[]{
-
- },
-
- false
- );
-
- }
- }
-
-
-/**
- The character violates the grammar rules for URIs/IRIs.
-
- This violates the following specifications:
- [URI] (see here ), [IRI] (see section 2.2 ), [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <ht$tp://example.org/foo>
-
-
-
-*/
- int ILLEGAL_CHARACTER = 0;
-
-
-/**
- Percent-escape sequences should use uppercase.
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 2.1
-
-
-
- URI producers and normalizers should use
- uppercase
-
- hexadecimal digits for all percent-encodings.
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org/foo%c3%80>
-
-
-
-*/
- int PERCENT_ENCODING_SHOULD_BE_UPPERCASE = 1;
-
-
-/**
- Percent-escape sequences should not be used unnecessarily.
-
-
- The IRI specification only weakly suggests that
- Unicode characters should be used in preference
- to percent encodings.
-
-
- This is specified in
- [IRI] .
-
-
-
-
- see
- section 3.2
-
-
-
- URI-to-IRI conversion removes percent-encodings
-
-
-
-
-
-
- This violates the [IRI]
- specification.
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org/foo%C3%A9r>
-
-
-
- Unimplemented.
-
-*/
- int SUPERFLUOUS_NON_ASCII_PERCENT_ENCODING = 2;
-
-
-/**
- Percent-escape sequences should not be used unnecessarily.
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 2.3
-
-
-
- For consistency, percent-encoded octets in the
- ranges of ALPHA
- (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen
- (%2D), period (%2E), underscore (%5F), or tilde
- (%7E) should not be created by URI producers
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org/foo%5Fb%61r>
-
-
-
- Unimplemented.
-
-*/
- int SUPERFLUOUS_ASCII_PERCENT_ENCODING = 3;
-
-
-/**
- The character matches no grammar rules of URIs/IRIs.
- These characters are permitted in RDF URI References,
- XML system identifiers, and XML Schema anyURIs.
-
-
- Whitespace is dealt with separately.
-
-
- This is specified in
- [IRI] .
-
-
-
-
- see
- here
-
-
-
- Systems accepting IRIs MAY also deal with the printable characters in US-ASCII
- that are not allowed in URIs, namely "<", ">", '"', space, "{", "}", "|", "\",
- "^", and "`", in step 2 above. If these characters are found but are not converted,
- then the conversion SHOULD fail.
-
-
-
-
-
-
- This violates the following specifications:
- [IRI] , [URI] (see here ).
-
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org/fo|o>
-
- <http://example.org/fo<o>
-
- <http://example.org/fo>o>
-
- <http://example.org/fo"o>
-
- <http://example.org/fo`o>
-
-
-
- @see IRIFactory#allowUnwiseCharacters
- @see #WHITESPACE
- @see #DOUBLE_WHITESPACE
-*/
- int UNWISE_CHARACTER = 4;
-
-
-/**
- Control characters are not allowed in URIs or RDF URI References.
-
- This is specified in
- [RDF] .
-
-
-
-
- see
- here
-
-
-
- A URI reference within an RDF graph (an RDF URI reference) is a Unicode string [UNICODE] that:
-
-
-
-
- does not contain any control characters ( #x00 - #x1F, #x7F-#x9F)
-
-
-
-
-
-
-
-
-
-
- This is specified in
- [IRI] .
-
-
-
-
- see
- here
-
-
-
-
-
-ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
- / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
- / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
- / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
- / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
- / %xD0000-DFFFD / %xE1000-EFFFD
-
-
-
-
-
-
-
-
- This violates the following specifications:
- [RDF] , [IRI] , [URI] .
-
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org/fo\u007Fo>
-
- <http://example.org/fo\u0085o>
-
- <http://example.org/fo\u0009o>
-
- <http://example.org/fo\u0001o>
-
-
-
-*/
- int CONTROL_CHARACTER = 5;
-
-
-/**
- The character is not legal in XML.
-
- This is specified in
- [XML] .
-
-
-
-
- see
- here
-
-
-
-Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
-
-
-
-
-
-
- This violates the following specifications:
- [XML] , [XLink] , [Schema] .
-
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org/foo\u0001>
-
-
-
-*/
- int NON_XML_CHARACTER = 6;
-
-
-/**
- The character is discouraged in XML documents.
-
- This is specified in
- [XML] .
-
-
-
-
- see
- here
-
-
-
-Document authors are encouraged to avoid "compatibility characters", as defined in
-section 6.8 of [Unicode] (see also D21 in section 3.6 of [Unicode3]). The characters
-defined in the following ranges are also discouraged. They are either control
-characters or permanently undefined Unicode characters: [#x7F-#x84], [#x86-#x9F],
-[#xFDD0-#xFDDF],
-
-
-
-
-
-
- This violates the following specifications:
- [XML] , [XLink] , [Schema] .
-
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org/foo\u0080>
-
-
-
-*/
- int DISCOURAGED_XML_CHARACTER = 7;
-
-
-/**
- The path contains a segment /../ not at the beginning
- of a relative reference, or it contains a /./
- These should be removed.
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 6.2.2.3
-
-
-
- The complete path segments "." and ".." are intended
- only
- for use within relative references
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
- This violation may indicate security issues, and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#securityViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org/../foo>
-
- <http://example.org/foo/../foo>
-
- <http://example.org/foo/..>
-
- <http://example.org/foo/./foo>
-
- <http://example.org/./foo>
-
- <http://example.org/foo/.>
-
-
-
-*/
- int NON_INITIAL_DOT_SEGMENT = 8;
-
-
-/**
- The scheme component is empty.
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 3.1
-
-
- Scheme names consist of a sequence of characters
- beginning
- with a letter
- and followed by any combination of letters,
- digits, plus ("+"), period ("."), or hyphen ("-").
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <://example.org/foo>
-
-
-
-*/
- int EMPTY_SCHEME = 9;
-
-
-/**
- The scheme component must start with a letter.
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 3.1
-
-
- Scheme names consist of a sequence of characters
- beginning
- with a letter
- and followed by any combination of letters,
- digits, plus ("+"), period ("."), or hyphen ("-").
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <007://example.org/foo>
-
-
-
-*/
- int SCHEME_MUST_START_WITH_LETTER = 10;
-
-
-/**lowercase is preferred in this component
- This is specified in
- [URI] .
-
-
-
-
- For the SCHEME component:
-
- see
- section 3.1
-
-
- An implementation should accept uppercase letters as equivalent to lowercase in scheme names (e.g., allow "HTTP" as well as "http") for the sake of robustness but should only produce lowercase scheme names for consistency.
-
-
-
-
- For the HOST component:
-
- see
- section 3.2.2
-
-
-
- Although host is case-insensitive, producers and normalizers should use
- lowercase for registered names
- and hexadecimal addresses for the sake of uniformity, while only using uppercase letters for percent-encodings.
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <HTTP://example.org/foo>
-
- <http://eXamPle.org/foo>
-
-
-
-*/
- int LOWERCASE_PREFERRED = 11;
-
-
-/**The colon introducing an empty port component should be omitted entirely,
- or a port number should be specified.
- This is specified in
- [URI] .
-
-
-
-
- see
- section 3.2.2
-
-
-
- URI producers and normalizers should omit the port component
- and its ":" delimiter
- if port is empty
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org:/foo>
-
-
-
-*/
- int PORT_SHOULD_NOT_BE_EMPTY = 12;
-
-
-/**If the port is the default one for the scheme it should be omitted.
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 3.2.2
-
-
-
- URI producers and normalizers should omit the port component and its ":" delimiter if port is empty or if its value would be the
- same as that of the scheme's default.
-
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org:80/foo>
-
-
-
-*/
- int DEFAULT_PORT_SHOULD_BE_OMITTED = 13;
-
-
-/**
- Ports under 1024 should be accessed
- using the appropriate scheme name.
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 7.2
-
-
-
- Applications should prevent dereference of a URI that specifies a TCP port number within the "well-known port" range
- (0 - 1023)
- unless the protocol being used to dereference that URI is compatible with the protocol expected on that well-known port.
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation may indicate security issues, and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#securityViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org:180/foo>
-
-
-
-*/
- int PORT_SHOULD_NOT_BE_WELL_KNOWN = 14;
-
-
-/**Leading zeros in the port number should be omitted.
- This is an added feature of this implementation,
- not mandated by any standard.
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org:08080/foo>
-
-
-
-*/
- int PORT_SHOULD_NOT_START_IN_ZERO = 15;
-
-
-/**A prohibited bi-directional control character was found.
- This is specified in
- [IRI] .
-
-
-
-
- see
- section 4.1
-
-
-
- IRIs MUST NOT contain bidirectional formatting characters (LRM, RLM, LRE, RLE, LRO, RLO, and PDF).
-
-
-
-
-
-
- This violates the [IRI]
- specification.
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org/Andr\u202Abar>
-
- <http://example.org/Andr\u202Bbar>
-
- <http://example.org/Andr\u202Cbar>
-
- <http://example.org/Andr\u202Dbar>
-
- <http://example.org/Andr\u202Ebar>
-
- <http://example.org/Andr\u200Ebar>
-
- <http://example.org/Andr\u200Fbar>
-
-
-
- Unimplemented.
-
-*/
- int BIDI_FORMATTING_CHARACTER = 16;
-
-
-/**
-A single whitespace character.
-These match no grammar rules of URIs/IRIs.
- These characters are permitted in RDF URI References,
- XML system identifiers, and XML Schema anyURIs.
-
- This violates the following specifications:
- [URI] , [IRI] .
-
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org/ foo>
-
- <file:///Program Files>
-
-
-
- @see IRIFactory#allowUnwiseCharacters
- @see #NOT_XML_SCHEMA_WHITESPACE
- @see #UNWISE_CHARACTER
- @see #DOUBLE_WHITESPACE
-*/
- int WHITESPACE = 17;
-
-
-/**
-Either two or more consecutive whitespace characters, or leading or trailing whitespace.
-
-These match no grammar rules of URIs/IRIs.
-These characters are permitted in RDF URI References,
-XML system identifiers, but not XML Schema anyURIs.
-
- This violates the following specifications:
- [URI] , [IRI] , [Schema] .
-
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org/ foo>
-
- <file:///Program Files>
-
- <file:///TabBar >
-
- < rel-with-initial-space>
-
-
-
- @see IRIFactory#allowUnwiseCharacters
- @see #NOT_XML_SCHEMA_WHITESPACE
- @see #UNWISE_CHARACTER
- @see #WHITESPACE
-*/
- int DOUBLE_WHITESPACE = 18;
-
-
-/**
-Whitespace characters
- match no grammar rules of URIs/IRIs.
- These characters are permitted in RDF URI References,
- and XML system identifiers.
- However, tab and new line characters, and consecutive space characters
- cannot occur in XML Schema anyURIs.
-
- This is specified in
- [Schema] .
-
-
-
-
- see
- here
-
-
-
-
-
-<xs:simpleType name="anyURI" id="anyURI">
- [...]
- <xs:restriction base="xs:anySimpleType">
- <xs:whiteSpace fixed="true" value="collapse" id="anyURI.whiteSpace"/>
-
- </xs:restriction>
-</xs:simpleType>
-
-
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [Schema] .
-
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <file:///Tab\u0009Bar>
-
- <file:///Tab\u000ABar>
-
- <file:///Tab\u000DBar>
-
-
-
- @see IRIFactory#allowUnwiseCharacters
- @see #DOUBLE_WHITESPACE
- @see #WHITESPACE
-*/
- int NOT_XML_SCHEMA_WHITESPACE = 19;
-
-
-/**
- Internal code. This is not an error or warning condition,
- but is used to trigger more expensive processing.
-
-*/
- int DOUBLE_DASH_IN_REG_NAME = 20;
-
-
-/**
- Internal code. This is not an error or warning condition,
- but is used to trigger more expensive processing.
-
-*/
- int SCHEME_INCLUDES_DASH = 21;
-
-
-/**
- Internal code. This is not an error or warning condition,
- but is used to trigger more expensive processing.
-
-*/
- int NON_URI_CHARACTER = 22;
-
-
-/**
- Internal code. This is not an error or warning condition,
- but is used to trigger more expensive processing.
-
-*/
- int PERCENT_20 = 23;
-
-
-/**
- Internal code. This is not an error or warning condition,
- but is used to trigger more expensive processing.
-
-*/
- int PERCENT = 24;
-
-
-/**
- A syntax violation was detected in an IP V6 (or future) address.
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 3.2.2
-
-
-
-
-
-IP-literal = "[" ( IPv6address / IPvFuture ) "]"
-IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
-IPv6address = 6( h16 ":" ) ls32
- / "::" 5( h16 ":" ) ls32
- / [ h16 ] "::" 4( h16 ":" ) ls32
- / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
- / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
- / [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
- / [ *4( h16 ":" ) h16 ] "::" ls32
- / [ *5( h16 ":" ) h16 ] "::" h16
- / [ *6( h16 ":" ) h16 ] "::"
-
-ls32 = ( h16 ":" h16 ) / IPv4address
- ; least-significant 32 bits of address
-h16 = 1*4HEXDIG
- ; 16 bits of address represented in hexadecimal
-
-
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <http://[/>
-
- <ldap://[20015:db8::7]/c=GB?objectClass?one>
-
- <ldap://[2001:db8:::7]/c=GB?objectClass?one>
-
-
-
-*/
- int IP_V6_OR_FUTURE_ADDRESS_SYNTAX = 25;
-
-
-/**
- IP version 6 addresses should use lowercase hexadecimal
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 3.2.2
-
-
-
- Although host is case-insensitive, producers and normalizers
-
- should use lowercase
- for registered names and
- hexadecimal addresses
- for the sake of uniformity
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <ldap://[2001:Db8::7]/c=GB?objectClass?one>
-
- <ldap://[2001:dB8::7]/c=GB?objectClass?one>
-
-
-
-*/
- int IPv6ADDRESS_SHOULD_BE_LOWERCASE = 26;
-
-
-/**
- A host entry consists of four numbers,
- but they are not in the range 0-255, or have leading zeros.
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 3.2.2
-
-
-
- A host identified by an IPv4 literal address is represented in dotted-decimal notation (a sequence of
- four decimal numbers
- in the range
- 0 to 255
- , separated by "."),
-
-
-
-
-
- see
- section 3.2.2
-
-
-
-
-
-dec-octet = DIGIT ; 0-9
- / %x31-39 DIGIT ; 10-99
- / "1" 2DIGIT ; 100-199
- / "2" %x30-34 DIGIT ; 200-249
- / "25" %x30-35 ; 250-255
-
-
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <ldap://155.00.55.102/c=GB?objectClass?one>
-
- <ldap://20.256.20.20/c=GB?objectClass?one>
-
- <ldap://20.1000.20.20/c=GB?objectClass?one>
-
- <ldap://20.010.20.20/c=GB?objectClass?one>
-
-
-
-*/
- int IP_V4_OCTET_RANGE = 27;
-
-
-/**
- The host component did not meet the restrictions on DNS names.
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 3.2.2
-
-
-
- URI producers should use names that
- conform to the DNS syntax
- , even when use of DNS is not immediately apparent, and should limit these names to no more than 255 characters in length.
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation is relevant for IRIs using DNS as the registry of hostnames.
- The behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#dnsViolation}.
-
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <ldap://foo$/c=GB?objectClass?one>
-
- <http://foo.example.$org/>
-
-
-
-*/
- int NOT_DNS_NAME = 28;
-
-
-/**
- The host component used percent encoding, where punycode is preferred.
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 3.2.2
-
-
-
-URI producers should provide these registered names in the IDNA encoding, rather than a percent-encoding, if they wish to maximize interoperability with legacy URI resolvers.
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
- This violation is relevant for IRIs using DNS as the registry of hostnames.
- The behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#dnsViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <ftp://andr%C3%A9.example.org/>
-
-
-
-*/
- int USE_PUNYCODE_NOT_PERCENTS = 29;
-
-
-/**
- The host component a percent occurred without two following hexadecimal digits.
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 2.1
-
-
-
- A percent-encoded octet is encoded as a character triplet, consisting of the percent character "%" followed by the two hexadecimal digits representing that octet's numeric value.
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <ftp://andr%%A9.example.org/>
-
- <ftp://andr%.example.org/>
-
- <ftp://andre.example.org/%>
-
- <ftp://andre.example.org/%A>
-
- <ftp://andre.example.org/%A?>
-
- <ftp://andre.example.org/%A#>
-
-
-
-*/
- int ILLEGAL_PERCENT_ENCODING = 30;
-
-
-/**
- Internal code. This is not an error or warning condition,
- but is used to trigger more expensive processing.
-
-*/
- int ACE_PREFIX = 31;
-
-
-/**
- A unicode surrogate character that is not of a surrogate pair.
-
- This does not violate any of the supported IRI, URI or scheme specifications.
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <http:/foo/p\uD800>
-
-
-
-*/
- int LONE_SURROGATE = 32;
-
-
-/**
- A DNS name had a - at the beginning or end.
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 3.2.2
-
-
-
- Such a name consists of a sequence of domain labels separated by ".", each domain label starting and ending with an alphanumeric character and possibly also containing "-" characters.
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation is relevant for IRIs using DNS as the registry of hostnames.
- The behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#dnsViolation}.
-
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <ldap://-foo/c=GB?objectClass?one>
-
- <http://foo.example.org-/>
-
- <http://foo.example.org--/>
-
- <http://--foo.example.org/>
-
- <http://-fo-o.example.org/>
-
-
-
-*/
- int DNS_LABEL_DASH_START_OR_END = 33;
-
-
-/**
- Characters used in the IRI were unassigned in the version of Unicode known
- by this system. They may have been assigned since.
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 3.2.2
-
-
-
- When a non-ASCII registered name represents an internationalized domain name intended for resolution via the DNS, the name must be transformed to the IDNA encoding [RFC3490] prior to name lookup. URI producers should provide these registered names in the IDNA encoding, rather than a percent-encoding, if they wish to maximize interoperability with legacy URI resolvers.
-
-
-
-
-
-
- This is specified in
- [IRI] .
-
-
-
-
- see
- section 3.1
-
-
-
- Replace the ireg-name part of the IRI by the part converted using the ToASCII operation specified in section 4.1 of [RFC3490] on each dot-separated label, and by using U+002E (FULL STOP) as a label separator, with the flag UseSTD3ASCIIRules set to TRUE, and with the flag AllowUnassigned set to FALSE for creating IRIs and set to TRUE otherwise.
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <http://foo.example\u0221.org/>
-
-
-
-*/
- int BAD_IDN_UNASSIGNED_CHARS = 34;
-
-
-/**
- The Internationalized Domain Name check failed.
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 3.2.2
-
-
-
- When a non-ASCII registered name represents an internationalized domain name intended for resolution via the DNS, the name must be transformed to the IDNA encoding [RFC3490] prior to name lookup. URI producers should provide these registered names in the IDNA encoding, rather than a percent-encoding, if they wish to maximize interoperability with legacy URI resolvers.
-
-
-
-
-
-
- This is specified in
- [IRI] .
-
-
-
-
- see
- section 3.1
-
-
-
- Replace the ireg-name part of the IRI by the part converted using the ToASCII operation specified in section 4.1 of [RFC3490] on each dot-separated label, and by using U+002E (FULL STOP) as a label separator, with the flag UseSTD3ASCIIRules set to TRUE, and with the flag AllowUnassigned set to FALSE for creating IRIs and set to TRUE otherwise.
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <http://--foo.example.org/>
-
- <http://xn--andr--ep-.example.org/>
-
- <http://xn.example.\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333/>
-
-
-
-*/
- int BAD_IDN = 35;
-
-
-/**
- Including passwords in URIs is deprecated.
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 3.2.1
-
-
-
-Use of the format "user:password" in the userinfo field is deprecated.
-
-
-
-
-
- see
- section 3.2.1
-
-
-
-Applications may choose to ignore or reject such data when it is received as part of a reference and should reject the storage of such data in unencrypted form. The passing of authentication information in clear text has proven to be a security risk in almost every case where it has been used.
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
-
-
- This violation has MUST force.
-
- This violation may indicate security issues, and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#securityViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <http://user:pass@example.org/>
-
-
-
-*/
- int HAS_PASSWORD = 36;
-
-
-/**
- Certain characters are discouraged in IRIs.
-
-
- Implementation is very partial. The amount of guidance
- as to which characters to discourage is insufficient.
-
-
- This is specified in
- [IRI] .
-
-
-
-
- see
- section 6.1
-
-
-
-The UCS contains many areas of characters for which there are
-strong visual look-alikes. Because of the likelihood of transcription errors, these also should be avoided. This includes the full-width equivalents of Latin characters, half-width Katakana characters for Japanese, and many others. It also includes many look-alikes of "space", "delims", and "unwise", characters excluded in [RFC3491].
-
-
-
-
-
-
- This violates the [IRI]
- specification.
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org/\u2000en-quad>
-
- <http://example.org/\u205Fmedium-mathematical-space>
-
- <http://example\uFF95.org/>
-
- <http://example\uFF47.org/>
-
-
-
- Unimplemented.
-
-*/
- int DISCOURAGED_IRI_CHARACTER = 37;
-
-
-/**
- There are restrictions on bidi characters in subcomponents of IRIs
-
- This is specified in
- [IRI] .
-
-
-
-
- see
- section 4.2
-
-
-
-
-
-
-
-A component SHOULD NOT use both right-to-left and left-to-right
- characters.
-
-
-
-
-A component using right-to-left characters SHOULD start and end
- with right-to-left characters.
-
-
-
-
-
-
-
-
- This violates the [IRI]
- specification.
-
- This violation has SHOULD force.
- By default, this is treated as an error (for the relevant specs), but that behaviour can be modified by
- {@link IRIFactory#shouldViolation}.
-
-
- Unimplemented.
-
-*/
- int BAD_BIDI_SUBCOMPONENT = 38;
-
-
-/**
- // TODO complete entry for DNS_LENGTH_LIMIT
-*/
- int DNS_LENGTH_LIMIT = 39;
-
-
-/**
- // TODO complete entry for DNS_LABEL_LENGTH_LIMIT
-*/
- int DNS_LABEL_LENGTH_LIMIT = 40;
-
-
-/**
- // TODO complete entry for NOT_UTF8_ESCAPE
-*/
- int NOT_UTF8_ESCAPE = 41;
-
-
-/**
- // TODO complete entry for NOT_UTF8_ESCAPE_IN_HOST
-*/
- int NOT_UTF8_ESCAPE_IN_HOST = 42;
-
-
-/**
- // TODO complete entry for BAD_DOT_IN_IDN
-*/
- int BAD_DOT_IN_IDN = 43;
-
-
-/**
- The scheme name does not have a "-" in it, but is not in the IANA registry.
- (Last updated from the registry January 2006)
-
- This is specified in
- [URL_Registratrion] .
-
-
-
-
- see
- section
-
-
-
-
-
-
-
-
-
- This is specified in
- [URI] .
-
-
-
-
- see
- section 3.2
-
-
-
- The NAMES of schemes registered in the IETF tree MUST NOT contain the dash
- (also known as the hyphen and minus sign) character ('-') USASCII value 2Dh.
- Use of this character can cause confusion with schemes registered in
- alternative trees (see section 3.3).
-
-
-
-
-
- see
- section 3.3
-
-
-
- The syntax for alternative trees shall be as follows: each tree will be identified by a unique prefix, which must be established in the same fashion as a URL scheme name in the IETF tree, except that the prefix must be defined by a Standards Track document. Scheme names in the new tree are then constructed by prepending the prefix to an identifier unique to each scheme in that tree, as prescribed by that tree's identifying document:
-
-
- <prefix>'-'<tree-specific identifier>
-
-
-For instance, the "foo" tree would allow creation of scheme names of the form: "foo-blahblah:" and "foo-bar:", where the tree prescribes an arbitrary USASCII string following the tree's unique prefix.
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [XLink] , [XML] , [RDF] , [Schema] .
-
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <foo://example.org/bar>
-
-
-
-*/
- int UNREGISTERED_IANA_SCHEME = 44;
-
-
-/**
- The scheme name has a "-" in it, but it does not start in "x-"
- and the prefix is not known as the prefix of an alternative tree for
- URI schemes.
-
-
-
- There is no standard provision for "x-" as a prefix for private use schemes.
- This is a feature of this implementation.
- As far as I am aware, no alternative trees have been registered.
-
-
-
- This is specified in
- [URL_Registratrion] .
-
-
-
-
- see
- section 3.3
-
-
-
- The syntax for alternative trees shall be as follows: each tree will be identified by a unique prefix, which must be established in the same fashion as a URL scheme name in the IETF tree, except that the prefix must be defined by a Standards Track document. Scheme names in the new tree are then constructed by prepending the prefix to an identifier unique to each scheme in that tree, as prescribed by that tree's identifying document:
-
-
- <prefix>'-'<tree-specific identifier>
-
-
-For instance, the "foo" tree would allow creation of scheme names of the form: "foo-blahblah:" and "foo-bar:", where the tree prescribes an arbitrary USASCII string following the tree's unique prefix.
-
-
-
-
-
-
- This violates the following specifications:
- [URI] , [IRI] , [XLink] , [XML] , [RDF] , [Schema] .
-
-
- This violation has MUST force.
-
- The following are examples of IRIs that have this violation:
-
-
- <foo-bar://example.org/bar>
-
-
-
-*/
- int UNREGISTERED_NONIETF_SCHEME_TREE = 45;
-
-
-/**
- The IRI is not in Unicode Normal Form C.
-
- This is specified in
- [IRI] .
-
-
-
-
- see
- section 5.3.2.2
-
-
-
- To avoid false negatives and problems with transcoding, IRIs SHOULD be created by using NFC.
-
-
-
-
-
-
- This violates the [IRI]
- specification.
-
- This violation has SHOULD force.
- By default, this is treated as an error (for the relevant specs), but that behaviour can be modified by
- {@link IRIFactory#shouldViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org/#Andre\u0301>
-
-
-
- Unimplemented.
-
-*/
- int NOT_NFC = 46;
-
-
-/**
- The IRI is not in Unicode Normal Form KC.
-
- This is specified in
- [IRI] .
-
-
-
-
- see
- section 7.5
-
-
-
- Although there may be exceptions, newly created resource names should generally be in NFKC
-
-
-
-
-
-
- This violates the [IRI]
- specification.
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
- The following are examples of IRIs that have this violation:
-
-
- <http://example.org/#Andre\u0301>
-
-
-
- Unimplemented.
-
-*/
- int NOT_NFKC = 47;
-
-
-/**TODO
- This violates the following specifications:
- [Unicode] , [IRI] .
-
-
- This violation has MUST force.
-
-*/
- int DEPRECATED_UNICODE_CHARACTER = 48;
-
-
-/**TODO
- This violates the following specifications:
- [Unicode] , [IRI] .
-
-
- This violation has MUST force.
-
-*/
- int UNDEFINED_UNICODE_CHARACTER = 49;
-
-
-/**TODO
- This violates the following specifications:
- [Unicode] , [IRI] .
-
-
- This violation has MUST force.
-
-*/
- int PRIVATE_USE_CHARACTER = 50;
-
-
-/**TODO
- This violates the following specifications:
- [Unicode] , [IRI] .
-
-
- This violation has MUST force.
-
-*/
- int UNICODE_CONTROL_CHARACTER = 51;
-
-
-/**The character code is not assigned in the version of Unicode implemented here.
-
- This violates the following specifications:
- [Unicode] , [IRI] .
-
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
-*/
- int UNASSIGNED_UNICODE_CHARACTER = 52;
-
-
-/**
- Internal code. This is not an error or warning condition,
- but is used to trigger more expensive processing.
-
-*/
- int MAYBE_NOT_NFC = 53;
-
-
-/**
- Internal code. This is not an error or warning condition,
- but is used to trigger more expensive processing.
-
-*/
- int MAYBE_NOT_NFKC = 54;
-
-
-/**TODO
- This violates the following specifications:
- [Unicode] , [IRI] .
-
-
- This violation has MUST force.
-
-*/
- int UNICODE_WHITESPACE = 55;
-
-
-/**TODO
- This violates the following specifications:
- [Unicode] , [IRI] .
-
-
- This violation has MUST force.
-
-*/
- int COMPATIBILITY_CHARACTER = 56;
-
-
-/**A component that is required by the scheme is missing.
- This does not violate any of the supported IRI, URI or scheme specifications.
-
- This violation has MUST force.
-
-*/
- int REQUIRED_COMPONENT_MISSING = 57;
-
-
-/**A component that is prohibited by the scheme is present.
- This does not violate any of the supported IRI, URI or scheme specifications.
-
- This violation has MUST force.
-
-*/
- int PROHIBITED_COMPONENT_PRESENT = 58;
-
-
-/**Some part of the scheme specific syntax requires lowercase.
- This does not violate any of the supported IRI, URI or scheme specifications.
-
- This violation has MUST force.
-
-*/
- int SCHEME_REQUIRES_LOWERCASE = 59;
-
-
-/**Some part of the scheme specific syntax prefers lowercase.
- This does not violate any of the supported IRI, URI or scheme specifications.
-
- This violation relates to creating your own IRIs, rather than
- accepting and processing other peoples', and the behaviour of a factory
- implementing the relevant specs can be modified by
- {@link IRIFactory#mintingViolation}.
-
-
-*/
- int SCHEME_PREFERS_LOWERCASE = 60;
-
-
-/**The scheme specific syntax rules are violated.
- This does not violate any of the supported IRI, URI or scheme specifications.
-
- This violation has MUST force.
-
-*/
- int SCHEME_PATTERN_MATCH_FAILED = 61;
-
-
-/**
- // TODO complete entry for QUERY_IN_LEGACY_SCHEME
-*/
- int QUERY_IN_LEGACY_SCHEME = 62;
-
-
+
+ /**
+ * This class is not part of the API.
+ */
+ class Initialize implements IRIComponents, Force {
+ static {
+
+ Specification spec;
+
+ spec = new Specification(
+ "RDF",
+ "iri",
+ "",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref",
+ "Resource Description Framework (RDF): Concepts and Abstract Syntax",
+ "RDF URI References",
+
+ new String[] {
+
+ "foo/bar",
+
+ "#frag",
+
+ "//example.org/foo/bar#frag",
+
+ },
+
+ new String[] {
+
+ });
+
+ spec.require(IRIComponents.SCHEME);
+
+ spec = new Specification("URI", "iri", "3986",
+ "http://www.apps.ietf.org/rfc/rfc3986.html",
+ "Uniform Resource Identifier (URI): Generic Syntax", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new Specification("Unicode", "iri", "",
+ "http://www.unicode.org/", "Unicode", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new Specification("IRI", "iri", "3987",
+ "http://www.apps.ietf.org/rfc/rfc3987.html",
+ "Internationalized Resource Identifiers (IRIs)", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new Specification("XML", "iri", "",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid",
+ "Extensible Markup Language (XML) 1.0 (Third Edition)",
+ "system identifier",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec.prohibit(IRIComponents.FRAGMENT);
+
+ spec = new Specification(
+ "XLink",
+ "iri",
+ "",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators",
+ "XML Linking Language (XLink) Version 1.0",
+ "Locator Attribute (href)",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new Specification(
+ "Schema",
+ "iri",
+ "",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI",
+ "XML Schema Part 2: Datatypes Second Edition", "anyURI",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new Specification("URL_Registratrion", "other", "2717",
+ "http://www.apps.ietf.org/rfc/rfc2717.html",
+ "Registration Procedures for URL Scheme Names", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("http", "2616",
+ "http://www.apps.ietf.org/rfc/rfc2616.html",
+ "Hypertext Transfer Protocol -- HTTP/1.1", "",
+
+ new String[] {
+
+ "http://www.example.org:80/foo/bar",
+
+ "http:foo/bar",
+
+ "http://user@www.example.org/foo/bar",
+
+ },
+
+ new String[] {
+
+ "http://www.example.org/foo/bar",
+
+ });
+
+ spec.addDefinition(
+ "http://www.apps.ietf.org/rfc/rfc2616.html#sec-3.2.2",
+ ""
+ + "\n"
+ + "http_URL = \"http:\" \"//\" host [ \":\" port ] [ abs_path [ \"?\" query ]]\n"
+ + "",
+ ""
+ + "\n"
+ + "http_URL = \"http:\" \"//\" host [ \":\" port ] [ abs_path [ \"?\" query ]]\n"
+ + " " + "");
+
+ spec.setDNS(true);
+
+ spec.port(80);
+
+ spec.prohibit(IRIComponents.USER);
+
+ spec.require(IRIComponents.HOST);
+
+ spec = new SchemeSpecification("https", "2818",
+ "http://www.apps.ietf.org/rfc/rfc2818.html",
+ "Hypertext Transfer Protocol Secure", "",
+
+ new String[] {
+
+ "https://www.example.org:443/foo/bar",
+
+ "https:foo/bar",
+
+ "https://user@www.example.org/foo/bar",
+
+ },
+
+ new String[] {
+
+ "https://www.example.org/foo/bar",
+
+ });
+
+ spec.addDefinition(
+ "http://www.apps.ietf.org/rfc/rfc2818.html#sec-2.4",
+ "HTTP/TLS is differentiated from HTTP URIs by using the 'https' protocol identifier in place of the 'http' protocol identifier.",
+ "HTTP/TLS is differentiated from HTTP URIs by using the 'https' protocol identifier in place of the 'http' protocol identifier.");
+
+ spec.addDefinition(
+ "http://www.apps.ietf.org/rfc/rfc2818.html#sec-3.2.2",
+ ""
+ + "\n"
+ + "http_URL = \"http:\" \"//\" host [ \":\" port ] [ abs_path [ \"?\" query ]]\n"
+ + "",
+ ""
+ + "
\n"
+ + "http_URL = \"http:\" \"//\" host [ \":\" port ] [ abs_path [ \"?\" query ]]\n"
+ + " " + "");
+
+ spec.setDNS(true);
+
+ spec.port(443);
+
+ spec.prohibit(IRIComponents.USER);
+
+ spec.require(IRIComponents.HOST);
+
+ spec = new SchemeSpecification("ftp", "1738",
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-3.2",
+ "File Transfer Protocol", "3.2",
+
+ new String[] {
+
+ "ftp:///foo/bar",
+
+ "ftp://user@example.org/foo/bar;type=z",
+
+ "ftp://user@example.org/foo/b;ar;type=d",
+
+ },
+
+ new String[] {
+
+ "ftp://user@example.org/foo/bar;type=d",
+
+ });
+
+ spec.addDefinition(
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
+ ""
+ + "\n"
+ + "ftpurl = \"ftp://\" login [ \"/\" fpath [ \";type=\" ftptype ]]\n"
+ + "fpath = fsegment *[ \"/\" fsegment ]\n"
+ + "fsegment = *[ uchar | \"?\" | \":\" | \"@\" | \"&\" | \"=\" ]\n"
+ + "ftptype = \"A\" | \"I\" | \"D\" | \"a\" | \"i\" | \"d\"\n"
+ + ""
+ + "\n"
+ + "login = [ user [ \":\" password ] \"@\" ] hostport\n"
+ + ""
+ + "\n"
+ + "safe = \"$\" | \"-\" | \"_\" | \".\" | \"+\"\n"
+ + "extra = \"!\" | \"*\" | \"'\" | \"(\" | \")\" | \",\"\n"
+ + "escape = \"%\" hex hex\n"
+ + "unreserved = alpha | digit | safe | extra\n"
+ + "uchar = unreserved | escape\n" + "",
+ ""
+ + "
\n"
+ + "ftpurl = \"ftp://\" login [ \"/\" fpath [ \";type=\" ftptype ]]\n"
+ + "fpath = fsegment *[ \"/\" fsegment ]\n"
+ + "fsegment = *[ uchar | \"?\" | \":\" | \"@\" | \"&\" | \"=\" ]\n"
+ + "ftptype = \"A\" | \"I\" | \"D\" | \"a\" | \"i\" | \"d\"\n"
+ + " "
+ + ""
+ + "
\n"
+ + "login = [ user [ \":\" password ] \"@\" ] hostport\n"
+ + " "
+ + ""
+ + "
\n"
+ + "safe = \"$\" | \"-\" | \"_\" | \".\" | \"+\"\n"
+ + "extra = \"!\" | \"*\" | \"'\" | \"(\" | \")\" | \",\"\n"
+ + "escape = \"%\" hex hex\n"
+ + "unreserved = alpha | digit | safe | extra\n"
+ + "uchar = unreserved | escape\n" + " "
+ + "");
+
+ spec.setDNS(true);
+
+ spec.port(21);
+
+ spec.require(IRIComponents.HOST);
+
+ spec.setPattern(PATHQUERY,
+ "[^;~]*(;@{mustLowerCase(type)}=@{shouldLowerCase([aid])}|)");
+
+ spec.setReserved(PATHQUERY, "~;");
+
+ spec = new SchemeSpecification("mailto", "2368",
+ "http://www.apps.ietf.org/rfc/rfc2368.html",
+ "Electronic mail address", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec.prohibit(IRIComponents.AUTHORITY);
+
+ spec = new SchemeSpecification("news", "1738",
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-3.6",
+ "USENET news", "3.6",
+
+ new String[] {
+
+ "news:arbitrary@news.exampl\u00E7.org",
+
+ "news:arbitr?ary@news.exampl\u00E7.org",
+
+ "news:///foo/bar",
+
+ "news://user@example.org/foo",
+
+ },
+
+ new String[] {
+
+ "news:*",
+
+ "news:group.it",
+
+ "news:arb?itrary@news.example.org",
+
+ "news:arbitrary@news.example.org",
+
+ });
+
+ spec.addDefinition(
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
+ ""
+ + "\n"
+ + "newsurl = \"news:\" grouppart\n"
+ + "grouppart = \"*\" | group | article\n"
+ + "group = alpha *[ alpha | digit | \"-\" | \".\" | \"+\" | \"_\" ]\n"
+ + "article = 1*[ uchar | \";\" | \"/\" | \"?\" | \":\" | \"&\" | \"=\" ] \"@\" host\n"
+ + ""
+ + "\n"
+ + "safe = \"$\" | \"-\" | \"_\" | \".\" | \"+\"\n"
+ + "extra = \"!\" | \"*\" | \"'\" | \"(\" | \")\" | \",\"\n"
+ + "escape = \"%\" hex hex\n"
+ + "unreserved = alpha | digit | safe | extra\n"
+ + "uchar = unreserved | escape\n" + "",
+ ""
+ + "
\n"
+ + "newsurl = \"news:\" grouppart\n"
+ + "grouppart = \"*\" | group | article\n"
+ + "group = alpha *[ alpha | digit | \"-\" | \".\" | \"+\" | \"_\" ]\n"
+ + "article = 1*[ uchar | \";\" | \"/\" | \"?\" | \":\" | \"&\" | \"=\" ] \"@\" host\n"
+ + " "
+ + ""
+ + "
\n"
+ + "safe = \"$\" | \"-\" | \"_\" | \".\" | \"+\"\n"
+ + "extra = \"!\" | \"*\" | \"'\" | \"(\" | \")\" | \",\"\n"
+ + "escape = \"%\" hex hex\n"
+ + "unreserved = alpha | digit | safe | extra\n"
+ + "uchar = unreserved | escape\n" + " "
+ + "");
+
+ spec.prohibit(IRIComponents.AUTHORITY);
+
+ spec.require(IRIComponents.PATH);
+
+ spec.setPattern(PATHQUERY,
+ "[^@]+@@{host}|[*]|[a-zA-Z][-a-zA-Z0-9.+_]*");
+
+ spec.setReserved(PATHQUERY, "~@");
+
+ spec = new SchemeSpecification("nntp", "1738",
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-3.7",
+ "USENET news using NNTP access", "3.7",
+
+ new String[] {
+
+ "nntp://user@example.org/foo",
+
+ "nntp:/foo",
+
+ "nntp:///foo",
+
+ "nntp://example.org/foo/4/3",
+
+ "nntp://example.org/",
+
+ "nntp://example.org/foo/",
+
+ "nntp://example.org/*",
+
+ },
+
+ new String[] {
+
+ "nntp://example.org/foo4",
+
+ "nntp://example.org/foo/4",
+
+ });
+
+ spec.addDefinition(
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
+ ""
+ + "\n"
+ + "nntpurl = \"nntp://\" hostport \"/\" group [ \"/\" digits ]\n"
+ + ""
+ + "\n"
+ + "group = alpha *[ alpha | digit | \"-\" | \".\" | \"+\" | \"_\" ]\n"
+ + "",
+ ""
+ + "
\n"
+ + "nntpurl = \"nntp://\" hostport \"/\" group [ \"/\" digits ]\n"
+ + " "
+ + ""
+ + "
\n"
+ + "group = alpha *[ alpha | digit | \"-\" | \".\" | \"+\" | \"_\" ]\n"
+ + " " + "");
+
+ spec.setDNS(true);
+
+ spec.port(119);
+
+ spec.prohibit(IRIComponents.QUERY);
+
+ spec.prohibit(IRIComponents.USER);
+
+ spec.require(IRIComponents.HOST);
+
+ spec.setPattern(PATH, "/[a-zA-Z][-a-zA-Z0-9.+_]*(/[0-9]+)?");
+
+ spec = new SchemeSpecification("telnet", "4248",
+ "http://www.ietf.org/rfc/rfc4248.txt",
+ "Reference to interactive sessions", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("wais", "4156",
+ "http://www.ietf.org/rfc/rfc4156.txt",
+ "Wide Area Information Servers", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("file", "1738",
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-3.10",
+ "Host-specific file names", "3.10",
+
+ new String[] {
+
+ "file://user@example.org/foo/bar",
+
+ "file://eg:4029/foo/bar",
+
+ "file:/foo/bar",
+
+ "file://example.org",
+
+ "file://foo/bar;t",
+
+ "file://foo/~jjc",
+
+ },
+
+ new String[] {
+
+ "file:///foo/b",
+
+ "file:///foo/b?ar/yuk",
+
+ });
+
+ spec.addDefinition(
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
+ ""
+ + "\n"
+ + "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"
+ + ""
+ + "\n"
+ + "fpath = fsegment *[ \"/\" fsegment ]\n"
+ + "fsegment = *[ uchar | \"?\" | \":\" | \"@\" | \"&\" | \"=\" ]\n"
+ + ""
+ + "\n"
+ + "safe = \"$\" | \"-\" | \"_\" | \".\" | \"+\"\n"
+ + "extra = \"!\" | \"*\" | \"'\" | \"(\" | \")\" | \",\"\n"
+ + "escape = \"%\" hex hex\n"
+ + "unreserved = alpha | digit | safe | extra\n"
+ + "uchar = unreserved | escape\n" + "",
+ ""
+ + "
\n"
+ + "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"
+ + " "
+ + ""
+ + "
\n"
+ + "fpath = fsegment *[ \"/\" fsegment ]\n"
+ + "fsegment = *[ uchar | \"?\" | \":\" | \"@\" | \"&\" | \"=\" ]\n"
+ + " "
+ + ""
+ + "
\n"
+ + "safe = \"$\" | \"-\" | \"_\" | \".\" | \"+\"\n"
+ + "extra = \"!\" | \"*\" | \"'\" | \"(\" | \")\" | \",\"\n"
+ + "escape = \"%\" hex hex\n"
+ + "unreserved = alpha | digit | safe | extra\n"
+ + "uchar = unreserved | escape\n" + " "
+ + "");
+
+ spec.setDNS(true);
+
+ spec.prohibit(IRIComponents.USER);
+
+ spec.prohibit(IRIComponents.PORT);
+
+ spec.require(IRIComponents.PATH);
+
+ spec.require(IRIComponents.AUTHORITY);
+
+ spec.setPattern(PATHQUERY, "[^;~]*");
+
+ spec.setReserved(PATHQUERY, "~;");
+
+ spec = new SchemeSpecification("prospero", "4157",
+ "http://www.ietf.org/rfc/rfc4157.txt",
+ "Prospero Directory Service", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("gopher", "4266",
+ "http://www.ietf.org/rfc/rfc4266.txt",
+ "The gopher URI scheme", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("z39.50s", "2056",
+ "http://www.apps.ietf.org/rfc/rfc2056.html",
+ "Z39.50 Session", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("z39.50r", "2056",
+ "http://www.apps.ietf.org/rfc/rfc2056.html",
+ "Z39.50 Retrieval", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("cid", "2392",
+ "http://www.apps.ietf.org/rfc/rfc2392.html",
+ "content identifier", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("mid", "2392",
+ "http://www.apps.ietf.org/rfc/rfc2392.html",
+ "message identifier", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("vemmi", "2122",
+ "http://www.apps.ietf.org/rfc/rfc2122.html",
+ "versatile multimedia interface", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("service", "2609",
+ "http://www.apps.ietf.org/rfc/rfc2609.html",
+ "service location", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("imap", "2192",
+ "http://www.apps.ietf.org/rfc/rfc2192.html",
+ "internet message access protocol", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("nfs", "2224",
+ "http://www.apps.ietf.org/rfc/rfc2224.html",
+ "network file system protocol", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("acap", "2244",
+ "http://www.apps.ietf.org/rfc/rfc2244.html",
+ "application configuration access protocol", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("rtsp", "2326",
+ "http://www.apps.ietf.org/rfc/rfc2326.html",
+ "real time streaming protocol", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("tip", "2371",
+ "http://www.apps.ietf.org/rfc/rfc2371.html",
+ "Transaction Internet Protocol", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("pop", "2384",
+ "http://www.apps.ietf.org/rfc/rfc2384.html",
+ "Post Office Protocol v3", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("data", "2397",
+ "http://www.apps.ietf.org/rfc/rfc2397.html", "data", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("dav", "2518",
+ "http://www.apps.ietf.org/rfc/rfc2518.html", "dav", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("opaquelocktoken", "2518",
+ "http://www.apps.ietf.org/rfc/rfc2518.html",
+ "opaquelocktoken", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("sip", "3261",
+ "http://www.apps.ietf.org/rfc/rfc3261.html",
+ "session initiation protocol", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("sips", "3261",
+ "http://www.apps.ietf.org/rfc/rfc3261.html",
+ "secure session intitiaion protocol", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("tel", "2806",
+ "http://www.apps.ietf.org/rfc/rfc2806.html", "telephone",
+ "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("fax", "2806",
+ "http://www.apps.ietf.org/rfc/rfc2806.html", "fax", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("modem", "2806",
+ "http://www.apps.ietf.org/rfc/rfc2806.html", "modem", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("soap.beep", "3288",
+ "http://www.apps.ietf.org/rfc/rfc3288.html", "soap.beep",
+ "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("soap.beeps", "3288",
+ "http://www.apps.ietf.org/rfc/rfc3288.html", "soap.beeps",
+ "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("xmlrpc.beep", "3529",
+ "http://www.apps.ietf.org/rfc/rfc3529.html", "xmlrpc.beep",
+ "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("xmlrpc.beeps", "3529",
+ "http://www.apps.ietf.org/rfc/rfc3529.html",
+ "xmlrpc.beeps", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("urn", "2141",
+ "http://www.apps.ietf.org/rfc/rfc2141.html",
+ "Uniform Resource Names", "",
+
+ new String[] {
+
+ "urn:x-hp:foo/bar",
+
+ "urn:urn:foo",
+
+ "urn://foo",
+
+ "urn:foo:bar?query",
+
+ "urn:foo:ff~",
+
+ },
+
+ new String[] {
+
+ "urn:x-hp:foo\u00E9",
+
+ "urn:urn-1:foo",
+
+ });
+
+ spec.addDefinition(
+ "http://www.apps.ietf.org/rfc/rfc2141.html#sec-2",
+ "All URNs have the following syntax (phrases enclosed in quotes are REQUIRED):"
+ + "\n" + " ::= \"urn:\" \":\" \n"
+ + "",
+ "All URNs have the following syntax (phrases enclosed in quotes are REQUIRED):"
+ + "
\n"
+ + "<URN> ::= \"urn:\" <NID> \":\" <NSS>\n"
+ + " " + "");
+
+ spec.addDefinition(
+ "http://www.apps.ietf.org/rfc/rfc2141.html#sec-2.1",
+ ""
+ + "\n"
+ + " ::= [ 1,31 ]\n"
+ + "\n"
+ + " ::= | | | \"-\"\n"
+ + "\n"
+ + " ::= | | \n"
+ + "",
+ ""
+ + "
\n"
+ + "<NID> ::= <let-num> [ 1,31<let-num-hyp> ]\n"
+ + "\n"
+ + "<let-num-hyp> ::= <upper> | <lower> | <number> | \"-\"\n"
+ + "\n"
+ + "<let-num> ::= <upper> | <lower> | <number>\n"
+ + " " + "");
+
+ spec.addDefinition(
+ "http://www.apps.ietf.org/rfc/rfc2141.html#sec-2.2",
+ ""
+ + "\n"
+ + " ::= 1*\n"
+ + "\n"
+ + " ::= | \"%\" \n"
+ + "\n"
+ + " ::= | | | | \n"
+ + "\n"
+ + " ::= \"(\" | \")\" | \"+\" | \",\" | \"-\" | \".\" |\n"
+ + " \":\" | \"=\" | \"@\" | \";\" | \"$\" |\n"
+ + " \"_\" | \"!\" | \"*\" | \"'\"\n"
+ + "",
+ ""
+ + "
\n"
+ + "<NSS> ::= 1*<URN chars>\n"
+ + "\n"
+ + "<URN chars> ::= <trans> | \"%\" <hex> <hex>\n"
+ + "\n"
+ + "<trans> ::= <upper> | <lower> | <number> | <other> | <reserved>\n"
+ + "\n"
+ + "<other> ::= \"(\" | \")\" | \"+\" | \",\" | \"-\" | \".\" |\n"
+ + " \":\" | \"=\" | \"@\" | \";\" | \"$\" |\n"
+ + " \"_\" | \"!\" | \"*\" | \"'\"\n"
+ + " " + "");
+
+ spec.addDefinition(
+ "http://www.apps.ietf.org/rfc/rfc2141.html#sec-2.3.2",
+ "RFC 1630 [2] reserves the characters \"/\", \"?\", and \"#\" for particular purposes. The URN-WG has not yet debated the applicability and precise semantics of those purposes as applied to URNs. Therefore, these characters are RESERVED for future developments. Namespace developers SHOULD NOT use these characters in unencoded form, but rather use the appropriate %-encoding for each character.",
+ "RFC 1630 [2] reserves the characters \"/\", \"?\", and \"#\" for particular purposes. The URN-WG has not yet debated the applicability and precise semantics of those purposes as applied to URNs. Therefore, these characters are RESERVED for future developments. Namespace developers SHOULD NOT use these characters in unencoded form, but rather use the appropriate %-encoding for each character.");
+
+ spec.prohibit(IRIComponents.AUTHORITY);
+
+ spec.prohibit(IRIComponents.QUERY);
+
+ spec.require(IRIComponents.PATH);
+
+ spec.setPattern(PATH,
+ "(?![uU][rR][nN]:)[a-zA-Z0-9][-a-zA-Z0-9]{1,31}:[^/~]+");
+
+ spec.setReserved(PATH, "/~");
+
+ spec = new SchemeSpecification("go", "3368",
+ "http://www.apps.ietf.org/rfc/rfc3368.html", "go", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("h323", "3508",
+ "http://www.apps.ietf.org/rfc/rfc3508.html", "H.323", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("ipp", "3510",
+ "http://www.apps.ietf.org/rfc/rfc3510.html",
+ "Internet Printing Protocol", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("tftp", "3617",
+ "http://www.apps.ietf.org/rfc/rfc3617.html",
+ "Trivial File Transfer Protocol", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("mupdate", "3656",
+ "http://www.apps.ietf.org/rfc/rfc3656.html",
+ "Mailbox Update (MUPDATE) Protocol", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("pres", "3859",
+ "http://www.apps.ietf.org/rfc/rfc3859.html", "Presence",
+ "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("im", "3860",
+ "http://www.apps.ietf.org/rfc/rfc3860.html",
+ "Instant Messaging", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("mtqp", "3887",
+ "http://www.apps.ietf.org/rfc/rfc3887.html",
+ "Message Tracking Query Protocol", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("iris.beep", "3983",
+ "http://www.apps.ietf.org/rfc/rfc3983.html", "iris.beep",
+ "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("dict", "2229",
+ "http://www.apps.ietf.org/rfc/rfc2229.html",
+ "dictionary service protocol", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("snmp", "4088",
+ "http://www.ietf.org/rfc/rfc4088.txt",
+ "Simple Network Management Protocol", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("crid", "4078",
+ "http://www.ietf.org/rfc/rfc4078.txt",
+ "TV-Anytime Content Reference Identifier", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("tag", "4151",
+ "http://www.ietf.org/rfc/rfc4151.txt", "tag", "",
+
+ new String[] {
+
+ }, new String[] { });
+
+ spec = new SchemeSpecification("afs", "",
+ "http://www.iana.org/assignments/uri-schemes",
+ "Andrew File System global file names", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("tn3270", "",
+ "http://www.iana.org/assignments/uri-schemes",
+ "Interactive 3270 emulation sessions", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("mailserver", "",
+ "http://www.iana.org/assignments/uri-schemes",
+ "Access to data available from mail servers", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("dns", "",
+ "http://www.iana.org/assignments/uri-schemes",
+ "Domain Name System", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("info", "",
+ "http://www.iana.org/assignments/uri-schemes",
+ "Information Assets with Identifiers in Public Namespaces",
+ "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ spec = new SchemeSpecification("ldap", "",
+ "http://www.iana.org/assignments/uri-schemes",
+ "Lightweight Directory Access Protocol", "",
+
+ new String[] {
+
+ },
+
+ new String[] {
+
+ });
+
+ new ViolationCodeInfo(
+ ILLEGAL_CHARACTER,
+ "ILLEGAL_CHARACTER",
+ "The character violates the grammar rules for URIs/IRIs.",
+ "
The character violates the grammar rules for URIs/IRIs.
",
+ 0,
+ new InSpec[] {
+
+ new FromAlso("URI",
+ "http://www.apps.ietf.org/rfc/rfc3986.html#page-49"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html#sec-2.2"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "ht$tp://example.org/foo",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ PERCENT_ENCODING_SHOULD_BE_UPPERCASE,
+ "PERCENT_ENCODING_SHOULD_BE_UPPERCASE",
+ "Percent-escape sequences should use uppercase.",
+ "Percent-escape sequences should use uppercase.
",
+ 0 | Force.minting,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-2.1",
+ "URI producers and normalizers should use *uppercase* hexadecimal digits for all percent-encodings.",
+ "URI producers and normalizers should use"
+ + " uppercase "
+ + "hexadecimal digits for all percent-encodings.
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"), },
+ new String[] { "http://example.org/foo%c3%80", },
+ new String[] {}, false);
+
+ new ViolationCodeInfo(
+ SUPERFLUOUS_NON_ASCII_PERCENT_ENCODING,
+ "SUPERFLUOUS_NON_ASCII_PERCENT_ENCODING",
+ "Percent-escape sequences should not be used unnecessarily.",
+ "Percent-escape sequences should not be used unnecessarily.
",
+ 0 | Force.minting,
+ new InSpec[] { new FromSpec_iri(
+ "IRI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3987.html#sec-3.2",
+ "URI-to-IRI conversion removes percent-encodings",
+ "URI-to-IRI conversion removes percent-encodings
"), },
+ new String[] { "http://example.org/foo%C3%A9r", },
+ new String[] {}, true);
+
+ new ViolationCodeInfo(
+ SUPERFLUOUS_ASCII_PERCENT_ENCODING,
+ "SUPERFLUOUS_ASCII_PERCENT_ENCODING",
+ "Percent-escape sequences should not be used unnecessarily.",
+ "Percent-escape sequences should not be used unnecessarily.
",
+ 0 | Force.minting,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-2.3",
+ "For consistency, percent-encoded octets in the ranges of ALPHA (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should not be created by URI producers",
+ "For consistency, percent-encoded octets in the ranges of ALPHA (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should not be created by URI producers
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "http://example.org/foo%5Fb%61r",
+
+ },
+
+ new String[] {
+
+ }, true);
+
+ new ViolationCodeInfo(
+ UNWISE_CHARACTER,
+ "UNWISE_CHARACTER",
+ "The character matches no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, XML system identifiers, and XML Schema anyURIs.",
+ "The character matches no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, XML system identifiers, and XML Schema anyURIs.
",
+ 0 | Force.minting,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "IRI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3987.html#page-13",
+ "Systems accepting IRIs MAY also deal with the printable characters in US-ASCII that are not allowed in URIs, namely \"<\", \">\", '\"', space, \"{\", \"}\", \"|\", \"\\\", \"^\", and \"`\", in step 2 above. If these characters are found but are not converted, then the conversion SHOULD fail.",
+ "Systems accepting IRIs MAY also deal with the printable characters in US-ASCII that are not allowed in URIs, namely \"<\", \">\", '\"', space, \"{\", \"}\", \"|\", \"\\\", \"^\", and \"`\", in step 2 above. If these characters are found but are not converted, then the conversion SHOULD fail.
"),
+
+ new FromAlso("URI",
+ "http://www.apps.ietf.org/rfc/rfc3986.html#page-49"),
+
+ }, new String[] {
+
+ "http://example.org/fo|o",
+
+ "http://example.org/foo",
+
+ "http://example.org/fo\"o",
+
+ "http://example.org/fo`o",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ CONTROL_CHARACTER,
+ "CONTROL_CHARACTER",
+ "Control characters are not allowed in URIs or RDF URI References.",
+ "Control characters are not allowed in URIs or RDF URI References.
",
+ 0,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "RDF",
+ -1,
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref",
+ "A URI reference within an RDF graph (an RDF URI reference) is a Unicode string [UNICODE] that: (0)does not contain any control characters ( #x00 - #x1F, #x7F-#x9F) ",
+ "A URI reference within an RDF graph (an RDF URI reference) is a Unicode string [UNICODE] that:"
+ + "
"
+ + " does not contain any control characters ( #x00 - #x1F, #x7F-#x9F) "
+ + " " + "
"),
+
+ new FromSpec_iri(
+ "IRI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3987.html",
+ ""
+ + "\n"
+ + "ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF\n"
+ + " / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD\n"
+ + " / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD\n"
+ + " / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD\n"
+ + " / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD\n"
+ + " / %xD0000-DFFFD / %xE1000-EFFFD\n"
+ + "",
+ ""
+ + "
\n"
+ + "ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF\n"
+ + " / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD\n"
+ + " / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD\n"
+ + " / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD\n"
+ + " / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD\n"
+ + " / %xD0000-DFFFD / %xE1000-EFFFD\n"
+ + " " + "
"),
+
+ new FromAlso("URI",
+ "http://www.apps.ietf.org/rfc/rfc3986.html"),
+
+ }, new String[] {
+
+ "http://example.org/fo\u007Fo",
+
+ "http://example.org/fo\u0085o",
+
+ "http://example.org/fo\u0009o",
+
+ "http://example.org/fo\u0001o",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ NON_XML_CHARACTER,
+ "NON_XML_CHARACTER",
+ "The character is not legal in XML.",
+ "The character is not legal in XML.
",
+ 0,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "XML",
+ -1,
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#NT-Char",
+ "Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]",
+ "Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]
"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "http://example.org/foo\u0001",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ DISCOURAGED_XML_CHARACTER,
+ "DISCOURAGED_XML_CHARACTER",
+ "The character is discouraged in XML documents.",
+ "The character is discouraged in XML documents.
",
+ 0 | Force.minting,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "XML",
+ -1,
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#char32",
+ "Document authors are encouraged to avoid \"compatibility characters\", as defined in section 6.8 of [Unicode] (see also D21 in section 3.6 of [Unicode3]). The characters defined in the following ranges are also discouraged. They are either control characters or permanently undefined Unicode characters: [#x7F-#x84], [#x86-#x9F], [#xFDD0-#xFDDF],",
+ "Document authors are encouraged to avoid \"compatibility characters\", as defined in section 6.8 of [Unicode] (see also D21 in section 3.6 of [Unicode3]). The characters defined in the following ranges are also discouraged. They are either control characters or permanently undefined Unicode characters: [#x7F-#x84], [#x86-#x9F], [#xFDD0-#xFDDF],
"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "http://example.org/foo\u0080",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ NON_INITIAL_DOT_SEGMENT,
+ "NON_INITIAL_DOT_SEGMENT",
+ "The path contains a segment /../ not at the beginning of a relative reference, or it contains a /./ These should be removed.",
+ "The path contains a segment /../ not at the beginning of a relative reference, or it contains a /./ These should be removed.
",
+ 0 | Force.minting | Force.security,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-6.2.2.3",
+ "The complete path segments \".\" and \"..\" are intended *only* for use within relative references",
+ "The complete path segments \".\" and \"..\" are intended"
+ + " only "
+ + "for use within relative references
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "http://example.org/../foo",
+
+ "http://example.org/foo/../foo",
+
+ "http://example.org/foo/..",
+
+ "http://example.org/foo/./foo",
+
+ "http://example.org/./foo",
+
+ "http://example.org/foo/.",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ EMPTY_SCHEME,
+ "EMPTY_SCHEME",
+ "The scheme component is empty.",
+ "The scheme component is empty.
",
+ 0,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.1",
+ "Scheme names consist of a sequence of characters *beginning with a letter* and followed by any combination of letters, digits, plus (\"+\"), period (\".\"), or hyphen (\"-\").",
+ "Scheme names consist of a sequence of characters"
+ + " beginning with a letter "
+ + "and followed by any combination of letters, digits, plus (\"+\"), period (\".\"), or hyphen (\"-\").
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "://example.org/foo",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ SCHEME_MUST_START_WITH_LETTER,
+ "SCHEME_MUST_START_WITH_LETTER",
+ "The scheme component must start with a letter.",
+ "The scheme component must start with a letter.
",
+ 0,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.1",
+ "Scheme names consist of a sequence of characters *beginning with a letter* and followed by any combination of letters, digits, plus (\"+\"), period (\".\"), or hyphen (\"-\").",
+ "Scheme names consist of a sequence of characters"
+ + " beginning with a letter "
+ + "and followed by any combination of letters, digits, plus (\"+\"), period (\".\"), or hyphen (\"-\").
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "007://example.org/foo",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ LOWERCASE_PREFERRED,
+ "LOWERCASE_PREFERRED",
+ "lowercase is preferred in this component",
+ "lowercase is preferred in this component
",
+ 0 | Force.minting,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ SCHEME,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.1",
+ "An implementation should accept uppercase letters as equivalent to lowercase in scheme names (e.g., allow \"HTTP\" as well as \"http\") for the sake of robustness but should only produce lowercase scheme names for consistency.",
+ "An implementation should accept uppercase letters as equivalent to lowercase in scheme names (e.g., allow \"HTTP\" as well as \"http\") for the sake of robustness but should only produce lowercase scheme names for consistency.
"),
+
+ new FromSpec_iri(
+ "URI",
+ HOST,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
+ "Although host is case-insensitive, producers and normalizers should use *lowercase for registered names* and hexadecimal addresses for the sake of uniformity, while only using uppercase letters for percent-encodings.",
+ "Although host is case-insensitive, producers and normalizers should use"
+ + " lowercase for registered names "
+ + "and hexadecimal addresses for the sake of uniformity, while only using uppercase letters for percent-encodings.
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "HTTP://example.org/foo",
+
+ "http://eXamPle.org/foo",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ PORT_SHOULD_NOT_BE_EMPTY,
+ "PORT_SHOULD_NOT_BE_EMPTY",
+ "The colon introducing an empty port component should be omitted entirely, or a port number should be specified.",
+ "The colon introducing an empty port component should be omitted entirely, or a port number should be specified.
",
+ 0 | Force.minting,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
+ "URI producers and normalizers should omit the port component *and its \":\" delimiter* if port is empty",
+ "URI producers and normalizers should omit the port component"
+ + " and its \":\" delimiter "
+ + "if port is empty
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "http://example.org:/foo",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ DEFAULT_PORT_SHOULD_BE_OMITTED,
+ "DEFAULT_PORT_SHOULD_BE_OMITTED",
+ "If the port is the default one for the scheme it should be omitted.",
+ "If the port is the default one for the scheme it should be omitted.
",
+ 0 | Force.minting,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
+ "URI producers and normalizers should omit the port component and its \":\" delimiter if port is empty or if its value would be the *same as that of the scheme's default.* ",
+ "URI producers and normalizers should omit the port component and its \":\" delimiter if port is empty or if its value would be the"
+ + " same as that of the scheme's default. "
+ + "
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "http://example.org:80/foo",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ PORT_SHOULD_NOT_BE_WELL_KNOWN,
+ "PORT_SHOULD_NOT_BE_WELL_KNOWN",
+ "Ports under 1024 should be accessed using the appropriate scheme name.",
+ "Ports under 1024 should be accessed using the appropriate scheme name.
",
+ 0 | Force.security,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-7.2",
+ "Applications should prevent dereference of a URI that specifies a TCP port number within the \"well-known port\" range *(0 - 1023)* unless the protocol being used to dereference that URI is compatible with the protocol expected on that well-known port.",
+ "Applications should prevent dereference of a URI that specifies a TCP port number within the \"well-known port\" range"
+ + " (0 - 1023) "
+ + "unless the protocol being used to dereference that URI is compatible with the protocol expected on that well-known port.
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "http://example.org:180/foo",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ PORT_SHOULD_NOT_START_IN_ZERO,
+ "PORT_SHOULD_NOT_START_IN_ZERO",
+ "Leading zeros in the port number should be omitted. This is an added feature of this implementation, not mandated by any standard.",
+ "Leading zeros in the port number should be omitted. This is an added feature of this implementation, not mandated by any standard.
",
+ 0 | Force.minting,
+ new InSpec[] {
+
+ new FromAlso("URI",
+ "http://www.apps.ietf.org/rfc/rfc3986.html"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "http://example.org:08080/foo",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ BIDI_FORMATTING_CHARACTER,
+ "BIDI_FORMATTING_CHARACTER",
+ "A prohibited bi-directional control character was found.",
+ "A prohibited bi-directional control character was found.
",
+ 0,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "IRI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3987.html#sec-4.1",
+ "IRIs MUST NOT contain bidirectional formatting characters (LRM, RLM, LRE, RLE, LRO, RLO, and PDF).",
+ "IRIs MUST NOT contain bidirectional formatting characters (LRM, RLM, LRE, RLE, LRO, RLO, and PDF).
"),
+
+ }, new String[] {
+
+ "http://example.org/Andr\u202Abar",
+
+ "http://example.org/Andr\u202Bbar",
+
+ "http://example.org/Andr\u202Cbar",
+
+ "http://example.org/Andr\u202Dbar",
+
+ "http://example.org/Andr\u202Ebar",
+
+ "http://example.org/Andr\u200Ebar",
+
+ "http://example.org/Andr\u200Fbar",
+
+ },
+
+ new String[] {
+
+ }, true);
+
+ new ViolationCodeInfo(
+ WHITESPACE,
+ "WHITESPACE",
+ "A single whitespace character. These match no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, XML system identifiers, and XML Schema anyURIs.",
+ "A single whitespace character. These match no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, XML system identifiers, and XML Schema anyURIs.
",
+ 0,
+ new InSpec[] {
+
+ new FromAlso("URI",
+ "http://www.apps.ietf.org/rfc/rfc3986.html"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ }, new String[] {
+
+ "http://example.org/ foo",
+
+ "file:///Program Files",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ DOUBLE_WHITESPACE,
+ "DOUBLE_WHITESPACE",
+ "Either two or more consecutive whitespace characters, or leading or trailing whitespace. These match no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, XML system identifiers, but not XML Schema anyURIs.",
+ "Either two or more consecutive whitespace characters, or leading or trailing whitespace. These match no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, XML system identifiers, but not XML Schema anyURIs.
",
+ 0,
+ new InSpec[] {
+
+ new FromAlso("URI",
+ "http://www.apps.ietf.org/rfc/rfc3986.html"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "http://example.org/ foo",
+
+ "file:///Program Files",
+
+ "file:///TabBar ",
+
+ " rel-with-initial-space",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ NOT_XML_SCHEMA_WHITESPACE,
+ "NOT_XML_SCHEMA_WHITESPACE",
+ "Whitespace characters match no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, and XML system identifiers. However, tab and new line characters, and consecutive space characters cannot occur in XML Schema anyURIs.",
+ "Whitespace characters match no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, and XML system identifiers. However, tab and new line characters, and consecutive space characters cannot occur in XML Schema anyURIs.
",
+ 0,
+ new InSpec[] {
+
+ new FromAlso("URI",
+ "http://www.apps.ietf.org/rfc/rfc3986.html"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromSpec_iri(
+ "Schema",
+ -1,
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#schema",
+ ""
+ + "\n"
+ + "\n"
+ + " [...]\n"
+ + " \n"
+ + " \n"
+ + "\n" + " \n"
+ + " \n" + "",
+ ""
+ + "
\n"
+ + "<xs:simpleType name=\"anyURI\" id=\"anyURI\">\n"
+ + " [...]\n"
+ + " <xs:restriction base=\"xs:anySimpleType\">\n"
+ + " <xs:whiteSpace fixed=\"true\" value=\"collapse\" id=\"anyURI.whiteSpace\"/>\n"
+ + "\n"
+ + " </xs:restriction>\n"
+ + "</xs:simpleType>\n"
+ + " " + "
"),
+
+ }, new String[] {
+
+ "file:///Tab\u0009Bar",
+
+ "file:///Tab\nBar",
+
+ "file:///Tab\rBar",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(DOUBLE_DASH_IN_REG_NAME,
+ "DOUBLE_DASH_IN_REG_NAME", new String[] {
+
+ "http://foo--bar//",
+
+ }, new String[] {
+
+ }, true);
+
+ new ViolationCodeInfo(SCHEME_INCLUDES_DASH, "SCHEME_INCLUDES_DASH",
+ new String[] {
+
+ "ht-tp://foo.bar//",
+
+ "-http://foo.bar//",
+
+ "http-://foo.bar//",
+
+ }, new String[] {
+
+ }, true);
+
+ new ViolationCodeInfo(NON_URI_CHARACTER, "NON_URI_CHARACTER",
+ new String[] {
+
+ "http://foo-bar//̳a",
+
+ "http://foo-b̳ar//",
+
+ }, new String[] {
+
+ }, true);
+
+ new ViolationCodeInfo(PERCENT_20, "PERCENT_20", new String[] {
+
+ "http://foo-bar//%20a",
+
+ }, new String[] {
+
+ }, true);
+
+ new ViolationCodeInfo(PERCENT, "PERCENT", new String[] {
+
+ "http://foo-bar//%AAa",
+
+ }, new String[] {
+
+ }, true);
+
+ new ViolationCodeInfo(
+ IP_V6_OR_FUTURE_ADDRESS_SYNTAX,
+ "IP_V6_OR_FUTURE_ADDRESS_SYNTAX",
+ "A syntax violation was detected in an IP V6 (or future) address.",
+ "A syntax violation was detected in an IP V6 (or future) address.
",
+ 0,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
+ ""
+ + "\n"
+ + "IP-literal = \"[\" ( IPv6address / IPvFuture ) \"]\"\n"
+ + "IPvFuture = \"v\" 1*HEXDIG \".\" 1*( unreserved / sub-delims / \":\" )\n"
+ + "IPv6address = 6( h16 \":\" ) ls32\n"
+ + " / \"::\" 5( h16 \":\" ) ls32\n"
+ + " / [ h16 ] \"::\" 4( h16 \":\" ) ls32\n"
+ + " / [ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n"
+ + " / [ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n"
+ + " / [ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n"
+ + " / [ *4( h16 \":\" ) h16 ] \"::\" ls32\n"
+ + " / [ *5( h16 \":\" ) h16 ] \"::\" h16\n"
+ + " / [ *6( h16 \":\" ) h16 ] \"::\"\n"
+ + "\n"
+ + "ls32 = ( h16 \":\" h16 ) / IPv4address\n"
+ + " ; least-significant 32 bits of address\n"
+ + "h16 = 1*4HEXDIG \n"
+ + " ; 16 bits of address represented in hexadecimal\n"
+ + "",
+ ""
+ + "
\n"
+ + "IP-literal = \"[\" ( IPv6address / IPvFuture ) \"]\"\n"
+ + "IPvFuture = \"v\" 1*HEXDIG \".\" 1*( unreserved / sub-delims / \":\" )\n"
+ + "IPv6address = 6( h16 \":\" ) ls32\n"
+ + " / \"::\" 5( h16 \":\" ) ls32\n"
+ + " / [ h16 ] \"::\" 4( h16 \":\" ) ls32\n"
+ + " / [ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n"
+ + " / [ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n"
+ + " / [ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n"
+ + " / [ *4( h16 \":\" ) h16 ] \"::\" ls32\n"
+ + " / [ *5( h16 \":\" ) h16 ] \"::\" h16\n"
+ + " / [ *6( h16 \":\" ) h16 ] \"::\"\n"
+ + "\n"
+ + "ls32 = ( h16 \":\" h16 ) / IPv4address\n"
+ + " ; least-significant 32 bits of address\n"
+ + "h16 = 1*4HEXDIG \n"
+ + " ; 16 bits of address represented in hexadecimal\n"
+ + " " + "
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "http://[/",
+
+ "ldap://[20015:db8::7]/c=GB?objectClass?one",
+
+ "ldap://[2001:db8:::7]/c=GB?objectClass?one",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ IPv6ADDRESS_SHOULD_BE_LOWERCASE,
+ "IPv6ADDRESS_SHOULD_BE_LOWERCASE",
+ "IP version 6 addresses should use lowercase hexadecimal",
+ "IP version 6 addresses should use lowercase hexadecimal
",
+ 0 | Force.minting,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
+ "Although host is case-insensitive, producers and normalizers *should use lowercase* for registered names and *hexadecimal addresses* for the sake of uniformity",
+ "Although host is case-insensitive, producers and normalizers"
+ + " should use lowercase "
+ + "for registered names and"
+ + " hexadecimal addresses "
+ + "for the sake of uniformity
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "ldap://[2001:Db8::7]/c=GB?objectClass?one",
+
+ "ldap://[2001:dB8::7]/c=GB?objectClass?one",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ IP_V4_OCTET_RANGE,
+ "IP_V4_OCTET_RANGE",
+ "A host entry consists of four numbers, but they are not in the range 0-255, or have leading zeros.",
+ "A host entry consists of four numbers, but they are not in the range 0-255, or have leading zeros.
",
+ 0,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
+ "A host identified by an IPv4 literal address is represented in dotted-decimal notation (a sequence of *four decimal numbers* in the range *0 to 255* , separated by \".\"),",
+ "A host identified by an IPv4 literal address is represented in dotted-decimal notation (a sequence of"
+ + " four decimal numbers "
+ + "in the range"
+ + " 0 to 255 "
+ + ", separated by \".\"),
"),
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
+ ""
+ + "\n"
+ + "dec-octet = DIGIT ; 0-9\n"
+ + " / %x31-39 DIGIT ; 10-99\n"
+ + " / \"1\" 2DIGIT ; 100-199\n"
+ + " / \"2\" %x30-34 DIGIT ; 200-249\n"
+ + " / \"25\" %x30-35 ; 250-255\n"
+ + "",
+ ""
+ + "
\n"
+ + "dec-octet = DIGIT ; 0-9\n"
+ + " / %x31-39 DIGIT ; 10-99\n"
+ + " / \"1\" 2DIGIT ; 100-199\n"
+ + " / \"2\" %x30-34 DIGIT ; 200-249\n"
+ + " / \"25\" %x30-35 ; 250-255\n"
+ + " " + "
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "ldap://155.00.55.102/c=GB?objectClass?one",
+
+ "ldap://20.256.20.20/c=GB?objectClass?one",
+
+ "ldap://20.1000.20.20/c=GB?objectClass?one",
+
+ "ldap://20.010.20.20/c=GB?objectClass?one",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ NOT_DNS_NAME,
+ "NOT_DNS_NAME",
+ "The host component did not meet the restrictions on DNS names.",
+ "The host component did not meet the restrictions on DNS names.
",
+ 0 | Force.dns,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
+ "URI producers should use names that *conform to the DNS syntax* , even when use of DNS is not immediately apparent, and should limit these names to no more than 255 characters in length.",
+ "URI producers should use names that"
+ + " conform to the DNS syntax "
+ + ", even when use of DNS is not immediately apparent, and should limit these names to no more than 255 characters in length.
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "ldap://foo$/c=GB?objectClass?one",
+
+ "http://foo.example.$org/",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ USE_PUNYCODE_NOT_PERCENTS,
+ "USE_PUNYCODE_NOT_PERCENTS",
+ "The host component used percent encoding, where punycode is preferred.",
+ "The host component used percent encoding, where punycode is preferred.
",
+ 0 | Force.minting | Force.dns,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
+ "URI producers should provide these registered names in the IDNA encoding, rather than a percent-encoding, if they wish to maximize interoperability with legacy URI resolvers.",
+ "URI producers should provide these registered names in the IDNA encoding, rather than a percent-encoding, if they wish to maximize interoperability with legacy URI resolvers.
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "ftp://andr%C3%A9.example.org/",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ ILLEGAL_PERCENT_ENCODING,
+ "ILLEGAL_PERCENT_ENCODING",
+ "The host component a percent occurred without two following hexadecimal digits.",
+ "The host component a percent occurred without two following hexadecimal digits.
",
+ 0,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-2.1",
+ "A percent-encoded octet is encoded as a character triplet, consisting of the percent character \"%\" followed by the two hexadecimal digits representing that octet's numeric value.",
+ "A percent-encoded octet is encoded as a character triplet, consisting of the percent character \"%\" followed by the two hexadecimal digits representing that octet's numeric value.
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "ftp://andr%%A9.example.org/",
+
+ "ftp://andr%.example.org/",
+
+ "ftp://andre.example.org/%",
+
+ "ftp://andre.example.org/%A",
+
+ "ftp://andre.example.org/%A?",
+
+ "ftp://andre.example.org/%A#",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(ACE_PREFIX, "ACE_PREFIX", new String[] {
+
+ }, new String[] {
+
+ }, true);
+
+ new ViolationCodeInfo(
+ LONE_SURROGATE,
+ "LONE_SURROGATE",
+ "A unicode surrogate character that is not of a surrogate pair.",
+ "A unicode surrogate character that is not of a surrogate pair.
",
+ 0, new InSpec[] {
+
+ }, new String[] {
+
+ "http:/foo/p\uD800",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ DNS_LABEL_DASH_START_OR_END,
+ "DNS_LABEL_DASH_START_OR_END",
+ "A DNS name had a - at the beginning or end.",
+ "A DNS name had a - at the beginning or end.
",
+ 0 | Force.dns,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
+ "Such a name consists of a sequence of domain labels separated by \".\", each domain label starting and ending with an alphanumeric character and possibly also containing \"-\" characters.",
+ "Such a name consists of a sequence of domain labels separated by \".\", each domain label starting and ending with an alphanumeric character and possibly also containing \"-\" characters.
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "ldap://-foo/c=GB?objectClass?one",
+
+ "http://foo.example.org-/",
+
+ "http://foo.example.org--/",
+
+ "http://--foo.example.org/",
+
+ "http://-fo-o.example.org/",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ BAD_IDN_UNASSIGNED_CHARS,
+ "BAD_IDN_UNASSIGNED_CHARS",
+ "Characters used in the IRI were unassigned in the version of Unicode known by this system. They may have been assigned since.",
+ "Characters used in the IRI were unassigned in the version of Unicode known by this system. They may have been assigned since.
",
+ 0 | Force.minting,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
+ "When a non-ASCII registered name represents an internationalized domain name intended for resolution via the DNS, the name must be transformed to the IDNA encoding [RFC3490] prior to name lookup. URI producers should provide these registered names in the IDNA encoding, rather than a percent-encoding, if they wish to maximize interoperability with legacy URI resolvers.",
+ "When a non-ASCII registered name represents an internationalized domain name intended for resolution via the DNS, the name must be transformed to the IDNA encoding [RFC3490] prior to name lookup. URI producers should provide these registered names in the IDNA encoding, rather than a percent-encoding, if they wish to maximize interoperability with legacy URI resolvers.
"),
+
+ new FromSpec_iri(
+ "IRI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3987.html#sec-3.1",
+ "Replace the ireg-name part of the IRI by the part converted using the ToASCII operation specified in section 4.1 of [RFC3490] on each dot-separated label, and by using U+002E (FULL STOP) as a label separator, with the flag UseSTD3ASCIIRules set to TRUE, and with the flag AllowUnassigned set to FALSE for creating IRIs and set to TRUE otherwise.",
+ "Replace the ireg-name part of the IRI by the part converted using the ToASCII operation specified in section 4.1 of [RFC3490] on each dot-separated label, and by using U+002E (FULL STOP) as a label separator, with the flag UseSTD3ASCIIRules set to TRUE, and with the flag AllowUnassigned set to FALSE for creating IRIs and set to TRUE otherwise.
"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "http://foo.example\u0221.org/",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ BAD_IDN,
+ "BAD_IDN",
+ "The Internationalized Domain Name check failed.",
+ "The Internationalized Domain Name check failed.
",
+ 0,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.2",
+ "When a non-ASCII registered name represents an internationalized domain name intended for resolution via the DNS, the name must be transformed to the IDNA encoding [RFC3490] prior to name lookup. URI producers should provide these registered names in the IDNA encoding, rather than a percent-encoding, if they wish to maximize interoperability with legacy URI resolvers.",
+ "When a non-ASCII registered name represents an internationalized domain name intended for resolution via the DNS, the name must be transformed to the IDNA encoding [RFC3490] prior to name lookup. URI producers should provide these registered names in the IDNA encoding, rather than a percent-encoding, if they wish to maximize interoperability with legacy URI resolvers.
"),
+
+ new FromSpec_iri(
+ "IRI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3987.html#sec-3.1",
+ "Replace the ireg-name part of the IRI by the part converted using the ToASCII operation specified in section 4.1 of [RFC3490] on each dot-separated label, and by using U+002E (FULL STOP) as a label separator, with the flag UseSTD3ASCIIRules set to TRUE, and with the flag AllowUnassigned set to FALSE for creating IRIs and set to TRUE otherwise.",
+ "Replace the ireg-name part of the IRI by the part converted using the ToASCII operation specified in section 4.1 of [RFC3490] on each dot-separated label, and by using U+002E (FULL STOP) as a label separator, with the flag UseSTD3ASCIIRules set to TRUE, and with the flag AllowUnassigned set to FALSE for creating IRIs and set to TRUE otherwise.
"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ },
+ new String[] {
+
+ "http://--foo.example.org/",
+
+ "http://xn--andr--ep-.example.org/",
+
+ "http://xn.example.\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333/",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ HAS_PASSWORD,
+ "HAS_PASSWORD",
+ "Including passwords in URIs is deprecated.",
+ "Including passwords in URIs is deprecated.
",
+ 0 | Force.must | Force.security,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.1",
+ "Use of the format \"user:password\" in the userinfo field is deprecated.",
+ "Use of the format \"user:password\" in the userinfo field is deprecated.
"),
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2.1",
+ "Applications may choose to ignore or reject such data when it is received as part of a reference and should reject the storage of such data in unencrypted form. The passing of authentication information in clear text has proven to be a security risk in almost every case where it has been used.",
+ "Applications may choose to ignore or reject such data when it is received as part of a reference and should reject the storage of such data in unencrypted form. The passing of authentication information in clear text has proven to be a security risk in almost every case where it has been used.
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "http://user:pass@example.org/",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ DISCOURAGED_IRI_CHARACTER,
+ "DISCOURAGED_IRI_CHARACTER",
+ "Certain characters are discouraged in IRIs.",
+ "Certain characters are discouraged in IRIs.
",
+ 0 | Force.minting,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "IRI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3987.html#sec-6.1",
+ "The UCS contains many areas of characters for which there are strong visual look-alikes. Because of the likelihood of transcription errors, these also should be avoided. This includes the full-width equivalents of Latin characters, half-width Katakana characters for Japanese, and many others. It also includes many look-alikes of \"space\", \"delims\", and \"unwise\", characters excluded in [RFC3491].",
+ "The UCS contains many areas of characters for which there are strong visual look-alikes. Because of the likelihood of transcription errors, these also should be avoided. This includes the full-width equivalents of Latin characters, half-width Katakana characters for Japanese, and many others. It also includes many look-alikes of \"space\", \"delims\", and \"unwise\", characters excluded in [RFC3491].
"),
+
+ }, new String[] {
+
+ "http://example.org/\u2000en-quad",
+
+ "http://example.org/\u205Fmedium-mathematical-space",
+
+ "http://example\uFF95.org/",
+
+ "http://example\uFF47.org/",
+
+ },
+
+ new String[] {
+
+ }, true);
+
+ new ViolationCodeInfo(
+ BAD_BIDI_SUBCOMPONENT,
+ "BAD_BIDI_SUBCOMPONENT",
+ "There are restrictions on bidi characters in subcomponents of IRIs",
+ "There are restrictions on bidi characters in subcomponents of IRIs
",
+ 0 | Force.should,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "IRI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3987.html#sec-4.2",
+ " (0)A component SHOULD NOT use both right-to-left and left-to-right characters. (1)A component using right-to-left characters SHOULD start and end with right-to-left characters. ",
+ ""
+ + "
"
+ + " A component SHOULD NOT use both right-to-left and left-to-right characters. "
+ + ""
+ + " A component using right-to-left characters SHOULD start and end with right-to-left characters. "
+ + " " + "
"),
+
+ }, new String[] {
+
+ },
+
+ new String[] {
+
+ }, true);
+
+ new ViolationCodeInfo(DNS_LENGTH_LIMIT, "DNS_LENGTH_LIMIT",
+ new String[] {
+
+ }, new String[] { }, false);
+
+ new ViolationCodeInfo(DNS_LABEL_LENGTH_LIMIT,
+ "DNS_LABEL_LENGTH_LIMIT", new String[] {
+
+ }, new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(NOT_UTF8_ESCAPE, "NOT_UTF8_ESCAPE",
+ new String[] { }, new String[] { },
+ false);
+
+ new ViolationCodeInfo(NOT_UTF8_ESCAPE_IN_HOST,
+ "NOT_UTF8_ESCAPE_IN_HOST", new String[] {
+
+ }, new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(BAD_DOT_IN_IDN, "BAD_DOT_IN_IDN",
+ new String[] {
+ }, new String[] {
+ },
+ false);
+ new ViolationCodeInfo(
+ UNREGISTERED_IANA_SCHEME,
+ "UNREGISTERED_IANA_SCHEME",
+ "The scheme name does not have a \"-\" in it, but is not in the IANA registry. (Last updated from the registry January 2006)",
+ "The scheme name does not have a \"-\" in it, but is not in the IANA registry. (Last updated from the registry January 2006)
",
+ 0,
+ new InSpec[] {
+
+ new FromSpec_other(
+ "URL_Registratrion",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc2717.html#sec-",
+ "", "
"),
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.2",
+ "The NAMES of schemes registered in the IETF tree MUST NOT contain the dash (also known as the hyphen and minus sign) character ('-') USASCII value 2Dh. Use of this character can cause confusion with schemes registered in alternative trees (see section 3.3).",
+ "The NAMES of schemes registered in the IETF tree MUST NOT contain the dash (also known as the hyphen and minus sign) character ('-') USASCII value 2Dh. Use of this character can cause confusion with schemes registered in alternative trees (see section 3.3).
"),
+
+ new FromSpec_iri(
+ "URI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3986.html#sec-3.3",
+ "The syntax for alternative trees shall be as follows: each tree will be identified by a unique prefix, which must be established in the same fashion as a URL scheme name in the IETF tree, except that the prefix must be defined by a Standards Track document. Scheme names in the new tree are then constructed by prepending the prefix to an identifier unique to each scheme in that tree, as prescribed by that tree's identifying document:"
+ + "\n"
+ + " '-'\n"
+ + "For instance, the \"foo\" tree would allow creation of scheme names of the form: \"foo-blahblah:\" and \"foo-bar:\", where the tree prescribes an arbitrary USASCII string following the tree's unique prefix.",
+ "The syntax for alternative trees shall be as follows: each tree will be identified by a unique prefix, which must be established in the same fashion as a URL scheme name in the IETF tree, except that the prefix must be defined by a Standards Track document. Scheme names in the new tree are then constructed by prepending the prefix to an identifier unique to each scheme in that tree, as prescribed by that tree's identifying document:"
+ + "
\n"
+ + " <prefix>'-'<tree-specific identifier>\n"
+ + " "
+ + "For instance, the \"foo\" tree would allow creation of scheme names of the form: \"foo-blahblah:\" and \"foo-bar:\", where the tree prescribes an arbitrary USASCII string following the tree's unique prefix.
"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "foo://example.org/bar",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ UNREGISTERED_NONIETF_SCHEME_TREE,
+ "UNREGISTERED_NONIETF_SCHEME_TREE",
+ "The scheme name has a \"-\" in it, but it does not start in \"x-\" and the prefix is not known as the prefix of an alternative tree for URI schemes.",
+ "The scheme name has a \"-\" in it, but it does not start in \"x-\" and the prefix is not known as the prefix of an alternative tree for URI schemes.
",
+ 0,
+ new InSpec[] {
+
+ new FromSpec_other(
+ "URL_Registratrion",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc2717.html#sec-3.3",
+ "The syntax for alternative trees shall be as follows: each tree will be identified by a unique prefix, which must be established in the same fashion as a URL scheme name in the IETF tree, except that the prefix must be defined by a Standards Track document. Scheme names in the new tree are then constructed by prepending the prefix to an identifier unique to each scheme in that tree, as prescribed by that tree's identifying document:"
+ + "\n"
+ + " '-'\n"
+ + "For instance, the \"foo\" tree would allow creation of scheme names of the form: \"foo-blahblah:\" and \"foo-bar:\", where the tree prescribes an arbitrary USASCII string following the tree's unique prefix.",
+ "The syntax for alternative trees shall be as follows: each tree will be identified by a unique prefix, which must be established in the same fashion as a URL scheme name in the IETF tree, except that the prefix must be defined by a Standards Track document. Scheme names in the new tree are then constructed by prepending the prefix to an identifier unique to each scheme in that tree, as prescribed by that tree's identifying document:"
+ + "
\n"
+ + " <prefix>'-'<tree-specific identifier>\n"
+ + " "
+ + "For instance, the \"foo\" tree would allow creation of scheme names of the form: \"foo-blahblah:\" and \"foo-bar:\", where the tree prescribes an arbitrary USASCII string following the tree's unique prefix.
"),
+
+ new FromAlso("URI",
+ "http://www.apps.ietf.org/rfc/rfc3986.html"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ new FromAlso("XLink",
+ "http://www.w3.org/TR/2001/REC-xlink-20010627/#link-locators"),
+
+ new FromAlso("XML",
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid"),
+
+ new FromAlso("RDF",
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref"),
+
+ new FromAlso("Schema",
+ "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#anyURI"),
+
+ }, new String[] {
+
+ "foo-bar://example.org/bar",
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ NOT_NFC,
+ "NOT_NFC",
+ "The IRI is not in Unicode Normal Form C.",
+ "The IRI is not in Unicode Normal Form C.
",
+ 0 | Force.should,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "IRI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3987.html#sec-5.3.2.2",
+ "To avoid false negatives and problems with transcoding, IRIs SHOULD be created by using NFC.",
+ "To avoid false negatives and problems with transcoding, IRIs SHOULD be created by using NFC.
"),
+
+ }, new String[] {
+
+ "http://example.org/#Andre\u0301",
+
+ },
+
+ new String[] {
+
+ }, true);
+
+ new ViolationCodeInfo(
+ NOT_NFKC,
+ "NOT_NFKC",
+ "The IRI is not in Unicode Normal Form KC.",
+ "The IRI is not in Unicode Normal Form KC.
",
+ 0 | Force.minting,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "IRI",
+ -1,
+ "http://www.apps.ietf.org/rfc/rfc3987.html#sec-7.5",
+ "Although there may be exceptions, newly created resource names should generally be in NFKC",
+ "Although there may be exceptions, newly created resource names should generally be in NFKC
"),
+
+ }, new String[] {
+
+ "http://example.org/#Andre\u0301",
+
+ },
+
+ new String[] {
+
+ }, true);
+
+ new ViolationCodeInfo(
+ DEPRECATED_UNICODE_CHARACTER,
+ "DEPRECATED_UNICODE_CHARACTER",
+ "TODO",
+ "TODO
",
+ 0,
+ new InSpec[] {
+
+ new FromAlso("Unicode", "http://www.unicode.org/"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ }, new String[] {
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ UNDEFINED_UNICODE_CHARACTER,
+ "UNDEFINED_UNICODE_CHARACTER",
+ "TODO",
+ "TODO
",
+ 0,
+ new InSpec[] {
+
+ new FromAlso("Unicode", "http://www.unicode.org/"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ }, new String[] {
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ PRIVATE_USE_CHARACTER,
+ "PRIVATE_USE_CHARACTER",
+ "TODO",
+ "TODO
",
+ 0,
+ new InSpec[] {
+
+ new FromAlso("Unicode", "http://www.unicode.org/"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ }, new String[] {
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ UNICODE_CONTROL_CHARACTER,
+ "UNICODE_CONTROL_CHARACTER",
+ "TODO",
+ "TODO
",
+ 0,
+ new InSpec[] {
+
+ new FromAlso("Unicode", "http://www.unicode.org/"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ }, new String[] {
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ UNASSIGNED_UNICODE_CHARACTER,
+ "UNASSIGNED_UNICODE_CHARACTER",
+ "The character code is not assigned in the version of Unicode implemented here.",
+ "The character code is not assigned in the version of Unicode implemented here.
",
+ 0 | Force.minting,
+ new InSpec[] {
+
+ new FromAlso("Unicode", "http://www.unicode.org/"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ }, new String[] {
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(MAYBE_NOT_NFC, "MAYBE_NOT_NFC", new String[] {
+
+ }, new String[] {
+
+ }, true);
+
+ new ViolationCodeInfo(MAYBE_NOT_NFKC, "MAYBE_NOT_NFKC",
+ new String[] {
+
+ }, new String[] {
+
+ }, true);
+
+ new ViolationCodeInfo(
+ UNICODE_WHITESPACE,
+ "UNICODE_WHITESPACE",
+ "TODO",
+ "TODO
",
+ 0,
+ new InSpec[] {
+
+ new FromAlso("Unicode", "http://www.unicode.org/"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ }, new String[] {
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ COMPATIBILITY_CHARACTER,
+ "COMPATIBILITY_CHARACTER",
+ "Bad character",
+ "Bad character
",
+ 0,
+ new InSpec[] {
+
+ new FromAlso("Unicode", "http://www.unicode.org/"),
+
+ new FromAlso("IRI",
+ "http://www.apps.ietf.org/rfc/rfc3987.html"),
+
+ }, new String[] {
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ REQUIRED_COMPONENT_MISSING,
+ "REQUIRED_COMPONENT_MISSING",
+ "A component that is required by the scheme is missing.",
+ "A component that is required by the scheme is missing.
",
+ 0,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "RDF",
+ SCHEME,
+ "http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-Graph-URIref",
+ "representing an *absolute URI* with optional fragment identifier",
+ "representing an"
+ + " absolute URI "
+ + "with optional fragment identifier
"),
+
+ new FromSpec_scheme("http", HOST,
+ "http://www.apps.ietf.org/rfc/rfc2616.html"),
+
+ new FromSpec_scheme("https", HOST,
+ "http://www.apps.ietf.org/rfc/rfc2818.html"),
+
+ new FromSpec_scheme(
+ "ftp",
+ HOST,
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
+ ""
+ + "\n"
+ + "ftpurl = \"ftp://\" login [ \"/\" fpath [ \";type=\" ftptype ]]\n"
+ + "\n"
+ + "login = [ user [ \":\" password ] \"@\" ] hostport\n"
+ + "",
+ ""
+ + "
\n"
+ + "ftpurl = \"ftp://\" login [ \"/\" fpath [ \";type=\" ftptype ]]\n"
+ + "\n"
+ + "login = [ user [ \":\" password ] \"@\" ] hostport\n"
+ + " " + "
"),
+
+ new FromSpec_scheme(
+ "news",
+ PATH,
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
+ ""
+ + "\n"
+ + "newsurl = \"news:\" grouppart\n"
+ + "grouppart = \"*\" | group | article\n"
+ + "group = alpha *[ alpha | digit | \"-\" | \".\" | \"+\" | \"_\" ]\n"
+ + "article = 1*[ uchar | \";\" | \"/\" | \"?\" | \":\" | \"&\" | \"=\" ] \"@\" host\n"
+ + "",
+ ""
+ + "
\n"
+ + "newsurl = \"news:\" grouppart\n"
+ + "grouppart = \"*\" | group | article\n"
+ + "group = alpha *[ alpha | digit | \"-\" | \".\" | \"+\" | \"_\" ]\n"
+ + "article = 1*[ uchar | \";\" | \"/\" | \"?\" | \":\" | \"&\" | \"=\" ] \"@\" host\n"
+ + " " + "
"),
+
+ new FromSpec_scheme("nntp", HOST,
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-3.7"),
+
+ new FromSpec_scheme(
+ "file",
+ PATH,
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
+ ""
+ + "\n"
+ + "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"
+ + "",
+ ""
+ + "
\n"
+ + "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"
+ + " " + "
"),
+
+ new FromSpec_scheme(
+ "file",
+ AUTHORITY,
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
+ ""
+ + "\n"
+ + "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"
+ + "",
+ ""
+ + "
\n"
+ + "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"
+ + " " + "
"),
+
+ new FromSpec_scheme(
+ "urn",
+ PATH,
+ "http://www.apps.ietf.org/rfc/rfc2141.html#sec-2",
+ ""
+ + "\n"
+ + " ::= \"urn:\" \":\" \n"
+ + "",
+ ""
+ + "
\n"
+ + "<URN> ::= \"urn:\" <NID> \":\" <NSS>\n"
+ + " " + "
"),
+
+ }, new String[] {
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ PROHIBITED_COMPONENT_PRESENT,
+ "PROHIBITED_COMPONENT_PRESENT",
+ "A component that is prohibited by the scheme is present.",
+ "A component that is prohibited by the scheme is present.
",
+ 0,
+ new InSpec[] {
+
+ new FromSpec_iri(
+ "XML",
+ FRAGMENT,
+ "http://www.w3.org/TR/2004/REC-xml-20040204/#dt-sysid",
+ "TODO", "TODO
"),
+
+ new FromSpec_scheme("http", USER,
+ "http://www.apps.ietf.org/rfc/rfc2616.html"),
+
+ new FromSpec_scheme("https", USER,
+ "http://www.apps.ietf.org/rfc/rfc2818.html"),
+
+ new FromSpec_scheme(
+ "mailto",
+ AUTHORITY,
+ "http://www.apps.ietf.org/rfc/rfc2368.html",
+ ""
+ + "\n"
+ + " mailtoURL = \"mailto:\" [ to ] [ headers ]\n"
+ + " to = #mailbox\n"
+ + " headers = \"?\" header *( \"&\" header )\n"
+ + " header = hname \"=\" hvalue\n"
+ + " hname = *urlc\n"
+ + " hvalue = *urlc\n" + "",
+ ""
+ + "
\n"
+ + " mailtoURL = \"mailto:\" [ to ] [ headers ]\n"
+ + " to = #mailbox\n"
+ + " headers = \"?\" header *( \"&\" header )\n"
+ + " header = hname \"=\" hvalue\n"
+ + " hname = *urlc\n"
+ + " hvalue = *urlc\n"
+ + " " + "
"),
+
+ new FromSpec_scheme(
+ "news",
+ AUTHORITY,
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
+ ""
+ + "\n"
+ + "newsurl = \"news:\" grouppart\n"
+ + "grouppart = \"*\" | group | article\n"
+ + "group = alpha *[ alpha | digit | \"-\" | \".\" | \"+\" | \"_\" ]\n"
+ + "article = 1*[ uchar | \";\" | \"/\" | \"?\" | \":\" | \"&\" | \"=\" ] \"@\" host\n"
+ + "",
+ ""
+ + "
\n"
+ + "newsurl = \"news:\" grouppart\n"
+ + "grouppart = \"*\" | group | article\n"
+ + "group = alpha *[ alpha | digit | \"-\" | \".\" | \"+\" | \"_\" ]\n"
+ + "article = 1*[ uchar | \";\" | \"/\" | \"?\" | \":\" | \"&\" | \"=\" ] \"@\" host\n"
+ + " " + "
"),
+
+ new FromSpec_scheme("nntp", QUERY,
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-3.7"),
+
+ new FromSpec_scheme("nntp", USER,
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-3.7"),
+
+ new FromSpec_scheme(
+ "file",
+ USER,
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
+ ""
+ + "\n"
+ + "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"
+ + "",
+ ""
+ + "
\n"
+ + "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"
+ + " " + "
"),
+
+ new FromSpec_scheme(
+ "file",
+ PORT,
+ "http://www.apps.ietf.org/rfc/rfc1738.html#sec-5",
+ ""
+ + "\n"
+ + "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"
+ + "",
+ ""
+ + "
\n"
+ + "fileurl = \"file://\" [ host | \"localhost\" ] \"/\" fpath\n"
+ + " " + "
"),
+
+ new FromSpec_scheme(
+ "urn",
+ AUTHORITY,
+ "http://www.apps.ietf.org/rfc/rfc2141.html#sec-2",
+ ""
+ + "\n"
+ + " ::= \"urn:\" \":\" \n"
+ + "",
+ ""
+ + "
\n"
+ + "<URN> ::= \"urn:\" <NID> \":\" <NSS>\n"
+ + " " + "
"),
+
+ new FromSpec_scheme(
+ "urn",
+ AUTHORITY,
+ "http://www.apps.ietf.org/rfc/rfc2141.html#sec-2.1",
+ ""
+ + "\n"
+ + " ::= [ 1,31 ]\n"
+ + "",
+ ""
+ + "
\n"
+ + "<NID> ::= <let-num> [ 1,31<let-num-hyp> ]\n"
+ + " " + "
"),
+
+ new FromSpec_scheme("urn", QUERY,
+ "http://www.apps.ietf.org/rfc/rfc2141.html#sec-2.3.2"),
+
+ }, new String[] {
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ SCHEME_REQUIRES_LOWERCASE,
+ "SCHEME_REQUIRES_LOWERCASE",
+ "Some part of the scheme specific syntax requires lowercase.",
+ "Some part of the scheme specific syntax requires lowercase.
",
+ 0, new InSpec[] {
+
+ }, new String[] {
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(
+ SCHEME_PREFERS_LOWERCASE,
+ "SCHEME_PREFERS_LOWERCASE",
+ "Some part of the scheme specific syntax prefers lowercase.",
+ "Some part of the scheme specific syntax prefers lowercase.
",
+ 0 | Force.minting, new InSpec[] {
+
+ }, new String[] {
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(SCHEME_PATTERN_MATCH_FAILED,
+ "SCHEME_PATTERN_MATCH_FAILED",
+ "The scheme specific syntax rules are violated.",
+ "The scheme specific syntax rules are violated.
", 0,
+ new InSpec[] {
+
+ }, new String[] {
+
+ },
+
+ new String[] {
+
+ },
+
+ false);
+
+ new ViolationCodeInfo(QUERY_IN_LEGACY_SCHEME,
+ "QUERY_IN_LEGACY_SCHEME", new String[] {
+
+ }, new String[] {
+
+ },
+
+ false);
+
+ }
+ }
+
+ /**
+ * The character violates the grammar rules for URIs/IRIs.
+ *
+ *
+ * This violates the following specifications: [URI]
+ * (see here ), [IRI] (see section
+ * 2.2 ), [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <ht$tp://example.org/foo>
+ *
+ *
+ */
+ int ILLEGAL_CHARACTER = 0;
+
+ /**
+ * Percent-escape sequences should use uppercase.
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 2.1
+ *
+ *
+ * URI producers and normalizers should use uppercase
+ *
+ * hexadecimal digits for all percent-encodings.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org/foo%c3%80>
+ *
+ *
+ */
+ int PERCENT_ENCODING_SHOULD_BE_UPPERCASE = 1;
+
+ /**
+ * Percent-escape sequences should not be used unnecessarily.
+ *
+ *
+ * The IRI specification only weakly suggests that Unicode characters should
+ * be used in preference to percent encodings.
+ *
+ *
+ *
+ * This is specified in [IRI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.2
+ *
+ *
+ * URI-to-IRI conversion removes percent-encodings
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the [IRI] specification.
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org/foo%C3%A9r>
+ *
+ *
+ *
+ *
+ * Unimplemented.
+ *
+ */
+ int SUPERFLUOUS_NON_ASCII_PERCENT_ENCODING = 2;
+
+ /**
+ * Percent-escape sequences should not be used unnecessarily.
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 2.3
+ *
+ *
+ * For consistency, percent-encoded octets in the ranges of ALPHA (%41-%5A
+ * and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E), underscore
+ * (%5F), or tilde (%7E) should not be created by URI producers
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org/foo%5Fb%61r>
+ *
+ *
+ *
+ *
+ * Unimplemented.
+ *
+ */
+ int SUPERFLUOUS_ASCII_PERCENT_ENCODING = 3;
+
+ /**
+ * The character matches no grammar rules of URIs/IRIs. These characters are
+ * permitted in RDF URI References, XML system identifiers, and XML Schema
+ * anyURIs.
+ *
+ *
+ * Whitespace is dealt with separately.
+ *
+ *
+ *
+ * This is specified in [IRI] .
+ *
+ *
+ *
+ *
+ *
+ * see here
+ *
+ *
+ * Systems accepting IRIs MAY also deal with the printable characters in
+ * US-ASCII that are not allowed in URIs, namely "<", ">", '"', space,
+ * "{", "}", "|", "\", "^", and "`", in step 2 above. If these characters
+ * are found but are not converted, then the conversion SHOULD fail.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [IRI] ,
+ * [URI] (see here ).
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org/fo|o>
+ *
+ * <http://example.org/fo<o>
+ *
+ * <http://example.org/fo>o>
+ *
+ * <http://example.org/fo"o>
+ *
+ * <http://example.org/fo`o>
+ *
+ *
+ *
+ * @see IRIFactory#allowUnwiseCharacters
+ * @see #WHITESPACE
+ * @see #DOUBLE_WHITESPACE
+ */
+ int UNWISE_CHARACTER = 4;
+
+ /**
+ * Control characters are not allowed in URIs or RDF URI References.
+ *
+ *
+ * This is specified in [RDF] .
+ *
+ *
+ *
+ *
+ *
+ * see here
+ *
+ *
+ * A URI reference within an RDF graph (an RDF URI reference) is a Unicode
+ * string [UNICODE] that:
+ *
+ *
+ *
+ *
+ * does not contain any control characters ( #x00 - #x1F, #x7F-#x9F)
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This is specified in [IRI] .
+ *
+ *
+ *
+ *
+ *
+ * see here
+ *
+ *
+ *
+ *
+ * ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
+ * / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
+ * / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
+ * / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
+ * / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
+ * / %xD0000-DFFFD / %xE1000-EFFFD
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [RDF] ,
+ * [IRI] , [URI] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org/fo\u007Fo>
+ *
+ * <http://example.org/fo\u0085o>
+ *
+ * <http://example.org/fo\u0009o>
+ *
+ * <http://example.org/fo\u0001o>
+ *
+ *
+ */
+ int CONTROL_CHARACTER = 5;
+
+ /**
+ * The character is not legal in XML.
+ *
+ *
+ * This is specified in [XML] .
+ *
+ *
+ *
+ *
+ *
+ * see here
+ *
+ *
+ * Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] |
+ * [#x10000-#x10FFFF]
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [XML] ,
+ * [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org/foo\u0001>
+ *
+ *
+ */
+ int NON_XML_CHARACTER = 6;
+
+ /**
+ * The character is discouraged in XML documents.
+ *
+ *
+ * This is specified in [XML] .
+ *
+ *
+ *
+ *
+ *
+ * see here
+ *
+ *
+ *
+ * Document authors are encouraged to avoid "compatibility characters", as
+ * defined in section 6.8 of [Unicode] (see also D21 in section 3.6 of
+ * [Unicode3]). The characters defined in the following ranges are also
+ * discouraged. They are either control characters or permanently undefined
+ * Unicode characters: [#x7F-#x84], [#x86-#x9F], [#xFDD0-#xFDDF],
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [XML] ,
+ * [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org/foo\u0080>
+ *
+ *
+ */
+ int DISCOURAGED_XML_CHARACTER = 7;
+
+ /**
+ * The path contains a segment /../ not at the beginning of a relative
+ * reference, or it contains a /./ These should be removed.
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 6.2.2.3
+ *
+ *
+ * The complete path segments "." and ".." are intended only for
+ * use within relative references
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ *
+ *
+ * This violation may indicate security issues, and the behaviour of a
+ * factory implementing the relevant specs can be modified by
+ * {@link IRIFactory#securityViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org/../foo>
+ *
+ * <http://example.org/foo/../foo>
+ *
+ * <http://example.org/foo/..>
+ *
+ * <http://example.org/foo/./foo>
+ *
+ * <http://example.org/./foo>
+ *
+ * <http://example.org/foo/.>
+ *
+ *
+ */
+ int NON_INITIAL_DOT_SEGMENT = 8;
+
+ /**
+ * The scheme component is empty.
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.1
+ *
+ * Scheme names consist of a sequence of characters beginning
+ with a letter and
+ * followed by any combination of letters, digits, plus ("+"), period ("."),
+ * or hyphen ("-").
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <://example.org/foo>
+ *
+ *
+ */
+ int EMPTY_SCHEME = 9;
+
+ /**
+ * The scheme component must start with a letter.
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.1
+ *
+ * Scheme names consist of a sequence of characters beginning
+ with a letter and
+ * followed by any combination of letters, digits, plus ("+"), period ("."),
+ * or hyphen ("-").
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <007://example.org/foo>
+ *
+ *
+ */
+ int SCHEME_MUST_START_WITH_LETTER = 10;
+
+ /**
+ * lowercase is preferred in this component
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * For the SCHEME component:
+ *
+ * see section
+ * 3.1
+ *
+ * An implementation should accept uppercase letters as equivalent to
+ * lowercase in scheme names (e.g., allow "HTTP" as well as "http") for the
+ * sake of robustness but should only produce lowercase scheme names for
+ * consistency.
+ *
+ *
+ *
+ * For the HOST component:
+ *
+ * see section
+ * 3.2.2
+ *
+ *
+ * Although host is case-insensitive, producers and normalizers should use
+ * lowercase for registered names and hexadecimal addresses for the
+ * sake of uniformity, while only using uppercase letters for
+ * percent-encodings.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <HTTP://example.org/foo>
+ *
+ * <http://eXamPle.org/foo>
+ *
+ *
+ */
+ int LOWERCASE_PREFERRED = 11;
+
+ /**
+ * The colon introducing an empty port component should be omitted entirely,
+ * or a port number should be specified.
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.2.2
+ *
+ *
+ * URI producers and normalizers should omit the port component
+ * and its ":" delimiter if port is empty
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org:/foo>
+ *
+ *
+ */
+ int PORT_SHOULD_NOT_BE_EMPTY = 12;
+
+ /**
+ * If the port is the default one for the scheme it should be omitted.
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.2.2
+ *
+ *
+ * URI producers and normalizers should omit the port component and its ":"
+ * delimiter if port is empty or if its value would be the
+ * same as that of the scheme's default.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org:80/foo>
+ *
+ *
+ */
+ int DEFAULT_PORT_SHOULD_BE_OMITTED = 13;
+
+ /**
+ * Ports under 1024 should be accessed using the appropriate scheme name.
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 7.2
+ *
+ *
+ * Applications should prevent dereference of a URI that specifies a TCP
+ * port number within the "well-known port" range (0 - 1023) unless
+ * the protocol being used to dereference that URI is compatible with the
+ * protocol expected on that well-known port.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation may indicate security issues, and the behaviour of a
+ * factory implementing the relevant specs can be modified by
+ * {@link IRIFactory#securityViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org:180/foo>
+ *
+ *
+ */
+ int PORT_SHOULD_NOT_BE_WELL_KNOWN = 14;
+
+ /**
+ * Leading zeros in the port number should be omitted. This is an added
+ * feature of this implementation, not mandated by any standard.
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org:08080/foo>
+ *
+ *
+ */
+ int PORT_SHOULD_NOT_START_IN_ZERO = 15;
+
+ /**
+ * A prohibited bi-directional control character was found.
+ *
+ * This is specified in [IRI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 4.1
+ *
+ *
+ * IRIs MUST NOT contain bidirectional formatting characters (LRM, RLM, LRE,
+ * RLE, LRO, RLO, and PDF).
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the [IRI] specification.
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org/Andr\u202Abar>
+ *
+ * <http://example.org/Andr\u202Bbar>
+ *
+ * <http://example.org/Andr\u202Cbar>
+ *
+ * <http://example.org/Andr\u202Dbar>
+ *
+ * <http://example.org/Andr\u202Ebar>
+ *
+ * <http://example.org/Andr\u200Ebar>
+ *
+ * <http://example.org/Andr\u200Fbar>
+ *
+ *
+ *
+ *
+ * Unimplemented.
+ *
+ */
+ int BIDI_FORMATTING_CHARACTER = 16;
+
+ /**
+ * A single whitespace character. These match no grammar rules of URIs/IRIs.
+ * These characters are permitted in RDF URI References, XML system
+ * identifiers, and XML Schema anyURIs.
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org/ foo>
+ *
+ * <file:///Program Files>
+ *
+ *
+ *
+ * @see IRIFactory#allowUnwiseCharacters
+ * @see #NOT_XML_SCHEMA_WHITESPACE
+ * @see #UNWISE_CHARACTER
+ * @see #DOUBLE_WHITESPACE
+ */
+ int WHITESPACE = 17;
+
+ /**
+ * Either two or more consecutive whitespace characters, or leading or
+ * trailing whitespace.
+ *
+ * These match no grammar rules of URIs/IRIs. These characters are permitted
+ * in RDF URI References, XML system identifiers, but not XML Schema
+ * anyURIs.
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [Schema] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org/ foo>
+ *
+ * <file:///Program Files>
+ *
+ * <file:///TabBar >
+ *
+ * < rel-with-initial-space>
+ *
+ *
+ *
+ * @see IRIFactory#allowUnwiseCharacters
+ * @see #NOT_XML_SCHEMA_WHITESPACE
+ * @see #UNWISE_CHARACTER
+ * @see #WHITESPACE
+ */
+ int DOUBLE_WHITESPACE = 18;
+
+ /**
+ * Whitespace characters match no grammar rules of URIs/IRIs. These
+ * characters are permitted in RDF URI References, and XML system
+ * identifiers. However, tab and new line characters, and consecutive space
+ * characters cannot occur in XML Schema anyURIs.
+ *
+ *
+ * This is specified in [Schema] .
+ *
+ *
+ *
+ *
+ *
+ * see here
+ *
+ *
+ *
+ *
+ *
+ * <xs:simpleType name="anyURI" id="anyURI">
+ * [...]
+ * <xs:restriction base="xs:anySimpleType">
+ * <xs:whiteSpace fixed="true" value="collapse" id="anyURI.whiteSpace"/>
+ *
+ * </xs:restriction>
+ * </xs:simpleType>
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [Schema] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <file:///Tab\u0009Bar>
+ *
+ * <file:///Tab\u000ABar>
+ *
+ * <file:///Tab\u000DBar>
+ *
+ *
+ *
+ * @see IRIFactory#allowUnwiseCharacters
+ * @see #DOUBLE_WHITESPACE
+ * @see #WHITESPACE
+ */
+ int NOT_XML_SCHEMA_WHITESPACE = 19;
+
+ /**
+ * Internal code. This is not an error or warning condition, but is used to
+ * trigger more expensive processing.
+ */
+ int DOUBLE_DASH_IN_REG_NAME = 20;
+
+ /**
+ * Internal code. This is not an error or warning condition, but is used to
+ * trigger more expensive processing.
+ */
+ int SCHEME_INCLUDES_DASH = 21;
+
+ /**
+ * Internal code. This is not an error or warning condition, but is used to
+ * trigger more expensive processing.
+ */
+ int NON_URI_CHARACTER = 22;
+
+ /**
+ * Internal code. This is not an error or warning condition, but is used to
+ * trigger more expensive processing.
+ */
+ int PERCENT_20 = 23;
+
+ /**
+ * Internal code. This is not an error or warning condition, but is used to
+ * trigger more expensive processing.
+ */
+ int PERCENT = 24;
+
+ /**
+ * A syntax violation was detected in an IP V6 (or future) address.
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.2.2
+ *
+ *
+ *
+ *
+ * IP-literal = "[" ( IPv6address / IPvFuture ) "]"
+ * IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" )
+ * IPv6address = 6( h16 ":" ) ls32
+ * / "::" 5( h16 ":" ) ls32
+ * / [ h16 ] "::" 4( h16 ":" ) ls32
+ * / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
+ * / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
+ * / [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
+ * / [ *4( h16 ":" ) h16 ] "::" ls32
+ * / [ *5( h16 ":" ) h16 ] "::" h16
+ * / [ *6( h16 ":" ) h16 ] "::"
+ *
+ * ls32 = ( h16 ":" h16 ) / IPv4address
+ * ; least-significant 32 bits of address
+ * h16 = 1*4HEXDIG
+ * ; 16 bits of address represented in hexadecimal
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://[/>
+ *
+ * <ldap://[20015:db8::7]/c=GB?objectClass?one>
+ *
+ * <ldap://[2001:db8:::7]/c=GB?objectClass?one>
+ *
+ *
+ */
+ int IP_V6_OR_FUTURE_ADDRESS_SYNTAX = 25;
+
+ /**
+ * IP version 6 addresses should use lowercase hexadecimal
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.2.2
+ *
+ *
+ * Although host is case-insensitive, producers and normalizers
+ *
+ * should use lowercase for registered names and
+ * hexadecimal addresses for the sake of uniformity
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <ldap://[2001:Db8::7]/c=GB?objectClass?one>
+ *
+ * <ldap://[2001:dB8::7]/c=GB?objectClass?one>
+ *
+ *
+ */
+ int IPv6ADDRESS_SHOULD_BE_LOWERCASE = 26;
+
+ /**
+ * A host entry consists of four numbers, but they are not in the range
+ * 0-255, or have leading zeros.
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.2.2
+ *
+ *
+ * A host identified by an IPv4 literal address is represented in
+ * dotted-decimal notation (a sequence of four decimal numbers in
+ * the range 0 to 255 , separated by "."),
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.2.2
+ *
+ *
+ *
+ *
+ * dec-octet = DIGIT ; 0-9
+ * / %x31-39 DIGIT ; 10-99
+ * / "1" 2DIGIT ; 100-199
+ * / "2" %x30-34 DIGIT ; 200-249
+ * / "25" %x30-35 ; 250-255
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <ldap://155.00.55.102/c=GB?objectClass?one>
+ *
+ * <ldap://20.256.20.20/c=GB?objectClass?one>
+ *
+ * <ldap://20.1000.20.20/c=GB?objectClass?one>
+ *
+ * <ldap://20.010.20.20/c=GB?objectClass?one>
+ *
+ *
+ */
+ int IP_V4_OCTET_RANGE = 27;
+
+ /**
+ * The host component did not meet the restrictions on DNS names.
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.2.2
+ *
+ *
+ * URI producers should use names that conform to the DNS syntax ,
+ * even when use of DNS is not immediately apparent, and should limit these
+ * names to no more than 255 characters in length.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation is relevant for IRIs using DNS as the registry of
+ * hostnames. The behaviour of a factory implementing the relevant specs can
+ * be modified by {@link IRIFactory#dnsViolation}.
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <ldap://foo$/c=GB?objectClass?one>
+ *
+ * <http://foo.example.$org/>
+ *
+ *
+ */
+ int NOT_DNS_NAME = 28;
+
+ /**
+ * The host component used percent encoding, where punycode is preferred.
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.2.2
+ *
+ *
+ * URI producers should provide these registered names in the IDNA encoding,
+ * rather than a percent-encoding, if they wish to maximize interoperability
+ * with legacy URI resolvers.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ *
+ *
+ * This violation is relevant for IRIs using DNS as the registry of
+ * hostnames. The behaviour of a factory implementing the relevant specs can
+ * be modified by {@link IRIFactory#dnsViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <ftp://andr%C3%A9.example.org/>
+ *
+ *
+ */
+ int USE_PUNYCODE_NOT_PERCENTS = 29;
+
+ /**
+ * The host component a percent occurred without two following hexadecimal
+ * digits.
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 2.1
+ *
+ *
+ * A percent-encoded octet is encoded as a character triplet, consisting of
+ * the percent character "%" followed by the two hexadecimal digits
+ * representing that octet's numeric value.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <ftp://andr%%A9.example.org/>
+ *
+ * <ftp://andr%.example.org/>
+ *
+ * <ftp://andre.example.org/%>
+ *
+ * <ftp://andre.example.org/%A>
+ *
+ * <ftp://andre.example.org/%A?>
+ *
+ * <ftp://andre.example.org/%A#>
+ *
+ *
+ */
+ int ILLEGAL_PERCENT_ENCODING = 30;
+
+ /**
+ * Internal code. This is not an error or warning condition, but is used to
+ * trigger more expensive processing.
+ */
+ int ACE_PREFIX = 31;
+
+ /**
+ * A unicode surrogate character that is not of a surrogate pair.
+ *
+ *
+ * This does not violate any of the supported IRI, URI or scheme
+ * specifications.
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http:/foo/p\uD800>
+ *
+ *
+ */
+ int LONE_SURROGATE = 32;
+
+ /**
+ * A DNS name had a - at the beginning or end.
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.2.2
+ *
+ *
+ * Such a name consists of a sequence of domain labels separated by ".",
+ * each domain label starting and ending with an alphanumeric character and
+ * possibly also containing "-" characters.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation is relevant for IRIs using DNS as the registry of
+ * hostnames. The behaviour of a factory implementing the relevant specs can
+ * be modified by {@link IRIFactory#dnsViolation}.
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <ldap://-foo/c=GB?objectClass?one>
+ *
+ * <http://foo.example.org-/>
+ *
+ * <http://foo.example.org--/>
+ *
+ * <http://--foo.example.org/>
+ *
+ * <http://-fo-o.example.org/>
+ *
+ *
+ */
+ int DNS_LABEL_DASH_START_OR_END = 33;
+
+ /**
+ * Characters used in the IRI were unassigned in the version of Unicode
+ * known by this system. They may have been assigned since.
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.2.2
+ *
+ *
+ * When a non-ASCII registered name represents an internationalized domain
+ * name intended for resolution via the DNS, the name must be transformed to
+ * the IDNA encoding [RFC3490] prior to name lookup. URI producers should
+ * provide these registered names in the IDNA encoding, rather than a
+ * percent-encoding, if they wish to maximize interoperability with legacy
+ * URI resolvers.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This is specified in [IRI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.1
+ *
+ *
+ * Replace the ireg-name part of the IRI by the part converted using the
+ * ToASCII operation specified in section 4.1 of [RFC3490] on each
+ * dot-separated label, and by using U+002E (FULL STOP) as a label
+ * separator, with the flag UseSTD3ASCIIRules set to TRUE, and with the flag
+ * AllowUnassigned set to FALSE for creating IRIs and set to TRUE otherwise.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://foo.example\u0221.org/>
+ *
+ *
+ */
+ int BAD_IDN_UNASSIGNED_CHARS = 34;
+
+ /**
+ * The Internationalized Domain Name check failed.
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.2.2
+ *
+ *
+ * When a non-ASCII registered name represents an internationalized domain
+ * name intended for resolution via the DNS, the name must be transformed to
+ * the IDNA encoding [RFC3490] prior to name lookup. URI producers should
+ * provide these registered names in the IDNA encoding, rather than a
+ * percent-encoding, if they wish to maximize interoperability with legacy
+ * URI resolvers.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This is specified in [IRI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.1
+ *
+ *
+ * Replace the ireg-name part of the IRI by the part converted using the
+ * ToASCII operation specified in section 4.1 of [RFC3490] on each
+ * dot-separated label, and by using U+002E (FULL STOP) as a label
+ * separator, with the flag UseSTD3ASCIIRules set to TRUE, and with the flag
+ * AllowUnassigned set to FALSE for creating IRIs and set to TRUE otherwise.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://--foo.example.org/>
+ *
+ * <http://xn--andr--ep-.example.org/>
+ *
+ * <
+ * http://xn.example.\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333\u3333/>
+ *
+ *
+ *
+ */
+ int BAD_IDN = 35;
+
+ /**
+ * Including passwords in URIs is deprecated.
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.2.1
+ *
+ *
+ * Use of the format "user:password" in the userinfo field is deprecated.
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.2.1
+ *
+ *
+ * Applications may choose to ignore or reject such data when it is received
+ * as part of a reference and should reject the storage of such data in
+ * unencrypted form. The passing of authentication information in clear text
+ * has proven to be a security risk in almost every case where it has been
+ * used.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [RDF] , [XML] , [XLink] , [Schema] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * This violation may indicate security issues, and the behaviour of a
+ * factory implementing the relevant specs can be modified by
+ * {@link IRIFactory#securityViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://user:pass@example.org/>
+ *
+ *
+ */
+ int HAS_PASSWORD = 36;
+
+ /**
+ * Certain characters are discouraged in IRIs.
+ *
+ *
+ * Implementation is very partial. The amount of guidance as to which
+ * characters to discourage is insufficient.
+ *
+ *
+ *
+ * This is specified in [IRI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 6.1
+ *
+ *
+ * The UCS contains many areas of characters for which there are strong
+ * visual look-alikes. Because of the likelihood of transcription errors,
+ * these also should be avoided. This includes the full-width equivalents of
+ * Latin characters, half-width Katakana characters for Japanese, and many
+ * others. It also includes many look-alikes of "space", "delims", and
+ * "unwise", characters excluded in [RFC3491].
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the [IRI] specification.
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org/\u2000en-quad>
+ *
+ * <http://example.org/\u205Fmedium-mathematical-space>
+ *
+ * <http://example\uFF95.org/>
+ *
+ * <http://example\uFF47.org/>
+ *
+ *
+ *
+ *
+ * Unimplemented.
+ *
+ */
+ int DISCOURAGED_IRI_CHARACTER = 37;
+
+ /**
+ * There are restrictions on bidi characters in subcomponents of IRIs
+ *
+ *
+ * This is specified in [IRI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 4.2
+ *
+ *
+ *
+ *
+ *
+ *
+ * A component SHOULD NOT use both right-to-left and left-to-right
+ * characters.
+ *
+ *
+ *
+ * A component using right-to-left characters SHOULD start and end with
+ * right-to-left characters.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the [IRI] specification.
+ *
+ *
+ *
+ * This violation has SHOULD force.
+ * By default, this is treated as an error (for the relevant specs), but
+ * that behaviour can be modified by {@link IRIFactory#shouldViolation}.
+ *
+ *
+ *
+ * Unimplemented.
+ *
+ */
+ int BAD_BIDI_SUBCOMPONENT = 38;
+
+ /**
+ * // TODO complete entry for DNS_LENGTH_LIMIT
+ */
+ int DNS_LENGTH_LIMIT = 39;
+
+ /**
+ * // TODO complete entry for DNS_LABEL_LENGTH_LIMIT
+ */
+ int DNS_LABEL_LENGTH_LIMIT = 40;
+
+ /**
+ * // TODO complete entry for NOT_UTF8_ESCAPE
+ */
+ int NOT_UTF8_ESCAPE = 41;
+
+ /**
+ * // TODO complete entry for NOT_UTF8_ESCAPE_IN_HOST
+ */
+ int NOT_UTF8_ESCAPE_IN_HOST = 42;
+
+ /**
+ * // TODO complete entry for BAD_DOT_IN_IDN
+ */
+ int BAD_DOT_IN_IDN = 43;
+
+ /**
+ * The scheme name does not have a "-" in it, but is not in the IANA
+ * registry. (Last updated from the registry January 2006)
+ *
+ *
+ * This is specified in
+ * [URL_Registratrion] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This is specified in [URI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.2
+ *
+ *
+ * The NAMES of schemes registered in the IETF tree MUST NOT contain the
+ * dash (also known as the hyphen and minus sign) character ('-') USASCII
+ * value 2Dh. Use of this character can cause confusion with schemes
+ * registered in alternative trees (see section 3.3).
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.3
+ *
+ *
+ * The syntax for alternative trees shall be as follows: each tree will be
+ * identified by a unique prefix, which must be established in the same
+ * fashion as a URL scheme name in the IETF tree, except that the prefix
+ * must be defined by a Standards Track document. Scheme names in the new
+ * tree are then constructed by prepending the prefix to an identifier
+ * unique to each scheme in that tree, as prescribed by that tree's
+ * identifying document:
+ *
+ *
+ * <prefix>'-'<tree-specific identifier>
+ *
+ *
+ * For instance, the "foo" tree would allow creation of scheme names of the
+ * form: "foo-blahblah:" and "foo-bar:", where the tree prescribes an
+ * arbitrary USASCII string following the tree's unique prefix.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [XLink] , [XML] , [RDF] , [Schema] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <foo://example.org/bar>
+ *
+ *
+ */
+ int UNREGISTERED_IANA_SCHEME = 44;
+
+ /**
+ * The scheme name has a "-" in it, but it does not start in "x-" and the
+ * prefix is not known as the prefix of an alternative tree for URI schemes.
+ *
+ *
+ *
+ * There is no standard provision for "x-" as a prefix for private use
+ * schemes. This is a feature of this implementation. As far as I am aware,
+ * no alternative trees have been registered.
+ *
+ *
+ *
+ *
+ * This is specified in
+ * [URL_Registratrion] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 3.3
+ *
+ *
+ * The syntax for alternative trees shall be as follows: each tree will be
+ * identified by a unique prefix, which must be established in the same
+ * fashion as a URL scheme name in the IETF tree, except that the prefix
+ * must be defined by a Standards Track document. Scheme names in the new
+ * tree are then constructed by prepending the prefix to an identifier
+ * unique to each scheme in that tree, as prescribed by that tree's
+ * identifying document:
+ *
+ *
+ * <prefix>'-'<tree-specific identifier>
+ *
+ *
+ * For instance, the "foo" tree would allow creation of scheme names of the
+ * form: "foo-blahblah:" and "foo-bar:", where the tree prescribes an
+ * arbitrary USASCII string following the tree's unique prefix.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the following specifications: [URI] ,
+ * [IRI] , [XLink] , [XML] , [RDF] , [Schema] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <foo-bar://example.org/bar>
+ *
+ *
+ */
+ int UNREGISTERED_NONIETF_SCHEME_TREE = 45;
+
+ /**
+ * The IRI is not in Unicode Normal Form C.
+ *
+ *
+ * This is specified in [IRI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 5.3.2.2
+ *
+ *
+ * To avoid false negatives and problems with transcoding, IRIs SHOULD be
+ * created by using NFC.
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the [IRI] specification.
+ *
+ *
+ *
+ * This violation has SHOULD force.
+ * By default, this is treated as an error (for the relevant specs), but
+ * that behaviour can be modified by {@link IRIFactory#shouldViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org/#Andre\u0301>
+ *
+ *
+ *
+ *
+ * Unimplemented.
+ *
+ */
+ int NOT_NFC = 46;
+
+ /**
+ * The IRI is not in Unicode Normal Form KC.
+ *
+ *
+ * This is specified in [IRI] .
+ *
+ *
+ *
+ *
+ *
+ * see section
+ * 7.5
+ *
+ *
+ * Although there may be exceptions, newly created resource names should
+ * generally be in NFKC
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * This violates the [IRI] specification.
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ *
+ *
+ * The following are examples of IRIs that have this violation:
+ *
+ *
+ *
+ * <http://example.org/#Andre\u0301>
+ *
+ *
+ *
+ *
+ * Unimplemented.
+ *
+ */
+ int NOT_NFKC = 47;
+
+ /**
+ * TODO
+ *
+ * This violates the following specifications: [Unicode] , [IRI] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ */
+ int DEPRECATED_UNICODE_CHARACTER = 48;
+
+ /**
+ * TODO
+ *
+ * This violates the following specifications: [Unicode] , [IRI] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ */
+ int UNDEFINED_UNICODE_CHARACTER = 49;
+
+ /**
+ * TODO
+ *
+ * This violates the following specifications: [Unicode] , [IRI] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ */
+ int PRIVATE_USE_CHARACTER = 50;
+
+ /**
+ * TODO
+ *
+ * This violates the following specifications: [Unicode] , [IRI] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ */
+ int UNICODE_CONTROL_CHARACTER = 51;
+
+ /**
+ * The character code is not assigned in the version of Unicode implemented
+ * here.
+ *
+ *
+ * This violates the following specifications: [Unicode] , [IRI] .
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ */
+ int UNASSIGNED_UNICODE_CHARACTER = 52;
+
+ /**
+ * Internal code. This is not an error or warning condition, but is used to
+ * trigger more expensive processing.
+ */
+ int MAYBE_NOT_NFC = 53;
+
+ /**
+ * Internal code. This is not an error or warning condition, but is used to
+ * trigger more expensive processing.
+ */
+ int MAYBE_NOT_NFKC = 54;
+
+ /**
+ * TODO
+ *
+ * This violates the following specifications: [Unicode] , [IRI] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ */
+ int UNICODE_WHITESPACE = 55;
+
+ /**
+ * TODO
+ *
+ * This violates the following specifications: [Unicode] , [IRI] .
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ */
+ int COMPATIBILITY_CHARACTER = 56;
+
+ /**
+ * A component that is required by the scheme is missing.
+ *
+ * This does not violate any of the supported IRI, URI or scheme
+ * specifications.
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ */
+ int REQUIRED_COMPONENT_MISSING = 57;
+
+ /**
+ * A component that is prohibited by the scheme is present.
+ *
+ * This does not violate any of the supported IRI, URI or scheme
+ * specifications.
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ */
+ int PROHIBITED_COMPONENT_PRESENT = 58;
+
+ /**
+ * Some part of the scheme specific syntax requires lowercase.
+ *
+ * This does not violate any of the supported IRI, URI or scheme
+ * specifications.
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ */
+ int SCHEME_REQUIRES_LOWERCASE = 59;
+
+ /**
+ * Some part of the scheme specific syntax prefers lowercase.
+ *
+ * This does not violate any of the supported IRI, URI or scheme
+ * specifications.
+ *
+ *
+ *
+ * This violation relates to creating your own IRIs, rather than accepting
+ * and processing other peoples', and the behaviour of a factory
+ * implementing the relevant specs can be modified by
+ * {@link IRIFactory#mintingViolation}.
+ *
+ */
+ int SCHEME_PREFERS_LOWERCASE = 60;
+
+ /**
+ * The scheme specific syntax rules are violated.
+ *
+ * This does not violate any of the supported IRI, URI or scheme
+ * specifications.
+ *
+ *
+ *
+ * This violation has MUST force.
+ *
+ */
+ int SCHEME_PATTERN_MATCH_FAILED = 61;
+
+ /**
+ * // TODO complete entry for QUERY_IN_LEGACY_SCHEME
+ */
+ int QUERY_IN_LEGACY_SCHEME = 62;
}
-
\ No newline at end of file
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/AbsIRIImpl.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/AbsIRIImpl.java
index 76d9f1b4214..2df50acd362 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/AbsIRIImpl.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/AbsIRIImpl.java
@@ -600,11 +600,6 @@ static private String maybeDotSlash(String path) {
return path;
}
- static private String getLastSlash(String s) {
- int ix = s.lastIndexOf('/', s.length() - 2);
- return s.substring(0, ix + 1);
- }
-
private boolean equal(String s1, String s2) {
return s1 == null ? s2 == null : s1.equals(s2);
}
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerHost.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerHost.java
index b3486302a51..dbb90a5dc7d 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerHost.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerHost.java
@@ -1158,8 +1158,6 @@ private static int zzUnpackTrans(String packed, int offset, int [] result) {
/* error codes */
private static final int ZZ_UNKNOWN_ERROR = 0;
private static final int ZZ_NO_MATCH = 1;
- private static final int ZZ_PUSHBACK_2BIG = 2;
-
/* error messages for the codes above */
private static final String ZZ_ERROR_MSG[] = {
"Unkown internal scanner error",
@@ -1220,29 +1218,9 @@ the source of the yytext() string */
from input */
private int zzEndRead;
- /** number of newlines encountered up to the start of the matched text */
- private int yyline;
-
- /** the number of characters up to the start of the matched text */
- private int yychar;
-
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- private int yycolumn;
-
- /**
- * zzAtBOL == true <=> the scanner is currently at the beginning of a line
- */
- private boolean zzAtBOL = true;
-
/** zzAtEOF == true <=> the scanner is at the EOF */
private boolean zzAtEOF;
- /** denotes if the user-EOF-code has already been executed */
- private boolean zzEOFDone;
-
/* user code: */
private Parser parser;
private int range;
@@ -1395,18 +1373,6 @@ private boolean zzRefill() throws java.io.IOException {
}
- /**
- * Closes the input stream.
- */
- private final void yyclose() throws java.io.IOException {
- zzAtEOF = true; /* indicate end of file */
- zzEndRead = zzStartRead; /* invalidate buffer */
-
- if (zzReader != null)
- zzReader.close();
- }
-
-
/**
* Resets the scanner to read from a new input stream.
* Does not close the old reader.
@@ -1419,66 +1385,13 @@ private final void yyclose() throws java.io.IOException {
*/
private final void yyreset(java.io.Reader reader) {
zzReader = reader;
- zzAtBOL = true;
zzAtEOF = false;
- zzEOFDone = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = 0;
- yyline = yychar = yycolumn = 0;
zzLexicalState = YYINITIAL;
}
- /**
- * Returns the current lexical state.
- */
- private final int yystate() {
- return zzLexicalState;
- }
-
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- private final void yybegin(int newState) {
- zzLexicalState = newState;
- }
-
-
- /**
- * Returns the text matched by the current regular expression.
- */
- private final String yytext() {
- return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
- }
-
-
- /**
- * Returns the character at position pos from the
- * matched text.
- *
- * It is equivalent to yytext().charAt(pos), but faster
- *
- * @param pos the position of the character to fetch.
- * A value from 0 to yylength()-1.
- *
- * @return the character at position pos
- */
- private final char yycharat(int pos) {
- return zzBuffer[zzStartRead+pos];
- }
-
-
- /**
- * Returns the length of the matched text region.
- */
- private final int yylength() {
- return zzMarkedPos-zzStartRead;
- }
-
-
/**
* Reports an error that occured while scanning.
*
@@ -1506,22 +1419,6 @@ private void zzScanError(int errorCode) {
}
- /**
- * Pushes the specified amount of characters back into the input stream.
- *
- * They will be read again by then next call of the scanning method
- *
- * @param number the number of characters to be read again.
- * This number must not be greater than yylength()!
- */
- private void yypushback(int number) {
- if ( number > yylength() )
- zzScanError(ZZ_PUSHBACK_2BIG);
-
- zzMarkedPos -= number;
- }
-
-
/**
* Resumes scanning until the next regular expression is matched,
* the end of input is encountered or an I/O-Error occurs.
@@ -1547,8 +1444,6 @@ private int yylex() throws java.io.IOException {
while (true) {
zzMarkedPosL = zzMarkedPos;
- yychar+= zzMarkedPosL-zzStartRead;
-
zzAction = -1;
zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPath.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPath.java
index c25722205ab..5c74057ac92 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPath.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPath.java
@@ -361,18 +361,6 @@ private boolean zzRefill() throws java.io.IOException {
}
- /**
- * Closes the input stream.
- */
- private final void yyclose() throws java.io.IOException {
- zzAtEOF = true; /* indicate end of file */
- zzEndRead = zzStartRead; /* invalidate buffer */
-
- if (zzReader != null)
- zzReader.close();
- }
-
-
/**
* Resets the scanner to read from a new input stream.
* Does not close the old reader.
@@ -395,24 +383,6 @@ private final void yyreset(java.io.Reader reader) {
}
- /**
- * Returns the current lexical state.
- */
- private final int yystate() {
- return zzLexicalState;
- }
-
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- private final void yybegin(int newState) {
- zzLexicalState = newState;
- }
-
-
/**
* Returns the text matched by the current regular expression.
*/
@@ -421,22 +391,6 @@ private final void yybegin(int newState) {
}
- /**
- * Returns the character at position pos from the
- * matched text.
- *
- * It is equivalent to yytext().charAt(pos), but faster
- *
- * @param pos the position of the character to fetch.
- * A value from 0 to yylength()-1.
- *
- * @return the character at position pos
- */
- private final char yycharat(int pos) {
- return zzBuffer[zzStartRead+pos];
- }
-
-
/**
* Returns the length of the matched text region.
*/
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPort.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPort.java
index e2b055a0f8e..3e3cb0eff48 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPort.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPort.java
@@ -341,18 +341,6 @@ private boolean zzRefill() throws java.io.IOException {
}
- /**
- * Closes the input stream.
- */
- private final void yyclose() throws java.io.IOException {
- zzAtEOF = true; /* indicate end of file */
- zzEndRead = zzStartRead; /* invalidate buffer */
-
- if (zzReader != null)
- zzReader.close();
- }
-
-
/**
* Resets the scanner to read from a new input stream.
* Does not close the old reader.
@@ -375,24 +363,6 @@ private final void yyreset(java.io.Reader reader) {
}
- /**
- * Returns the current lexical state.
- */
- private final int yystate() {
- return zzLexicalState;
- }
-
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- private final void yybegin(int newState) {
- zzLexicalState = newState;
- }
-
-
/**
* Returns the text matched by the current regular expression.
*/
@@ -401,22 +371,6 @@ private final void yybegin(int newState) {
}
- /**
- * Returns the character at position pos from the
- * matched text.
- *
- * It is equivalent to yytext().charAt(pos), but faster
- *
- * @param pos the position of the character to fetch.
- * A value from 0 to yylength()-1.
- *
- * @return the character at position pos
- */
- private final char yycharat(int pos) {
- return zzBuffer[zzStartRead+pos];
- }
-
-
/**
* Returns the length of the matched text region.
*/
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerQuery.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerQuery.java
index 8b426a27713..18e9f865c91 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerQuery.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerQuery.java
@@ -356,18 +356,6 @@ private boolean zzRefill() throws java.io.IOException {
}
- /**
- * Closes the input stream.
- */
- private final void yyclose() throws java.io.IOException {
- zzAtEOF = true; /* indicate end of file */
- zzEndRead = zzStartRead; /* invalidate buffer */
-
- if (zzReader != null)
- zzReader.close();
- }
-
-
/**
* Resets the scanner to read from a new input stream.
* Does not close the old reader.
@@ -390,24 +378,6 @@ private final void yyreset(java.io.Reader reader) {
}
- /**
- * Returns the current lexical state.
- */
- private final int yystate() {
- return zzLexicalState;
- }
-
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- private final void yybegin(int newState) {
- zzLexicalState = newState;
- }
-
-
/**
* Returns the text matched by the current regular expression.
*/
@@ -416,22 +386,6 @@ private final void yybegin(int newState) {
}
- /**
- * Returns the character at position pos from the
- * matched text.
- *
- * It is equivalent to yytext().charAt(pos), but faster
- *
- * @param pos the position of the character to fetch.
- * A value from 0 to yylength()-1.
- *
- * @return the character at position pos
- */
- private final char yycharat(int pos) {
- return zzBuffer[zzStartRead+pos];
- }
-
-
/**
* Returns the length of the matched text region.
*/
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerScheme.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerScheme.java
index 811fea1b622..690b08255aa 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerScheme.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerScheme.java
@@ -344,18 +344,6 @@ private boolean zzRefill() throws java.io.IOException {
}
- /**
- * Closes the input stream.
- */
- private final void yyclose() throws java.io.IOException {
- zzAtEOF = true; /* indicate end of file */
- zzEndRead = zzStartRead; /* invalidate buffer */
-
- if (zzReader != null)
- zzReader.close();
- }
-
-
/**
* Resets the scanner to read from a new input stream.
* Does not close the old reader.
@@ -378,24 +366,6 @@ private final void yyreset(java.io.Reader reader) {
}
- /**
- * Returns the current lexical state.
- */
- private final int yystate() {
- return zzLexicalState;
- }
-
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- private final void yybegin(int newState) {
- zzLexicalState = newState;
- }
-
-
/**
* Returns the text matched by the current regular expression.
*/
@@ -404,22 +374,6 @@ private final void yybegin(int newState) {
}
- /**
- * Returns the character at position pos from the
- * matched text.
- *
- * It is equivalent to yytext().charAt(pos), but faster
- *
- * @param pos the position of the character to fetch.
- * A value from 0 to yylength()-1.
- *
- * @return the character at position pos
- */
- private final char yycharat(int pos) {
- return zzBuffer[zzStartRead+pos];
- }
-
-
/**
* Returns the length of the matched text region.
*/
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerUserinfo.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerUserinfo.java
index c6c37ef7a32..3979cbb2996 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerUserinfo.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerUserinfo.java
@@ -356,18 +356,6 @@ private boolean zzRefill() throws java.io.IOException {
}
- /**
- * Closes the input stream.
- */
- private final void yyclose() throws java.io.IOException {
- zzAtEOF = true; /* indicate end of file */
- zzEndRead = zzStartRead; /* invalidate buffer */
-
- if (zzReader != null)
- zzReader.close();
- }
-
-
/**
* Resets the scanner to read from a new input stream.
* Does not close the old reader.
@@ -390,24 +378,6 @@ private final void yyreset(java.io.Reader reader) {
}
- /**
- * Returns the current lexical state.
- */
- private final int yystate() {
- return zzLexicalState;
- }
-
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- private final void yybegin(int newState) {
- zzLexicalState = newState;
- }
-
-
/**
* Returns the text matched by the current regular expression.
*/
@@ -416,22 +386,6 @@ private final void yybegin(int newState) {
}
- /**
- * Returns the character at position pos from the
- * matched text.
- *
- * It is equivalent to yytext().charAt(pos), but faster
- *
- * @param pos the position of the character to fetch.
- * A value from 0 to yylength()-1.
- *
- * @return the character at position pos
- */
- private final char yycharat(int pos) {
- return zzBuffer[zzStartRead+pos];
- }
-
-
/**
* Returns the length of the matched text region.
*/
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerXHost.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerXHost.java
index 119e287b060..d5cc345361e 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerXHost.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerXHost.java
@@ -367,18 +367,6 @@ private boolean zzRefill() throws java.io.IOException {
}
- /**
- * Closes the input stream.
- */
- private final void yyclose() throws java.io.IOException {
- zzAtEOF = true; /* indicate end of file */
- zzEndRead = zzStartRead; /* invalidate buffer */
-
- if (zzReader != null)
- zzReader.close();
- }
-
-
/**
* Resets the scanner to read from a new input stream.
* Does not close the old reader.
@@ -401,24 +389,6 @@ private final void yyreset(java.io.Reader reader) {
}
- /**
- * Returns the current lexical state.
- */
- private final int yystate() {
- return zzLexicalState;
- }
-
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- private final void yybegin(int newState) {
- zzLexicalState = newState;
- }
-
-
/**
* Returns the text matched by the current regular expression.
*/
@@ -427,22 +397,6 @@ private final void yybegin(int newState) {
}
- /**
- * Returns the character at position pos from the
- * matched text.
- *
- * It is equivalent to yytext().charAt(pos), but faster
- *
- * @param pos the position of the character to fetch.
- * A value from 0 to yylength()-1.
- *
- * @return the character at position pos
- */
- private final char yycharat(int pos) {
- return zzBuffer[zzStartRead+pos];
- }
-
-
/**
* Returns the length of the matched text region.
*/
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/Main.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/Main.java
index b5d5faeca39..63d09d543e4 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/Main.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/Main.java
@@ -116,29 +116,6 @@ private void iri() {
factory.useSpecificationIRI(true);
}
- private void uri() {
- used("URI", 0);
- factory.useSpecificationURI(true);
-
- }
-
- private void xml() {
- used("XML - systemID", 0);
- factory.useSpecificationXMLSystemID(true);
-
- }
-
- private void schema() {
- used("XML Schema - anyURI", 0);
- factory.useSpecificationXMLSchema(true);
-
- }
-
- private void xlink() {
- used("XLink - href attribute", 0);
- factory.useSpecificationXLink(true);
- }
-
/**
*
* @param string
@@ -153,13 +130,4 @@ private void used(String string, int i) {
specs = specs + ", " + string;
}
-
- private void rdf() {
- used("RDF URI Reference", 0);
- factory.useSpecificationRDF(true);
- }
-
- private void f(String file) {
-
- }
}
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/TestCreator.java b/jena-iri/src/test/java/org/apache/jena/iri/TestCreator.java
index 3009eadf87d..d35d2a53d8c 100644
--- a/jena-iri/src/test/java/org/apache/jena/iri/TestCreator.java
+++ b/jena-iri/src/test/java/org/apache/jena/iri/TestCreator.java
@@ -24,16 +24,11 @@
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.lang.reflect.InvocationTargetException;
-import java.util.Iterator;
-
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;
-import org.apache.jena.iri.IRI ;
import org.apache.jena.iri.IRIFactory ;
import org.apache.jena.iri.IRIRelativize ;
-import org.apache.jena.iri.Violation ;
-import org.apache.jena.iri.impl.AbsIRIImpl ;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
@@ -121,41 +116,6 @@ public void endElement(String arg1,
{
}
- private void uris(Attributes att) {
- }
-
- private void uri(Attributes att) {
- String absolute = att.getValue("absolute");
- String base = att.getValue("base");
- String relative = att.getValue("relative");
-
- doIt(absolute);
-
- if (base!=null) {
- out.println("");
- IRI b = doIt(base);
- IRI r = doIt(relative);
- out.println("");
- IRI result = b.create(r);
- doIt(result);
- out.println(" ");
- IRI rAgain = b.relativize(
- result,
- RelativizeFlags
- );
- if (r.equals(rAgain)) {
- out.println(" ");
- } else {
- out.println("");
- doIt(rAgain);
- out.println(" ");
- }
-
- out.println(" ");
- }
- }
-
-
static String methods[] = {
"getRawHost",
"getRawPath",
@@ -180,69 +140,6 @@ private void uri(Attributes att) {
"toASCIIString"
};
- private void doIt(IRI iri) {
- if (iri==null)
- return;
- for ( String m : methods )
- {
- try
- {
- Object r = IRI.class.getDeclaredMethod( m, nullSign ).invoke( iri, new Object[]{ } );
- if ( r == null )
- {
- out.println( "<" + m +
- " nullValue='true'/>" );
- }
- else
- {
- out.println( "<" + m +
- " value='" +
- substituteStandardEntities( r.toString() ) + "'/>" );
- }
-
-
- }
- catch ( IllegalArgumentException | NoSuchMethodException | IllegalAccessException | SecurityException e )
- {
- e.printStackTrace();
- }
- catch ( InvocationTargetException e )
- {
- Throwable t = e;
- if ( t.getCause() != null )
- {
- t = t.getCause();
- }
- String s = t.getMessage() != null ? t.getMessage() : t.toString();
- out.println( "<" + m +
- " exception='" +
- substituteStandardEntities( s ) + "'/>" );
- }
-
- }
-
- Iterator it = ((AbsIRIImpl)iri).allViolations();
- out.println("");
- while (it.hasNext()) {
- out.print("");
- out.print((it.next()).codeName());
- out.println(" ");
-
- }
- out.println(" ");
- }
-
- private IRI doIt(String iri) {
- if (iri==null)
- return null;
- IRI rslt =
- factory.create(iri);
-// empty.create(iri);
- out.println("");
- doIt(rslt);
- out.println(" ");
- return rslt;
- }
// TODO set conformance level for this factory
static IRIFactory factory = new IRIFactory();
static {
diff --git a/jena-iri/src/test/java/org/apache/jena/iri/TestMEIri.java b/jena-iri/src/test/java/org/apache/jena/iri/TestMEIri.java
index 1f3165412a6..5f37c0ea69b 100644
--- a/jena-iri/src/test/java/org/apache/jena/iri/TestMEIri.java
+++ b/jena-iri/src/test/java/org/apache/jena/iri/TestMEIri.java
@@ -26,9 +26,7 @@ public class TestMEIri extends TestMoreExamples {
static int count;
public TestMEIri(Attributes att) {
-// super(att.getValue("iri"),att);
- super(true? ( //"["+(++count)+"]" +
- att.getValue("iri").replaceAll("\n","\\\\n")) :( "iri"+(++count)),att);
+ super((att.getValue("iri").replaceAll("\n","\\\\n")),att);
}
@Override
diff --git a/jena-permissions/src/main/java/org/apache/jena/permissions/impl/SecuredItemImpl.java b/jena-permissions/src/main/java/org/apache/jena/permissions/impl/SecuredItemImpl.java
index d2bca9a23bd..656c456bfdc 100644
--- a/jena-permissions/src/main/java/org/apache/jena/permissions/impl/SecuredItemImpl.java
+++ b/jena-permissions/src/main/java/org/apache/jena/permissions/impl/SecuredItemImpl.java
@@ -131,7 +131,7 @@ public int hashCode()
// the maximum size of the cache
public static int MAX_CACHE = 100;
// the cache for this thread.
- public static final ThreadLocal CACHE = new ThreadLocal();
+ public static final ThreadLocal> CACHE = new ThreadLocal>();
// the number of times this thread has recursively called the constructor.
public static final ThreadLocal COUNT = new ThreadLocal();
@@ -207,7 +207,7 @@ public static void incrementUse()
final Integer i = SecuredItemImpl.COUNT.get();
if (i == null)
{
- SecuredItemImpl.CACHE.set(new LRUMap(Math.max(
+ SecuredItemImpl.CACHE.set(new LRUMap(Math.max(
SecuredItemImpl.MAX_CACHE, 100)));
SecuredItemImpl.COUNT.set( 1 );
}
@@ -302,7 +302,7 @@ public String toString() {
*/
private Boolean cacheGet( final CacheKey key )
{
- final LRUMap cache = SecuredItemImpl.CACHE.get();
+ final LRUMap, ?> cache = SecuredItemImpl.CACHE.get();
return (cache == null) ? null : (Boolean) cache.get(key);
}
@@ -313,7 +313,7 @@ private Boolean cacheGet( final CacheKey key )
*/
void cachePut( final CacheKey key, final boolean value )
{
- final LRUMap cache = SecuredItemImpl.CACHE.get();
+ final LRUMap cache = SecuredItemImpl.CACHE.get();
if (cache != null)
{
cache.put(key, value);
diff --git a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/GraphEventManagerTest.java b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/GraphEventManagerTest.java
index 4a99c5c6c59..ffb56044072 100644
--- a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/GraphEventManagerTest.java
+++ b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/GraphEventManagerTest.java
@@ -17,14 +17,12 @@
*/
package org.apache.jena.permissions.graph;
-import java.util.Arrays;
import java.util.Set;
import org.apache.jena.graph.Graph ;
import org.apache.jena.graph.GraphEventManager ;
import org.apache.jena.graph.NodeFactory ;
import org.apache.jena.graph.Triple ;
-import org.apache.jena.graph.impl.CollectionGraph ;
import org.apache.jena.permissions.Factory;
import org.apache.jena.permissions.MockSecurityEvaluator;
import org.apache.jena.permissions.SecurityEvaluator;
diff --git a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/MemGraphTest.java b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/MemGraphTest.java
index bc086b4bf9a..078584a3517 100644
--- a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/MemGraphTest.java
+++ b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/MemGraphTest.java
@@ -17,7 +17,6 @@
*/
package org.apache.jena.permissions.graph;
-import java.lang.reflect.Method;
import java.util.Set;
import org.apache.jena.graph.* ;
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/PatternTable.java b/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/PatternTable.java
index 57739eec18d..ab6e23eb2a0 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/PatternTable.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/PatternTable.java
@@ -29,7 +29,6 @@
import org.apache.jena.atlas.io.IndentedWriter;
import org.apache.jena.graph.Node ;
import org.apache.jena.sdb.core.SDBRequest ;
-import org.apache.jena.sdb.core.sqlexpr.SqlColumn ;
import org.apache.jena.sdb.core.sqlexpr.SqlExprList ;
import org.apache.jena.sdb.core.sqlnode.SqlNode ;
import org.apache.jena.sdb.core.sqlnode.SqlTable ;
@@ -129,43 +128,15 @@ public SqlNode build(SDBRequest request, SlotCompiler slotCompiler)
if ( ! Quad.isDefaultGraphGenerated(graphNode) )
log.error("Not the default graph in SqlStagePTable.build") ;
- if ( false )
- slotCompiler.processSlot(request, sqlTable, conditions, graphNode, subjColName) ;
slotCompiler.processSlot(request, sqlTable, conditions, subject, subjColName) ;
for ( Quad quad : tableQuads )
{
String colName = cols.get(quad.getPredicate()) ;
- SqlColumn col = new SqlColumn(sqlTable, colName) ;
Node obj = quad.getObject() ;
slotCompiler.processSlot(request, sqlTable, conditions, obj, colName) ;
}
- if ( false )
- {
- for ( Node pred : cols.keySet() )
- {
- int idx = tableQuads.findFirst(graphNode, subject, pred, null) ;
- if ( idx < 0 )
- {
- // Liberal
- continue ;
- //log.error("Can't find quad in SqlStagePTable.build") ;
- //throw new SDBException("SqlStagePTable.build") ;
- }
-
- Quad q = tableQuads.remove(idx) ;
-
- String colName = cols.get(pred) ;
- SqlColumn col = new SqlColumn(sqlTable, colName) ;
-
- Node obj = q.getObject() ;
- // if ( Var.isVar(obj) )
- // sqlTable.setIdColumnForVar(Var.alloc(obj), col) ;
-
- slotCompiler.processSlot(request, sqlTable, conditions, obj, colName) ;
- }
- }
return SqlBuilder.restrict(request, sqlTable, conditions) ;
}
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/SqlBuilder.java b/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/SqlBuilder.java
index 3654eb38fe4..a672c35cae2 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/SqlBuilder.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/SqlBuilder.java
@@ -172,14 +172,6 @@ private static SqlExpr makeOr(SqlExpr c, SqlExpr expr)
return new S_Or(c, expr) ;
}
- private static SqlExpr makeAnd(SqlExpr c, SqlExpr expr)
- {
- if ( c == null )
- return expr ;
-
- return new S_And(c, expr) ;
- }
-
private static SqlNode extractRestrict(SqlNode sqlNode, SqlExprList conditions)
{
// SqlSelectBlocks as simple restrictions.
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/TransformSDB.java b/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/TransformSDB.java
index e2bfda6f33c..2e83dcbc680 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/TransformSDB.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/TransformSDB.java
@@ -26,7 +26,6 @@
import java.util.List ;
import java.util.Set ;
-import org.apache.jena.atlas.iterator.Iter ;
import org.apache.jena.graph.Node ;
import org.apache.jena.sdb.core.AliasesSql ;
import org.apache.jena.sdb.core.SDBRequest ;
@@ -73,21 +72,7 @@ public Op transform(OpQuadPattern quadPattern)
@Override
public Op transform(OpJoin opJoin, Op left, Op right)
{
- // TEMPORARY FIX
- // Scoping problems.
- if ( true )
- return super.transform(opJoin, left, right) ;
-
- if ( ! SDB_QC.isOpSQL(left) || ! SDB_QC.isOpSQL(right) )
- return super.transform(opJoin, left, right) ;
- SqlNode sqlLeft = ((OpSQL)left).getSqlNode() ;
- SqlNode sqlRight = ((OpSQL)right).getSqlNode() ;
-
- // This is wrong. If right is more than single triple pattern,
- // the generated SQL wil attempt to use NodeTable lookups from the
- // LHS but they are out of scope.
-
- return new OpSQL(SqlBuilder.innerJoin(request, sqlLeft, sqlRight), opJoin, request) ;
+ return super.transform(opJoin, left, right) ;
}
@Override
@@ -115,12 +100,6 @@ public Op transform(OpLeftJoin opJoin, Op left, Op right)
Set scopes2 = toSet(filter(scopes.iterator(), ScopeEntry.OptionalFilter)) ;
Set leftOptVars = toSet(map(scopes2.iterator(), ScopeEntry::getVar)) ; // Vars from left optionals.
- if ( false )
- {
- Iter iter = Iter.iter(scopes) ;
- Set leftOptVars_ = iter.filter(ScopeEntry.OptionalFilter).map(ScopeEntry::getVar).toSet() ;
- }
-
// Find optional-on-right (easier - it's all variables)
Set rightOptVars = sqlRight.getIdScope().getVars() ;
@@ -303,9 +282,6 @@ static private OpSQL doBridge(SDBRequest request, OpSQL opSQL, List project
@Override
public Op transform(OpDatasetNames opDatasetNames)
{
- if ( false )
- return super.transform(opDatasetNames) ;
-
// Basically, an implementation of "GRAPH ?g {}"
Node g = opDatasetNames.getGraphNode() ;
if ( ! Var.isVar(g) )
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/rewrite/QuadBlockRewriteCompiler.java b/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/rewrite/QuadBlockRewriteCompiler.java
index 9b2f78f9716..bd1fa83ae67 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/rewrite/QuadBlockRewriteCompiler.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/rewrite/QuadBlockRewriteCompiler.java
@@ -41,8 +41,6 @@ public QuadBlockRewriteCompiler(SDBRequest request, QuadBlockCompiler baseCompil
public SqlNode compile(QuadBlock quads)
{
quads = qbr1.rewrite(request, quads) ;
- if ( false )
- quads = qbr2.rewrite(request, quads) ;
return baseCompiler.compile(quads) ;
}
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlDistinct.java b/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlDistinct.java
index 03c04c09fe7..33f7540bfc4 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlDistinct.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlDistinct.java
@@ -23,19 +23,6 @@
// Not used - may be removed
/*public*/ class SqlDistinct extends SqlNodeBase1
{
- private static SqlNode distinct(SqlNode sqlNode)
- {
- return null ;
- //return SqlSelectBlock.distinct(sqlNode) ;
-
-// SqlDistinct p = null ;
-// if ( sqlNode.isDistinct() )
-// p = sqlNode.asDistinct() ;
-// else
-// p = new SqlDistinct(sqlNode) ;
-// return p ;
- }
-
private SqlDistinct(SqlNode sqlNode)
{
super(null, sqlNode) ;
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlProject.java b/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlProject.java
index dbb03658c17..c42f0660330 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlProject.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlProject.java
@@ -36,23 +36,6 @@ public class SqlProject extends SqlNodeBase1
// ---- Factory methods
- /** make sure this node is a projection */
-
- // This is not quite SqlSelectBlock.
- /*public*/private static SqlNode project(SqlNode sqlNode)
- {
- return project(sqlNode, null) ;
- }
-
- /** make sure this node is a projection and add a column */
-
- /*public*/private static SqlNode project(SqlNode sqlNode, SqlColumn col, String colOutName)
- {
- SqlColumn asCol = new SqlColumn(null, colOutName) ;
- ColAlias colAlias = new ColAlias(col, asCol) ;
- return SqlProject.project(sqlNode, colAlias) ;
- }
-
/** make sure this node is a projection and add a column */
/*public*/public static SqlNode project(SqlNode sqlNode, ColAlias col)
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlRename.java b/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlRename.java
index eb987707847..8f1317331e6 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlRename.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlRename.java
@@ -22,9 +22,7 @@
import java.util.List;
import org.apache.jena.sdb.core.* ;
-import org.apache.jena.sdb.core.sqlexpr.SqlColumn ;
import org.apache.jena.sdb.shared.SDBInternalError ;
-import org.apache.jena.sparql.core.Var ;
/** SQL rename */
//Not used - may be removed
@@ -37,19 +35,6 @@
//---
- private /*public*/ static SqlNode view(String alias, SqlNode sqlNode)
- {
- // return SqlSelectBlock.view(sqlNode) ;
- return null ;
-// SqlTable table = new SqlTable(alias) ;
-// Generator gen = Gensym.create("X") ; // Column names. Not global.
-//
-// SqlRename rename = new SqlRename(table, sqlNode) ;
-// rename.merge(sqlNode.getIdScope(), rename.idScope, gen) ;
-// rename.merge(sqlNode.getNodeScope(), rename.nodeScope, gen) ;
-// return rename ;
- }
-
private SqlRename(SqlTable here, SqlNode sqlNode)
{
super(here.getAliasName(), sqlNode) ;
@@ -68,28 +53,6 @@ private SqlRename(SqlRename other)
this.columns = new ArrayList(other.columns) ;
}
- // Map all vars in the scope to names in the rename.
- private void merge(Scope scope, ScopeBase newScope, Generator gen)
- {
- String x = "" ;
- String sep = "" ;
-
- for ( ScopeEntry e : scope.findScopes() )
- {
- SqlColumn oldCol = e.getColumn() ;
- Var v = e.getVar() ;
- String colName = gen.next() ;
- SqlColumn newCol = new SqlColumn(vTable, colName) ;
- columns.add(new ColAlias(oldCol, newCol)) ;
- newScope.setColumnForVar(v, newCol) ;
- // Annotations
- x = String.format("%s%s%s:(%s=>%s)", x, sep, v, oldCol, newCol) ;
- sep = " " ;
- }
- if ( x.length() > 0 )
- addNote(x) ;
- }
-
@Override
public Scope getIdScope() { return idScope ; }
@Override
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlRestrict.java b/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlRestrict.java
index fe2c1de4e15..ff3e7f33276 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlRestrict.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlRestrict.java
@@ -27,49 +27,6 @@ public class SqlRestrict extends SqlNodeBase1
{
private SqlExprList conditions = new SqlExprList() ;
- private static SqlNode restrict(SqlNode sqlNode, SqlExpr condition)
- {
- // Consider just making a Restriction node
- // and do moving into Joins as part of relational algrebra tree optimizations
- // c.f. the Join creation code that also moving restrictions around.
-
- if ( sqlNode.isJoin() )
- {
- sqlNode.asJoin().addCondition(condition) ;
- return sqlNode ;
- }
-
- if ( sqlNode.isRestrict() )
- {
- // Already a restriction - add to the restrictions already in place
- sqlNode.asRestrict().conditions.add(condition) ;
- return sqlNode ;
- }
-
- return new SqlRestrict(sqlNode.getAliasName(), sqlNode, condition) ;
- }
-
- private static SqlNode restrict(SqlNode sqlNode, SqlExprList restrictions)
- {
- if ( restrictions.size() == 0 )
- return sqlNode ;
-
- if ( sqlNode.isJoin() )
- {
- sqlNode.asJoin().addConditions(restrictions);
- return sqlNode ;
- }
-
- if ( sqlNode.isRestrict() )
- {
- // Already a restriction - add to the restrictions already in place
- sqlNode.asRestrict().conditions.addAll(restrictions) ;
- return sqlNode ;
- }
-
- return new SqlRestrict(sqlNode.getAliasName(), sqlNode, restrictions) ;
- }
-
private SqlRestrict(SqlNode sqlNode, SqlExpr condition)
{
super(null, sqlNode) ;
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlTransformer.java b/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlTransformer.java
index d53eb0ce7ff..c453a8b7430 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlTransformer.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/core/sqlnode/SqlTransformer.java
@@ -71,27 +71,10 @@ private void visit2(SqlNodeBase2 n2)
stack.push(n2.apply(transform, left, right)) ;
}
- public void visit(SqlProject sqlProject)
- {
- sqlProject.getSubNode().visit(this) ;
- SqlNode s = stack.pop() ;
- SqlNode p = transform.transform(sqlProject, s) ;
- stack.push(p) ;
- }
-
- public void visit(SqlDistinct sqlDistinct)
- { visit1(sqlDistinct) ; }
-
- public void visit(SqlRestrict sqlRestrict)
- { visit1(sqlRestrict) ; }
-
@Override
public void visit(SqlTable sqlTable)
{ visit0(sqlTable) ; }
- public void visit(SqlRename sqlRename)
- { visit1(sqlRename) ; }
-
@Override
public void visit(SqlJoinInner sqlJoin)
{ visit2(sqlJoin) ; }
@@ -108,9 +91,6 @@ public void visit(SqlUnion sqlUnion)
public void visit(SqlCoalesce sqlCoalesce)
{ visit1(sqlCoalesce) ; }
- public void visit(SqlSlice sqlSlice)
- { visit1(sqlSlice) ; }
-
@Override
public void visit(SqlSelectBlock sqlSelectBlock)
{ visit1(sqlSelectBlock) ; }
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/graph/GraphSDB.java b/jena-sdb/src/main/java/org/apache/jena/sdb/graph/GraphSDB.java
index 45731e76368..72ee20f1ba7 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/graph/GraphSDB.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/graph/GraphSDB.java
@@ -119,35 +119,6 @@ else if ( graphNode.isURI() )
{ log.warn("Failed to get prefixes: "+ex.getMessage()) ; return null ; }
}
- private Quad quad(Triple m)
- {
- Node s = m.getMatchSubject() ;
- Var sVar = null ;
- if ( s == null )
- {
- sVar = Var.alloc("s") ;
- s = sVar ;
- }
-
- Node p = m.getMatchPredicate() ;
- Var pVar = null ;
- if ( p == null )
- {
- pVar = Var.alloc("p") ;
- p = pVar ;
- }
-
- Node o = m.getMatchObject() ;
- Var oVar = null ;
- if ( o == null )
- {
- oVar = Var.alloc("o") ;
- o = oVar ;
- }
-
- return new Quad(graphNode, s, p ,o) ;
- }
-
@Override
protected ExtendedIterator graphBaseFind(Triple m)
{
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleDB2.java b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleDB2.java
index 70056bd587c..86aa311910c 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleDB2.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleDB2.java
@@ -61,7 +61,6 @@ public void format()
reformatDataWorker() ;
}
- private void reformatPrefixesWorker() { reformatPrefixesWorker(false) ; }
private void reformatPrefixesWorker(boolean loadPrefixes)
{
try {
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleDerby.java b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleDerby.java
index 719638ec66e..0ff0d744ead 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleDerby.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleDerby.java
@@ -59,7 +59,6 @@ public void format()
reformatDataWorker() ;
}
- private void reformatPrefixesWorker() { reformatPrefixesWorker(false) ; }
private void reformatPrefixesWorker(boolean loadPrefixes)
{
try {
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleH2.java b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleH2.java
index a2955bd5b17..7815e13f8bf 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleH2.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleH2.java
@@ -62,7 +62,6 @@ public void format()
reformatDataWorker() ;
}
- private void reformatPrefixesWorker() { reformatPrefixesWorker(false) ; }
private void reformatPrefixesWorker(boolean loadPrefixes)
{
try {
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleHSQL.java b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleHSQL.java
index 436aa4fffb9..96ef34adafc 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleHSQL.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleHSQL.java
@@ -58,7 +58,6 @@ public void format()
reformatDataWorker() ;
}
- private void reformatPrefixesWorker() { reformatPrefixesWorker(false) ; }
private void reformatPrefixesWorker(boolean loadPrefixes)
{
try { // Assumed to be inside a transaction
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleMySQL.java b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleMySQL.java
index c03d529acc5..7f799aec452 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleMySQL.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleMySQL.java
@@ -69,7 +69,6 @@ public void format()
reformatDataWorker() ;
}
- private void reformatPrefixesWorker() { reformatPrefixesWorker(false) ; }
private void reformatPrefixesWorker(boolean loadPrefixes)
{
try {
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleOracle.java b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleOracle.java
index c66b65e7468..92eedffd227 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleOracle.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleOracle.java
@@ -61,7 +61,6 @@ public void format()
reformatDataWorker() ;
}
- private void reformatPrefixesWorker() { reformatPrefixesWorker(false) ; }
private void reformatPrefixesWorker(boolean loadPrefixes)
{
try {
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimplePGSQL.java b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimplePGSQL.java
index cc4380a4ceb..6262975b4c0 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimplePGSQL.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimplePGSQL.java
@@ -61,7 +61,6 @@ public void format()
reformatDataWorker() ;
}
- private void reformatPrefixesWorker() { reformatPrefixesWorker(false) ; }
private void reformatPrefixesWorker(boolean loadPrefixes)
{
try {
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleSAP.java b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleSAP.java
index 7a957fdea48..5b1d99c7f24 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleSAP.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleSAP.java
@@ -66,7 +66,6 @@ public void format()
reformatDataWorker() ;
}
- private void reformatPrefixesWorker() { reformatPrefixesWorker(false) ; }
private void reformatPrefixesWorker(boolean loadPrefixes)
{
try {
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleSQLServer.java b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleSQLServer.java
index c5b99ffd880..9a53e34bfc3 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleSQLServer.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/FormatterSimpleSQLServer.java
@@ -60,7 +60,6 @@ public void format()
reformatDataWorker() ;
}
- private void reformatPrefixesWorker() { reformatPrefixesWorker(false) ; }
private void reformatPrefixesWorker(boolean loadPrefixes)
{
try {
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/TupleLoaderBase.java b/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/TupleLoaderBase.java
index 2c9a60429c2..99db4cd07f8 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/TupleLoaderBase.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/TupleLoaderBase.java
@@ -371,39 +371,6 @@ private void ensureTempTables1() throws SQLException
finally { connection().setLogSQLExceptions(b) ; }
}
- // Pessimistic scheme - probe for table existence and create if necessary.
- // Need to cope with invisible temporary tables.
- private void ensureTempTables2() throws SQLException
- {
- try {
- // execSilent - because exceptions happen (e.g. systems that do not expose temporary tables to the DB metadata).
- if (!TableUtils.hasTable(connection().getSqlConnection(), getNodeLoader()))
- connection().execSilent(getCreateTempNodes());
- if (!TableUtils.hasTable(connection().getSqlConnection(), getTupleLoader()))
- connection().execSilent(getCreateTempTuples());
- } catch (SQLException e) {
- // Work around for MySQL issue, which won't say if temp table exists
- // This is also the case for MS Server SQL
- // Testing the message is as good as it gets without needing the DB-specific
- String msg = e.getMessage() ;
- String className = e.getClass().getName() ;
-
- boolean ignore = false ;
-
- // MS-SQL
- if ( className.equals("com.microsoft.sqlserver.jdbc.SQLServerException")
- && msg.matches("There is already an object named '#.*' in the database."))
- ignore = true ;
-
- // MySQL : com.mysql.jdbc.exceptions.MySQLSyntaxErrorException (at least in 5.0)
- if ( msg.matches("Table.*already exists") )
- ignore = true ;
-
- if ( ! ignore )
- throw e;
- }
- }
-
/* Encapsulate the gory internals of breaking up nodes for the database */
public static class PreparedNode
{
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/script/ScriptVocab.java b/jena-sdb/src/main/java/org/apache/jena/sdb/script/ScriptVocab.java
index fa7c33fcffd..a75c8260de4 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/script/ScriptVocab.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/script/ScriptVocab.java
@@ -19,7 +19,6 @@
package org.apache.jena.sdb.script;
import org.apache.jena.assembler.Assembler ;
-import org.apache.jena.rdf.model.Property ;
import org.apache.jena.rdf.model.Resource ;
import org.apache.jena.rdf.model.ResourceFactory ;
import org.apache.jena.sdb.assembler.AssemblerVocab ;
@@ -56,7 +55,4 @@ private static void assemblerClass(Resource r, Assembler a)
private static Resource type(String namespace, String localName)
{ return ResourceFactory.createResource(namespace+localName) ; }
-
- private static Property property(String namespace, String localName)
- { return ResourceFactory.createProperty(namespace+localName) ; }
}
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/store/SQLBridgeBase.java b/jena-sdb/src/main/java/org/apache/jena/sdb/store/SQLBridgeBase.java
index aa8fc0c7c00..bfaac534bb8 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/store/SQLBridgeBase.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/store/SQLBridgeBase.java
@@ -33,7 +33,6 @@
import org.apache.jena.sdb.core.sqlexpr.SqlColumn ;
import org.apache.jena.sdb.core.sqlnode.ColAlias ;
import org.apache.jena.sdb.core.sqlnode.SqlNode ;
-import org.apache.jena.sdb.shared.SDBInternalError ;
import org.apache.jena.sdb.sql.RS ;
import org.apache.jena.sdb.sql.ResultSetJDBC ;
import org.apache.jena.sdb.sql.SDBExceptionSQL ;
@@ -101,13 +100,6 @@ public QueryIterator assembleResults(ResultSetJDBC rs, Binding binding, Executio
return new QueryIterPlainWrapper(results.iterator(), execCxt) ;
}
- private void setProjectVars(Collection projectVars)
- {
- if ( this.projectVars != null )
- throw new SDBInternalError("SQLBridgeBase: Project vars already set") ;
- this.projectVars = projectVars ;
- }
-
protected SqlNode getSqlExprNode() { return sqlNodeOriginal ; }
@Override
public SqlNode getSqlNode() { return sqlNode ; }
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/store/StoreConfig.java b/jena-sdb/src/main/java/org/apache/jena/sdb/store/StoreConfig.java
index bfeb7187276..21a91e8ae6d 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/store/StoreConfig.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/store/StoreConfig.java
@@ -31,7 +31,6 @@
import org.apache.jena.rdf.model.Resource ;
import org.apache.jena.rdf.model.ResourceFactory ;
import org.apache.jena.sdb.sql.* ;
-import org.apache.jena.sparql.util.graph.GraphUtils ;
import org.apache.jena.util.FileUtils ;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -79,13 +78,6 @@ public List tables()
return TableUtils.getTableNames(connection().getSqlConnection()) ;
}
- private Resource getRoot()
- {
- Model model = getModel() ;
- return GraphUtils.getResourceByType(model, ConfigVocab.typeConfig) ;
- }
-
-
public void removeModel() { removeModel(defaultTag) ; }
public void removeModel(String tag)
{
@@ -213,13 +205,6 @@ void reset()
{ throw new SDBExceptionSQL("NamedString.reset", ex) ; }
}
- private void init()
- {
- if ( initialized )
- return ;
- // TODO prepare statements
- }
-
List tags()
{
ResultSetJDBC rs = null ;
diff --git a/jena-sdb/src/main/java/sdb/cmd/ModStore.java b/jena-sdb/src/main/java/sdb/cmd/ModStore.java
index 862e17dd291..b47b0c6b732 100644
--- a/jena-sdb/src/main/java/sdb/cmd/ModStore.java
+++ b/jena-sdb/src/main/java/sdb/cmd/ModStore.java
@@ -209,24 +209,6 @@ public void processArgs(CmdArgModule cmdLine)
//storeDesc.connDesc.initJDBC() ;
- if ( false )
- {
- //System.out.println("URL = " + storeDesc.connDesc.URL);
- System.out.println("Type = " + storeDesc.connDesc.getType());
- System.out.println("Host = " + storeDesc.connDesc.getHost());
- System.out.println("Database = " + storeDesc.connDesc.getName());
- System.out.println("User = " + storeDesc.connDesc.getUser());
- System.out.println("Password = " + storeDesc.connDesc.getPassword());
-// if ( storeDesc.connDesc.getArgStr() != null )
-// System.out.println("Args = " + storeDesc.connDesc.getArgStr());
-
- System.out.println("Layout = " + storeDesc.getLayout().getName()) ;
- //System.out.println("Name = " + argModelName);
-
- SDBConnection.logSQLExceptions = true ;
- SDBConnection.logSQLStatements = true ;
- }
-
if (cmdLine.contains(argDeclJdbcDriver))
{
String driverName = cmdLine.getArg(argDeclJdbcDriver).getValue();
diff --git a/jena-sdb/src/main/java/sdb/sdbquery.java b/jena-sdb/src/main/java/sdb/sdbquery.java
index 9068a7851bc..283385ac630 100644
--- a/jena-sdb/src/main/java/sdb/sdbquery.java
+++ b/jena-sdb/src/main/java/sdb/sdbquery.java
@@ -146,8 +146,6 @@ protected void execCmd(List positionalArgs)
if ( isVerbose() )
PrintSDB.print(((QueryExecutionBase)qExec).getPlan().getOp()) ;
- if ( false )
- System.err.println("Execute query for loop "+(i+1)+" "+memStr()) ;
QueryExecUtils.executeQuery(query, qExec, modResults.getResultsFormat()) ;
}
}
diff --git a/jena-sdb/src/test/java/sdb/test/TestI18N.java b/jena-sdb/src/test/java/sdb/test/TestI18N.java
index d99246a2a2b..ab8edd650da 100644
--- a/jena-sdb/src/test/java/sdb/test/TestI18N.java
+++ b/jena-sdb/src/test/java/sdb/test/TestI18N.java
@@ -90,24 +90,5 @@ public static Collection data()
return x ;
}
- private static String longString(String base, int len)
- {
- if ( base.length() == 0 )
- return base ;
-
- StringBuilder value = new StringBuilder() ;
- for ( int i = 0 ; i < len ; i++ )
- {
- value.append(base) ;
- if ( value.length() > len )
- break ;
- }
- // Trim.
- if ( value.length() > len )
- value = value.delete(len, value.length()) ;
-
- return value.toString() ;
- }
-
}
diff --git a/jena-spatial/src/main/java/examples/JenaSpatialExample1.java b/jena-spatial/src/main/java/examples/JenaSpatialExample1.java
index 1bdabee5f0f..69cc0161bdd 100644
--- a/jena-spatial/src/main/java/examples/JenaSpatialExample1.java
+++ b/jena-spatial/src/main/java/examples/JenaSpatialExample1.java
@@ -29,7 +29,6 @@
import org.apache.jena.rdf.model.ResourceFactory ;
import org.apache.jena.riot.RDFDataMgr ;
import org.apache.jena.sparql.util.QueryExecUtils ;
-import org.apache.jena.tdb.TDBFactory ;
import org.apache.lucene.store.Directory ;
import org.apache.lucene.store.FSDirectory ;
import org.slf4j.Logger ;
@@ -47,10 +46,7 @@ public class JenaSpatialExample1 {
private static final String LUCENE_TDB_PATH = "target/test/TDB";
private static final File LUCENE_TDB_DIR = new File(LUCENE_TDB_PATH);
- private static final String SOLR_DATA_PATH = "src/test/resources/SolrHome/SolrARQCollection/data";
- private static final File SOLR_DATA_DIR = new File(SOLR_DATA_PATH);
-
- public static void main(String... argv) throws IOException {
+ public static void main(String... argv) throws IOException {
Dataset spatialDataset = initInMemoryDatasetWithLuceneSpatitalIndex(LUCENE_INDEX_DIR);
//Dataset spatialDataset = initTDBDatasetWithLuceneSpatitalIndex(indexDir, TDBDir);
//Dataset spatialDataset = createLuceneAssembler() ;
@@ -101,16 +97,7 @@ private static Dataset initInMemoryDatasetWithLuceneSpatitalIndex(File indexDir)
return createDatasetByCode(indexDir);
}
- private static Dataset initTDBDatasetWithLuceneSpatitalIndex(File indexDir, File TDBDir) throws IOException{
- SpatialQuery.init();
- deleteOldFiles(indexDir);
- deleteOldFiles(TDBDir);
- indexDir.mkdirs();
- TDBDir.mkdir();
- return createDatasetByCode(indexDir, TDBDir);
- }
-
- private static void deleteOldFiles(File indexDir) {
+ private static void deleteOldFiles(File indexDir) {
if (indexDir.exists())
emptyAndDeleteDirectory(indexDir);
}
@@ -121,12 +108,6 @@ private static Dataset createDatasetByCode(File indexDir) throws IOException {
return joinDataset(ds1, indexDir);
}
- private static Dataset createDatasetByCode(File indexDir, File TDBDir) throws IOException {
- // Base data
- Dataset ds1 = TDBFactory.createDataset(TDBDir.getAbsolutePath());
- return joinDataset(ds1, indexDir);
- }
-
private static Dataset joinDataset(Dataset baseDataset, File indexDir) throws IOException{
EntityDefinition entDef = new EntityDefinition("entityField", "geoField");
diff --git a/jena-spatial/src/main/java/org/apache/jena/query/spatial/SpatialIndexSolr.java b/jena-spatial/src/main/java/org/apache/jena/query/spatial/SpatialIndexSolr.java
index 3cb02a59e07..b807edb61e8 100644
--- a/jena-spatial/src/main/java/org/apache/jena/query/spatial/SpatialIndexSolr.java
+++ b/jena-spatial/src/main/java/org/apache/jena/query/spatial/SpatialIndexSolr.java
@@ -22,7 +22,6 @@
import java.util.List ;
import org.apache.jena.graph.Node ;
-import org.apache.jena.sparql.util.NodeFactoryExtra ;
import org.apache.lucene.spatial.SpatialStrategy ;
import org.apache.lucene.spatial.prefix.RecursivePrefixTreeStrategy ;
import org.apache.lucene.spatial.prefix.tree.GeohashPrefixTree ;
@@ -162,11 +161,6 @@ public EntityDefinition getDocDef() {
return docDef;
}
- private Node entryToNode(String v) {
- // TEMP
- return NodeFactoryExtra.createLiteralNode(v, null, null);
- }
-
public SolrServer getServer() {
return solrServer;
}
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/TDBGraphAssembler.java b/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/TDBGraphAssembler.java
index ad3dc53b1c4..8c4c91abaef 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/TDBGraphAssembler.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/TDBGraphAssembler.java
@@ -27,9 +27,7 @@
import org.apache.jena.atlas.logging.Log ;
import org.apache.jena.query.Dataset ;
import org.apache.jena.rdf.model.* ;
-import org.apache.jena.riot.out.NodeFmtLib ;
import org.apache.jena.tdb.TDB ;
-import org.apache.jena.tdb.TDBException ;
import org.apache.jena.tdb.TDBFactory ;
import org.apache.jena.tdb.assembler.IndexAssembler ;
import org.apache.jena.tdb.base.file.Location ;
@@ -95,31 +93,5 @@ public Model open(Assembler a, Resource root, Mode mode)
throw ex ;
}
}
-
- //@Unused
- private void indexes(Resource root)
- {
- // ---- API ways
-
- StmtIterator sIter = root.listProperties(pIndex) ;
- while(sIter.hasNext())
- {
- RDFNode obj = sIter.nextStatement().getObject() ;
- if ( obj.isLiteral() )
- {
- String desc = ((Literal)obj).getString() ;
- System.out.printf("Index: %s\n", desc) ; System.out.flush();
- continue ;
- }
- throw new TDBException("Wrong format for tdb:index: should be a string: found: "+NodeFmtLib.displayStr(obj)) ;
- // Resource x = (Resource)obj ;
- // String desc = x.getProperty(pDescription).getString() ;
- // String file = x.getProperty(pFile).getString() ;
- // System.out.printf("Index: %s in file %s\n", desc, file) ; System.out.flush();
- }
-
- System.out.flush();
- throw new TDBException("Custom indexes turned off") ;
- }
}
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/Block.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/Block.java
index 2289f83df74..bc14994c942 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/Block.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/Block.java
@@ -18,11 +18,9 @@
package org.apache.jena.tdb.base.block;
-import java.io.ByteArrayOutputStream ;
-import java.io.PrintStream ;
import java.nio.ByteBuffer ;
-import org.apache.jena.atlas.lib.ByteBufferLib ;
+
// import tx.base.BlockRef ;
@@ -111,16 +109,8 @@ public void setUnderlyingByteBuffer(ByteBuffer underlyingByteBuffer)
public String toString()
{
ByteBuffer bb = getByteBuffer() ;
- if ( true )
- // Short form.
- return String.format("Block: %d (posn=%d, limit=%d, cap=%d)", id, bb.position(), bb.limit(), bb.capacity()) ;
- // Long form - with some bytes from the ByteBuffer.
- ByteArrayOutputStream out = new ByteArrayOutputStream() ;
- PrintStream x = new PrintStream(out) ;
- ByteBufferLib.print(x, bb) ;
- x.flush() ;
- String str = out.toString() ;
- return String.format("Block: %d %s", id, str) ;
+ // Short form.
+ return String.format("Block: %d (posn=%d, limit=%d, cap=%d)", id, bb.position(), bb.limit(), bb.capacity()) ;
}
/** Deep copy, including ByteBuffer contents into a HeapByteBuffer. */
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockMgrFreeChain.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockMgrFreeChain.java
index 7005c4fbc90..5eb8b396d3c 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockMgrFreeChain.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockMgrFreeChain.java
@@ -65,11 +65,6 @@ public boolean valid(int id)
return super.valid(id) ;
}
- private boolean isFree(int id)
- {
- return freeBlocks.contains(id) ;
- }
-
@Override
public void sync()
{
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockMgrTracker.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockMgrTracker.java
index 9d2f9ee0f9c..c61120e0280 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockMgrTracker.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockMgrTracker.java
@@ -424,11 +424,6 @@ private void info(String string)
log.info(msg(string)) ;
}
- private void warn(String string)
- {
- log.warn(msg(string)) ;
- }
-
private void error(String string)
{
log.error(msg(string)) ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/objectfile/ObjectFileStorage.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/objectfile/ObjectFileStorage.java
index 160383e9987..4803c20b832 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/objectfile/ObjectFileStorage.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/objectfile/ObjectFileStorage.java
@@ -263,19 +263,6 @@ private void flushOutputBuffer()
if ( writeBuffer == null ) return ;
if ( writeBuffer.position() == 0 ) return ;
- if ( false )
- {
- String x = getLabel() ;
- if ( x.contains("nodes") )
- {
- long x1 = filesize ;
- long x2 = writeBuffer.position() ;
- long x3 = x1 + x2 ;
- System.out.printf("Flush(%s) : %d/0x%04X (%d/0x%04X) %d/0x%04X\n", getLabel(), x1, x1, x2, x2, x3, x3) ;
- }
- }
-
- long location = filesize ;
writeBuffer.flip();
int x = file.write(writeBuffer) ;
filesize += x ;
@@ -445,13 +432,11 @@ protected boolean hasMore()
private class ObjectIterator implements Iterator>
{
- final private long start ;
final private long finish ;
private long current ;
public ObjectIterator(long start, long finish)
{
- this.start = start ;
this.finish = finish ;
this.current = start ;
}
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/objectfile/StringFile.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/objectfile/StringFile.java
index a0a49dd97c3..5548c3f5427 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/objectfile/StringFile.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/objectfile/StringFile.java
@@ -48,7 +48,6 @@ public long write(String str)
{
str = compress(str) ;
Block block = file.allocWrite(4*str.length()) ;
- int len = Bytes.toByteBuffer(str, block.getByteBuffer()) ;
block.getByteBuffer().flip() ;
file.completeWrite(block) ;
return block.getId() ;
@@ -128,14 +127,12 @@ public void handle(long fileIdx, String str)
}
private String compress(String str)
{
- if ( !compression || abbreviations == null ) return str ;
- return abbreviations.abbreviate(str) ;
+ return str ;
}
private String decompress(String x)
{
- if ( !compression || abbreviations == null ) return x ;
- return abbreviations.expand(x) ;
+ return x ;
}
}
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/page/PageBlockMgr.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/page/PageBlockMgr.java
index 47feced3718..678dda0b696 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/page/PageBlockMgr.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/page/PageBlockMgr.java
@@ -18,7 +18,6 @@
package org.apache.jena.tdb.base.page;
-import org.apache.jena.atlas.logging.Log ;
import org.apache.jena.tdb.base.block.Block ;
import org.apache.jena.tdb.base.block.BlockConverter ;
import org.apache.jena.tdb.base.block.BlockMgr ;
@@ -91,11 +90,6 @@ public void release(Page page)
blockMgr.release(block) ;
}
- private void warn(String string)
- {
- Log.warn(this, string) ;
- }
-
public void free(Page page)
{
Block block = page.getBackingBlock() ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/record/RecordFactory.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/record/RecordFactory.java
index db4e4b7a663..5919785ee2d 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/record/RecordFactory.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/record/RecordFactory.java
@@ -122,16 +122,6 @@ public Record buildFrom(ByteBuffer bb, int idx)
return create(key, value) ;
}
- private final void copyInto(byte[] dst, ByteBuffer src, int start, int length)
- {
- // Thread safe.
- for ( int i = 0 ; i < length ; i++ )
- dst[i] = src.get(start+i) ;
- // Would otherwise be ...
-// src.position(start) ;
-// src.get(dst, 0, length) ;
- }
-
public boolean hasValue() { return valueLength > 0 ; }
public int recordLength() { return keyLength + valueLength ; }
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeNode.java b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeNode.java
index fe05e913000..4266bd9cefa 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeNode.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeNode.java
@@ -1513,13 +1513,6 @@ private static boolean logging()
return BPlusTreeParams.logging(log) ;
}
- private void warning(String msg, Object... args)
- {
- msg = format(msg, args) ;
- System.out.println("Warning: "+msg) ;
- System.out.flush();
- }
-
private void error(String msg, Object... args)
{
msg = format(msg, args) ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTree.java b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTree.java
index 28636bef51a..70ccb92f3c1 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTree.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTree.java
@@ -253,11 +253,6 @@ private void releaseRoot(BPTreeNode rootNode)
rootNode.release() ;
}
- private void setRoot(BPTreeNode node)
- {
- //root = node ;
- }
-
/** Get the parameters describing this B+Tree */
public BPlusTreeParams getParams() { return bpTreeParams ; }
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTreeRewriterUtils.java b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTreeRewriterUtils.java
index d414a009cb8..4cbc75ad459 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTreeRewriterUtils.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTreeRewriterUtils.java
@@ -64,24 +64,6 @@ static Iterator> summarizeIndexBlocks(Iterator> printDataBlocks(Iterator> iter, RecordBufferPageMgr recordPageMgr)
- {
- divider() ;
- List> x = Iter.toList(iter) ;
- System.out.printf(">>Packed data blocks\n") ;
- for (Pair pair : x )
- {
- System.out.printf(" %s\n",pair) ;
- RecordBufferPage rbp = recordPageMgr.getRead(pair.car()) ;
- //System.out.printf("RecordBufferPage[id=%d,link=%d] %d\n", rbp.getId(), rbp.getLink(), rbp.getCount() ) ;
- System.out.println(rbp) ;
- recordPageMgr.release(rbp) ;
- }
- System.out.printf("<> printIndexBlocks(Iterator> iter2, BPTreeNodeMgr bptNodeMgr)
{
divider() ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTreeTools.java b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTreeTools.java
deleted file mode 100644
index 7e7338732af..00000000000
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTreeTools.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.jena.tdb.index.bplustree;
-
-import java.io.IOException ;
-import java.io.RandomAccessFile ;
-import java.nio.ByteBuffer ;
-import java.nio.channels.FileChannel ;
-
-import org.apache.jena.atlas.lib.ByteBufferLib ;
-import org.apache.jena.tdb.base.block.BlockMgr ;
-import org.apache.jena.tdb.base.block.BlockMgrFactory ;
-import org.apache.jena.tdb.base.buffer.RecordBuffer ;
-import org.apache.jena.tdb.base.record.RecordFactory ;
-import org.apache.jena.tdb.base.recordbuffer.RecordBufferPage ;
-import org.apache.jena.tdb.base.recordbuffer.RecordBufferPageMgr ;
-import org.apache.jena.tdb.sys.SystemTDB ;
-
-/** Tools for working with B+Trees and datastructures associated with them, rather directly */
-class BPlusTreeTools
-{
-
- /*public*/private static void binDump(String filename)
- {
- try(RandomAccessFile fh = new RandomAccessFile(filename, "r")) {
- ByteBuffer bb = ByteBuffer.allocate(8*1024) ;
- FileChannel ch = fh.getChannel() ;
- int idx = 0 ;
- while(true)
- {
- int x = ch.read(bb) ;
- if ( x < 0 )
- break ;
- ByteBufferLib.print(bb) ;
- bb.clear() ;
- }
- } catch (IOException ex)
- {
- ex.printStackTrace();
- }
- }
-
- /** Scan/dump a file of RecordBuffers */
- /*public*/private static void bpt_scan_record_buffer(String filename, boolean verbose)
- {
- BlockMgr blkMgr = BlockMgrFactory.createStdFileNoCache(filename, SystemTDB.BlockSize) ;
- bpt_scan_record_buffer(blkMgr, verbose) ;
- blkMgr.close();
- }
-
- /*public*/private static void bpt_scan_record_buffer(BPlusTree bpt, boolean verbose)
- {
- bpt_scan_record_buffer(bpt.getRecordsMgr().getBlockMgr(), verbose) ;
- }
-
- /*public*/private static void bpt_scan_record_buffer(BlockMgr blkMgr, boolean verbose)
- {
- RecordFactory f = SystemTDB.indexRecordTripleFactory ;
- RecordBufferPageMgr recordPageMgr = new RecordBufferPageMgr(f, blkMgr) ;
- bpt_scan_record_buffer(recordPageMgr,verbose) ;
- }
-
-
- /*public*/private static void bpt_scan_record_buffer(RecordBufferPageMgr recordPageMgr, boolean verbose)
- {
- System.out.print("[Scan Records] start\n") ;
- int idx = 0 ;
- int n = 0 ;
- int total = 0 ;
- if ( verbose ) System.out.printf("recordPageMgr = %s\n", recordPageMgr) ;
-
- // Blocks in scan order
- try {
- while ( idx >= 0 )
- {
- if ( verbose ) System.out.printf("idx = %d\n", idx) ;
- RecordBufferPage page = recordPageMgr.getRead(idx) ;
- if ( verbose ) System.out.printf("%04d :: id=%04d -> link=%04d [count=%d, max=%d]\n", n, page.getId(), page.getLink(), page.getCount(), page.getMaxSize()) ;
- RecordBuffer rb = page.getRecordBuffer() ;
- if ( verbose ) System.out.printf(" :: %d %d\n", rb.getSize(), rb.maxSize() ) ;
- total += rb.size();
- idx = page.getLink() ;
- n++ ;
- recordPageMgr.release(page) ;
- }
- } catch (Exception ex)
- {
- System.out.println("Exception: "+ex) ;
- }
-
- System.out.printf("[Scan Records] Count = %d in %d blocks (avg: %.2f)\n", total, n, ((float)total)/n) ;
- }
-
-// /*public*/private static void bpt_scan_nodes(String filename, boolean verbose)
-// {
-// RecordFactory f = FactoryGraphTDB.indexRecordTripleFactory ;
-// BPlusTree.
-// BlockMgr blkMgr = BlockMgrFactory.createStdFileNoCache(filename, SystemTDB.BlockSize) ;
-// bpt_scan_nodes(bpt, blkMgr, verbose) ;
-// blkMgr.close();
-// }
-
- /*public*/private static void bpt_scan_nodes(BPlusTree bpt, boolean verbose)
- {
- System.out.print("[Scan Nodes] start\n") ;
- RecordFactory f = SystemTDB.indexRecordTripleFactory ;
- BPTreeNodeMgr nodeMgr = new BPTreeNodeMgr(bpt, bpt.getNodeManager().getBlockMgr()) ;
-
- int idx = 0 ;
- int n = 0 ;
- int total = 0 ;
- if ( verbose ) System.out.printf("BPTreeNodeMgr = %s\n", nodeMgr) ;
-
- // Blocks in file order
- try {
- while ( idx >= 0 )
- {
- if ( verbose ) System.out.printf("idx = %d\n", idx) ;
-
- BPTreeNode node = nodeMgr.getRead(idx, 0) ;
- if ( node == null )
- break ;
- System.out.println(node) ;
-
- // if ( verbose )
- // System.out.printf("%04d :: id=%04d -> link=%04d [count=%d, max=%d]\n", n, page.getId(), page.getLink(), page.getCount(), page.getMaxSize()) ;
- n++ ;
- idx ++ ;
- nodeMgr.release(node) ;
- }
- } catch (Exception ex)
- {
- System.out.println("Exception: "+ex) ;
- ex.printStackTrace() ;
- }
-
- System.out.printf("[Scan Nodes] Count = %d in %d blocks (avg: %.2f)\n", total, n, ((float)total)/n) ;
- }
-
-}
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/index/ext/ExtHash.java b/jena-tdb/src/main/java/org/apache/jena/tdb/index/ext/ExtHash.java
index f66b37ee657..4bd324dddbc 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/index/ext/ExtHash.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/index/ext/ExtHash.java
@@ -114,8 +114,6 @@ public ExtHash(PlainFile dictionaryBackingFile,
RecordFactory recordFactory, BlockMgr blockMgrHashBuckets)
{
this.dictionaryFile = dictionaryBackingFile ;
- // Start bigger?
- int dictionarySize = 1 ;
dictionary = dictionaryFile.ensure(SystemTDB.SizeOfInt).asIntBuffer() ;
this.recordFactory = recordFactory ;
@@ -208,12 +206,7 @@ private int bucketId(Record key, int bitLen)
int x = trieKey(trieKey(key), bitLen) ;
int id = dictionary.get(x) ;
return id ;
- }
-
- /** Size of the file, in bytes */
- private static long filesize(int dictionarySize) { return 4L*dictionarySize ; }
-
- // =====================
+ }
private void resizeDictionary()
{
@@ -245,8 +238,6 @@ private void resizeDictionary()
if ( logging() )
{
- if ( false ) dump() ;
- if ( false ) log(this) ;
log("<<< dumpedNodeTables = new HashSet<>() ;
-
-
if ( true )
{
System.out.print("## Node Table\n") ;
@@ -68,14 +65,6 @@ public static void dump(Dataset ds)
dumpNodeTable(nodeTupleTableQuads.getNodeTable(), dumpedNodeTables) ;
}
- if ( false )
- {
- System.out.print("## Triple Table\n") ;
- dumpNodeTupleTable(nodeTupleTableTriples.getTupleTable()) ;
- System.out.print("## Quad Table\n") ;
- dumpNodeTupleTable(nodeTupleTableQuads.getTupleTable()) ;
- }
-
// Indexes.
if ( true )
{
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/setup/DatasetBuilderBasic.java b/jena-tdb/src/main/java/org/apache/jena/tdb/setup/DatasetBuilderBasic.java
index c52e3be55d0..8f1ca98ed85 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/setup/DatasetBuilderBasic.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/setup/DatasetBuilderBasic.java
@@ -18,24 +18,11 @@
package org.apache.jena.tdb.setup;
-import org.apache.jena.atlas.lib.ColumnMap ;
-import org.apache.jena.atlas.lib.StrUtils ;
-import org.apache.jena.query.ARQ ;
-import org.apache.jena.sparql.engine.main.QC ;
-import org.apache.jena.sparql.engine.optimizer.reorder.ReorderTransformation ;
-import org.apache.jena.tdb.TDBException ;
import org.apache.jena.tdb.base.file.FileSet ;
import org.apache.jena.tdb.base.file.Location ;
import org.apache.jena.tdb.index.IndexBuilder ;
import org.apache.jena.tdb.index.RangeIndexBuilder ;
-import org.apache.jena.tdb.solver.OpExecutorTDB1 ;
-import org.apache.jena.tdb.store.* ;
import org.apache.jena.tdb.store.nodetable.NodeTable ;
-import org.apache.jena.tdb.store.nodetupletable.NodeTupleTable ;
-import org.apache.jena.tdb.store.nodetupletable.NodeTupleTableConcrete ;
-import org.apache.jena.tdb.store.tupletable.TupleIndex ;
-import org.apache.jena.tdb.sys.DatasetControl ;
-import org.apache.jena.tdb.sys.DatasetControlMRSW ;
import org.slf4j.Logger ;
import org.slf4j.LoggerFactory ;
@@ -49,50 +36,12 @@
private static final Logger log = LoggerFactory.getLogger(DatasetBuilderBasic.class) ;
private NodeTableBuilder nodeTableBuilder ;
- private TupleIndexBuilder tupleIndexBuilder ;
private StoreParams params ;
private /*public*/ DatasetBuilderBasic(IndexBuilder indexBuilder, RangeIndexBuilder rangeIndexBuilder)
{
ObjectFileBuilder objectFileBuilder = new BuilderStdDB.ObjectFileBuilderStd() ;
nodeTableBuilder = new BuilderStdDB.NodeTableBuilderStd(indexBuilder, objectFileBuilder) ;
- tupleIndexBuilder = new BuilderStdDB.TupleIndexBuilderStd(rangeIndexBuilder) ;
- }
-
- //@Override public
- private DatasetGraphTDB build(Location location, StoreParams config)
- {
- DatasetControl policy = createConcurrencyPolicy() ;
-
- params = config ;
- if ( config == null )
- params = StoreParams.getDftStoreParams() ;
-
- NodeTable nodeTable = makeNodeTable(location, params.getIndexNode2Id(), params.getIndexId2Node(),
- -1, -1, -1) ; // No caches
- // Small caches
- //10, 1000, 10) ;
- //params.Node2NodeIdCacheSize, params.NodeId2NodeCacheSize, params.NodeMissCacheSize) ;
-
- //nodeTable = new NodeTableLogger(null, nodeTable) ;
-
- TripleTable tripleTable = makeTripleTable(location, nodeTable, policy) ;
- QuadTable quadTable = makeQuadTable(location, nodeTable, policy) ;
- DatasetPrefixesTDB prefixes = makePrefixTable(location, policy) ;
- ReorderTransformation transform = chooseReorderTransformation(location) ;
-
- DatasetGraphTDB dsg = new DatasetGraphTDB(tripleTable, quadTable, prefixes, transform, null) ;
- // TDB does filter placement on BGPs itself.
- dsg.getContext().set(ARQ.optFilterPlacementBGP, false);
- QC.setFactory(dsg.getContext(), OpExecutorTDB1.OpExecFactoryTDB) ;
- return dsg ;
- }
-
- private DatasetControl createConcurrencyPolicy() { return new DatasetControlMRSW() ; }
-
- private ReorderTransformation chooseReorderTransformation(Location location)
- {
- return DatasetBuilderStd.chooseOptimizer(location) ;
}
protected NodeTable makeNodeTable(Location location, String indexNode2Id, String indexId2Node,
@@ -103,95 +52,4 @@ protected NodeTable makeNodeTable(Location location, String indexNode2Id, String
NodeTable nt = nodeTableBuilder.buildNodeTable(fsNodeToId, fsId2Node, params) ;
return nt ;
}
-
- // ======== Dataset level
- private TripleTable makeTripleTable(Location location, NodeTable nodeTable, DatasetControl policy)
- {
- String primary = params.getPrimaryIndexTriples() ;
- String[] indexes = params.getTripleIndexes() ;
-
- if ( indexes.length != 3 )
- error(log, "Wrong number of triple table indexes: "+StrUtils.strjoin(",", indexes)) ;
- log.debug("Triple table: "+primary+" :: "+StrUtils.strjoin(",", indexes)) ;
-
- TupleIndex tripleIndexes[] = makeTupleIndexes(location, primary, indexes) ;
-
- if ( tripleIndexes.length != indexes.length )
- error(log, "Wrong number of triple table tuples indexes: "+tripleIndexes.length) ;
- TripleTable tripleTable = new TripleTable(tripleIndexes, nodeTable, policy) ;
- return tripleTable ;
- }
-
- private QuadTable makeQuadTable(Location location, NodeTable nodeTable, DatasetControl policy)
- {
- String primary = params.getPrimaryIndexQuads() ;
- String[] indexes = params.getQuadIndexes() ;
-
- if ( indexes.length != 6 )
- error(log, "Wrong number of quad table indexes: "+StrUtils.strjoin(",", indexes)) ;
-
- log.debug("Quad table: "+primary+" :: "+StrUtils.strjoin(",", indexes)) ;
-
- TupleIndex quadIndexes[] = makeTupleIndexes(location, primary, indexes) ;
- if ( quadIndexes.length != indexes.length )
- error(log, "Wrong number of quad table tuples indexes: "+quadIndexes.length) ;
- QuadTable quadTable = new QuadTable(quadIndexes, nodeTable, policy) ;
- return quadTable ;
- }
-
- private DatasetPrefixesTDB makePrefixTable(Location location, DatasetControl policy)
- {
- String primary = params.getPrimaryIndexPrefix() ;
- String[] indexes = params.getPrefixIndexes() ;
-
- TupleIndex prefixIndexes[] = makeTupleIndexes(location, primary, indexes, new String[]{params.getIndexPrefix()}) ;
- if ( prefixIndexes.length != 1 )
- error(log, "Wrong number of triple table tuples indexes: "+prefixIndexes.length) ;
-
- String pnNode2Id = params.getPrefixNode2Id() ;
- String pnId2Node = params.getPrefixId2Node() ;
-
- // No cache - the prefix mapping is a cache
- NodeTable prefixNodes = makeNodeTable(location, pnNode2Id, pnId2Node, -1, -1, -1) ;
- NodeTupleTable prefixTable = new NodeTupleTableConcrete(primary.length(),
- prefixIndexes,
- prefixNodes, policy) ;
- DatasetPrefixesTDB prefixes = new DatasetPrefixesTDB(prefixTable) ;
- log.debug("Prefixes: "+primary+" :: "+StrUtils.strjoin(",", indexes)) ;
- return prefixes ;
- }
-
- private TupleIndex[] makeTupleIndexes(Location location, String primary, String[] indexNames)
- {
- return makeTupleIndexes(location, primary, indexNames, indexNames) ;
- }
-
- private TupleIndex[] makeTupleIndexes(Location location, String primary, String[] indexNames, String[] filenames)
- {
- if ( primary.length() != 3 && primary.length() != 4 )
- error(log, "Bad primary key length: "+primary.length()) ;
-
- int indexRecordLen = primary.length()*NodeId.SIZE ;
- TupleIndex indexes[] = new TupleIndex[indexNames.length] ;
- for (int i = 0 ; i < indexes.length ; i++)
- indexes[i] = makeTupleIndex(location, filenames[i], primary, indexNames[i]) ;
- return indexes ;
- }
-
- // ----
- private TupleIndex makeTupleIndex(Location location, String name, String primary, String indexOrder)
- {
- // Commonly, name == indexOrder.
- // FileSet
- FileSet fs = new FileSet(location, name) ;
- ColumnMap colMap = new ColumnMap(primary, indexOrder) ;
- return tupleIndexBuilder.buildTupleIndex(fs, colMap, indexOrder, params) ;
- }
-
- private static void error(Logger log, String msg)
- {
- if ( log != null )
- log.error(msg) ;
- throw new TDBException(msg) ;
- }
}
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/setup/DatasetBuilderStd.java b/jena-tdb/src/main/java/org/apache/jena/tdb/setup/DatasetBuilderStd.java
index 543baf0b1ae..cbc90534ef5 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/setup/DatasetBuilderStd.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/setup/DatasetBuilderStd.java
@@ -20,7 +20,6 @@
import java.io.File ;
import java.io.FileFilter ;
-import java.util.Collections ;
import java.util.HashMap ;
import java.util.Map ;
@@ -225,10 +224,6 @@ private synchronized DatasetGraphTDB buildWorker(Location location, boolean writ
return dsg ;
}
- private static Map freeze(Map map) {
- return Collections.unmodifiableMap(new HashMap<>(map)) ;
- }
-
protected DatasetControl createConcurrencyPolicy() {
return new DatasetControlMRSW() ;
}
@@ -351,16 +346,6 @@ private static void error(Logger log, String msg) {
throw new TDBException(msg) ;
}
- private static int parseInt(String str, String messageBase) {
- try {
- return Integer.parseInt(str) ;
- }
- catch (NumberFormatException ex) {
- error(log, messageBase + ": " + str) ;
- return -1 ;
- }
- }
-
/**
* Set the global flag that control the "No BGP optimizer" warning. Set to
* false to silence the warning
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/solver/SolverLib.java b/jena-tdb/src/main/java/org/apache/jena/tdb/solver/SolverLib.java
index cf813e10b74..5e1783ed4ef 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/solver/SolverLib.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/solver/SolverLib.java
@@ -37,7 +37,6 @@
import org.apache.jena.sparql.engine.QueryIterator ;
import org.apache.jena.sparql.engine.binding.Binding ;
import org.apache.jena.sparql.engine.binding.BindingFactory ;
-import org.apache.jena.sparql.engine.binding.BindingMap ;
import org.apache.jena.sparql.engine.iterator.QueryIterNullIterator ;
import org.apache.jena.tdb.TDBException ;
import org.apache.jena.tdb.lib.NodeLib ;
@@ -47,14 +46,10 @@
import org.apache.jena.tdb.store.nodetable.NodeTable ;
import org.apache.jena.tdb.store.nodetupletable.NodeTupleTable ;
import org.apache.jena.tdb.sys.TDBInternal ;
-import org.slf4j.Logger ;
-import org.slf4j.LoggerFactory ;
/** Utilities used within the TDB BGP solver : local TDB store */
public class SolverLib
{
- private static Logger log = LoggerFactory.getLogger(SolverLib.class) ;
-
/** Non-reordering execution of a basic graph pattern, given a iterator of bindings as input */
public static QueryIterator execute(GraphTDB graph, BasicPattern pattern,
QueryIterator input, Predicate> filter,
@@ -130,15 +125,6 @@ private static QueryIterator execute(NodeTupleTable nodeTupleTable, Node graphNo
chain = makeAbortable(chain, killList) ;
}
- // DEBUG POINT
- if ( false )
- {
- if ( chain.hasNext())
- chain = Iter.debug(chain) ;
- else
- System.out.println("No results") ;
- }
-
// Timeout wrapper ****
// QueryIterTDB gets called async.
// Iter.abortable?
@@ -212,19 +198,7 @@ public static Iterator solve(NodeTupleTable nodeTupleTable,
}
public static Binding convToBinding(BindingNodeId bindingNodeIds, NodeTable nodeTable) {
- if ( true )
- return new BindingTDB(bindingNodeIds, nodeTable) ;
- else {
- // Makes nodes immediately. Causing unnecessary NodeTable accesses
- // (e.g. project)
- BindingMap b = BindingFactory.create() ;
- for (Var v : bindingNodeIds) {
- NodeId id = bindingNodeIds.get(v) ;
- Node n = nodeTable.getNodeForNodeId(id) ;
- b.add(v, n) ;
- }
- return b ;
- }
+ return new BindingTDB(bindingNodeIds, nodeTable) ;
}
// Transform : Binding ==> BindingNodeId
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageMatchTuple.java b/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageMatchTuple.java
index 398502e4a9f..0fcf9b9923a 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageMatchTuple.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageMatchTuple.java
@@ -20,7 +20,6 @@
import java.util.Iterator;
-import java.util.List;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
@@ -139,21 +138,6 @@ protected Iterator makeNextStage(final BindingNodeId input)
return Iter.iter(iterMatches).map(binder).removeNulls() ;
}
- private static Iterator> print(Iterator> iter)
- {
- if ( ! iter.hasNext() )
- System.err.println("") ;
- else
- {
- List> r = Iter.toList(iter) ;
- String str = Iter.asString(r, "\n") ;
- System.err.println(str) ;
- // Reset iter
- iter = Iter.iter(r) ;
- }
- return iter ;
- }
-
private static boolean reject(BindingNodeId output , Var var, NodeId value)
{
if ( ! output.containsKey(var) )
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoadMonitor.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoadMonitor.java
index 08deca6f15a..1183170d508 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoadMonitor.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoadMonitor.java
@@ -23,7 +23,6 @@
import org.apache.jena.atlas.lib.DateTimeUtils ;
import org.apache.jena.atlas.lib.Timer ;
import org.apache.jena.sparql.core.DatasetGraph ;
-import org.apache.jena.sparql.util.StringUtils ;
import org.slf4j.Logger ;
public final class LoadMonitor
@@ -265,14 +264,4 @@ private static boolean tickPoint(long counter, long quantum)
return counter%quantum == 0 ;
}
- private static String num(long v)
- {
- return StringUtils.str(v) ;
- }
-
- private static String num(float value)
- {
- return StringUtils.str(value) ;
- }
-
}
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java
index 3307f1d7f1d..d3ff3b1ef8c 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java
@@ -196,20 +196,5 @@ static void copyIndex(Iterator> srcIter, TupleIndex[] destIndexes,
monitor.finishIndex(label) ;
}
-
-
- static private void sync(TupleIndex[] indexes)
- {
- for ( TupleIndex idx : indexes )
- {
- if ( idx != null )
- idx.sync() ;
- }
- }
-
- private static boolean tickPoint(long counter, long quantum)
- {
- return counter%quantum == 0 ;
- }
}
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/RecordsFromInput.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/RecordsFromInput.java
index 7b58f2b69dd..10fa85cfcbc 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/RecordsFromInput.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/RecordsFromInput.java
@@ -20,7 +20,6 @@
import java.io.IOException ;
import java.io.InputStream ;
-import java.io.PrintStream ;
import java.util.Iterator ;
import java.util.NoSuchElementException ;
@@ -104,25 +103,6 @@ public boolean hasNext()
return true ;
}
- private static void printRecord(PrintStream out, Record r, int keyUnitLen)
- {
- int keySubLen = r.getKey().length/keyUnitLen ;
- for ( int i = 0 ; i < keyUnitLen ; i++ )
- {
- if ( i != 0 )
- out.print(" ") ;
-
- // Print in chunks
- int k = i*keySubLen ;
- for ( int j = k ; j < k+keySubLen ; j++ )
- out.printf("%02x", r.getKey()[j]) ;
-
-// long x = Bytes.getLong(r.getKey(), i*SystemTDB.SizeOfNodeId) ;
-// System.out.printf("%016x", x) ;
- }
- out.println() ;
- }
-
private int fill()
{
try {
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetable/NodeTableCache.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetable/NodeTableCache.java
index 8507a82794c..d6a661e2519 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetable/NodeTableCache.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetable/NodeTableCache.java
@@ -20,14 +20,12 @@
import java.util.Iterator ;
-import org.apache.jena.atlas.iterator.Iter ;
import org.apache.jena.atlas.lib.Cache ;
import org.apache.jena.atlas.lib.CacheFactory ;
import org.apache.jena.atlas.lib.CacheSet ;
import org.apache.jena.atlas.lib.Pair ;
import org.apache.jena.atlas.logging.Log ;
import org.apache.jena.graph.Node ;
-import org.apache.jena.tdb.TDBException ;
import org.apache.jena.tdb.setup.StoreParams ;
import org.apache.jena.tdb.store.NodeId ;
@@ -251,39 +249,9 @@ public synchronized void close()
@Override
public Iterator> all()
{
- if ( false )
- testForConsistency() ;
return baseTable.all() ;
}
- private void testForConsistency()
- {
- Iterator iter1 = Iter.toList(node2id_Cache.keys()).iterator() ;
-
- for ( ; iter1.hasNext() ; )
- {
- Node n = iter1.next() ;
-
- NodeId nId = node2id_Cache.getIfPresent(n) ;
- if ( !id2node_Cache.containsKey(nId) )
- throw new TDBException("Inconsistent: "+n+" => "+nId) ;
- if ( notPresent.contains(n) )
- throw new TDBException("Inconsistent: "+n+" in notPresent cache (1)") ;
- }
- Iterator iter2 = Iter.toList(id2node_Cache.keys()).iterator() ;
- for ( ; iter2.hasNext() ; )
- {
- NodeId nId = iter2.next() ;
- Node n = id2node_Cache.getIfPresent(nId) ;
- if ( !node2id_Cache.containsKey(n) )
- throw new TDBException("Inconsistent: "+nId+" => "+n) ;
- if ( notPresent.contains(n) )
- throw new TDBException("Inconsistent: "+n+" in notPresent cache (2)") ;
- }
-
-
- }
-
@Override
public String toString() { return "Cache("+baseTable.toString()+")" ; }
}
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetable/NodecLib.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetable/NodecLib.java
deleted file mode 100644
index 49be0eced35..00000000000
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetable/NodecLib.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.jena.tdb.store.nodetable;
-
-import org.apache.jena.atlas.lib.StrUtils ;
-import org.apache.jena.atlas.logging.Log ;
-import org.apache.jena.graph.Node ;
-import org.apache.jena.graph.NodeFactory ;
-import org.apache.jena.rdf.model.AnonId ;
-import org.apache.jena.riot.out.NodeFmtLib ;
-import org.apache.jena.shared.PrefixMapping ;
-import org.apache.jena.sparql.sse.SSE ;
-import org.apache.jena.sparql.sse.SSEParseException ;
-import org.apache.jena.tdb.lib.NodeLib ;
-
-/** Utilities for encoding/decoding nodes as strings.
- * Normally use a Nodec (byte buffers) instead.
- */
-
-public class NodecLib
-{
- // STATUS UNCLEAR.
- // privateize the operations until checked.
-
- // Better sharing with NodecSSE
-
- // Characters in IRIs that are illegal and cause SSE problems, but we wish to keep.
- final private static char MarkerChar = '_' ;
- final private static char[] invalidIRIChars = { MarkerChar , ' ' } ;
-
- private /*public*/ static String encode(Node node) { return encode(node, null) ; }
-
- private /*public*/ static String encode(Node node, PrefixMapping pmap)
- {
- if ( node.isBlank() )
- // Raw label.
- return "_:"+node.getBlankNodeLabel() ;
- if ( node.isURI() )
- {
- // Pesky spaces
- //throw new TDBException("Space found in URI: "+node) ;
- String x = StrUtils.encodeHex(node.getURI(), '_', invalidIRIChars) ;
- if ( x != node.getURI() )
- node = NodeFactory.createURI(x) ;
- }
-
- return NodeFmtLib.str(node) ;
- }
-
- private /*public*/ static Node decode(String s) { return decode(s, null) ; }
-
- private /*public*/ static Node decode(String s, PrefixMapping pmap)
- {
- if ( s.startsWith("_:") )
- {
- s = s.substring(2) ;
- return NodeFactory.createAnon(new AnonId(s)) ;
- }
-
- if ( s.startsWith("<") )
- {
- s = s.substring(1,s.length()-1) ;
- s = StrUtils.decodeHex(s, MarkerChar) ;
- return NodeFactory.createURI(s) ;
- }
-
- try {
- // SSE invocation is expensive (??).
- // Try TokenizerText?
- // Use for literals only.
- Node n = SSE.parseNode(s, pmap) ;
- return n ;
- } catch (SSEParseException ex)
- {
- Log.fatal(NodeLib.class, "decode: Failed to parse: "+s) ;
- throw ex ;
- }
- }
-
-}
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetable/NodecSSE.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetable/NodecSSE.java
index c808f979ec0..da8f29bfe88 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetable/NodecSSE.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/nodetable/NodecSSE.java
@@ -42,7 +42,6 @@
public class NodecSSE implements Nodec
{
- private static boolean SafeChars = false ;
// Characters in IRIs that are illegal and cause SSE problems, but we wish to keep.
final private static char MarkerChar = '_' ;
final private static char[] invalidIRIChars = { MarkerChar , ' ' } ;
@@ -194,16 +193,5 @@ private static int maxLength(String string)
abbreviations.add( "r", " tuple = iter.next() ;
System.out.println(tuple) ;
}
-
- if ( false )
- {
- // Dump raw
- TupleIndexRecord tir = (TupleIndexRecord)idx ;
- RangeIndex rIdx = tir.getRangeIndex() ;
- for ( Record aRIdx : rIdx )
- {
- System.out.println( aRIdx );
- }
- }
}
}
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/sys/FileRef.java b/jena-tdb/src/main/java/org/apache/jena/tdb/sys/FileRef.java
index af7046755c1..8c875e63961 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/sys/FileRef.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/sys/FileRef.java
@@ -96,12 +96,6 @@ private static void add(int idx, String fn)
id2name.put(idx, new FileRef(fn, idx)) ;
}
- private static void bTree(String name)
- {
- file(name+".idn") ;
- file(name+".dat") ;
- }
-
/** Public - for testing */
public static void file(String name)
{
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/sys/SystemTDB.java b/jena-tdb/src/main/java/org/apache/jena/tdb/sys/SystemTDB.java
index fc278fa1c45..fee3beab59f 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/sys/SystemTDB.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/sys/SystemTDB.java
@@ -267,15 +267,6 @@ private static Symbol allocSymbol(String namespace, String shortName)
// ----
- private static int intValue(String prefix, String name, int defaultValue)
- {
- if ( ! prefix.endsWith(".") )
- name = prefix+"."+name ;
- else
- name = prefix+name ;
- return intValue(name, defaultValue) ;
- }
-
private static int intValue(String name, int defaultValue)
{
if ( name == null ) return defaultValue ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/BlockMgrJournal.java b/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/BlockMgrJournal.java
index fbc2bddc4f5..5677c826097 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/BlockMgrJournal.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/BlockMgrJournal.java
@@ -336,15 +336,6 @@ private void writeJournalEntry(Block blk)
transaction.getJournal().write(JournalEntryType.Block, fileRef, blk) ;
}
- private void logState()
- {
- Log.info(this, "state: "+getLabel()) ;
- Log.info(this, " readBlocks: "+readBlocks) ;
- Log.info(this, " writeBlocks: "+writeBlocks) ;
- Log.info(this, " iteratorBlocks: "+iteratorBlocks) ;
- Log.info(this, " freedBlocks: "+freedBlocks) ;
- }
-
@Override
public void beginRead() { checkIfClosed() ; blockMgr.beginRead() ; }
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/NodeTableTrans.java b/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/NodeTableTrans.java
index d6d4e050b9f..ac23b7bf8bd 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/NodeTableTrans.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/NodeTableTrans.java
@@ -21,16 +21,13 @@
import static org.apache.jena.atlas.logging.FmtLog.warn ;
import static org.apache.jena.atlas.logging.Log.warn ;
-import java.nio.ByteBuffer ;
import java.util.Iterator ;
import org.apache.jena.atlas.iterator.Iter ;
-import org.apache.jena.atlas.lib.ByteBufferLib ;
import org.apache.jena.atlas.lib.Pair ;
import org.apache.jena.graph.Node ;
import org.apache.jena.tdb.TDBException ;
import org.apache.jena.tdb.base.objectfile.ObjectFile ;
-import org.apache.jena.tdb.base.record.Record ;
import org.apache.jena.tdb.index.Index ;
import org.apache.jena.tdb.store.NodeId ;
import org.apache.jena.tdb.store.nodetable.NodeTable ;
@@ -202,16 +199,12 @@ public void begin(Transaction txn)
{
Iterator> iter = nodeTableJournal.all() ;
Pair firstPair = null ;
- Pair lastPair = null ;
-
- for ( ; iter.hasNext() ; )
+ while ( iter.hasNext() )
{
Pair x = iter.next() ;
if ( firstPair == null )
firstPair = x ;
- lastPair = x ;
-
NodeId nodeId = x.getLeft() ;
Node node = x.getRight() ;
debug(" append: %s -> %s", x, mapFromJournal(nodeId)) ;
@@ -242,40 +235,7 @@ private void dump()
System.err.println("offset = "+allocOffset) ;
System.err.println("journalStartOffset = "+journalObjFileStartOffset) ;
System.err.println("journal = "+journalObjFile.getLabel()) ;
- if ( true )
- return ;
-
- System.err.println("nodeTableJournal >>>") ;
- Iterator> iter = nodeTableJournal.all() ;
- for ( ; iter.hasNext() ; )
- {
- Pair x = iter.next() ;
- NodeId nodeId = x.getLeft() ;
- Node node = x.getRight() ;
- NodeId mapped = mapFromJournal(nodeId) ;
- //debug("append: %s -> %s", x, mapFromJournal(nodeId)) ;
- // This does the write.
- NodeId nodeId2 = base.getAllocateNodeId(node) ;
- System.err.println(x + " mapped=" + mapped + " getAlloc="+nodeId2) ;
- }
-
- System.err.println("journal >>>") ;
- Iterator> iter1 = this.journalObjFile.all() ;
- for ( ; iter1.hasNext() ; )
- {
- Pair p = iter1.next() ;
- System.err.println(p.getLeft()+" : "+p.getRight()) ;
- ByteBufferLib.print(System.err, p.getRight()) ;
- }
-
- System.err.println("nodeIndex >>>") ;
- Iterator iter2 = this.nodeIndex.iterator() ;
- for ( ; iter2.hasNext() ; )
- {
- Record r = iter2.next() ;
- System.err.println(r) ;
- }
- System.err.println("<<<<<<<<<<") ;
+ return ;
}
@Override
@@ -310,11 +270,10 @@ public void commitEnact(Transaction txn)
private void writeNodeJournal()
{
long expected = base.allocOffset().getId() ;
- long len = journalObjFile.length() ;
+ journalObjFile.length();
if ( expected != allocOffset )
warn(log, "Inconsistency: base.allocOffset() = "+expected+" : allocOffset = "+allocOffset) ;
- long newbase = -1 ;
append() ; // Calls all() which does a buffer flish.
// Reset (in case we use this again)
nodeIndex.clear() ;
diff --git a/jena-tdb/src/main/java/tdb/tools/dumpbpt.java b/jena-tdb/src/main/java/tdb/tools/dumpbpt.java
index 4828a147f2b..2ca60a48b28 100644
--- a/jena-tdb/src/main/java/tdb/tools/dumpbpt.java
+++ b/jena-tdb/src/main/java/tdb/tools/dumpbpt.java
@@ -19,13 +19,8 @@
package tdb.tools ;
import java.io.PrintStream ;
-import java.util.Arrays ;
import java.util.Iterator ;
-import java.util.List ;
-
-import org.apache.jena.atlas.lib.ColumnMap ;
import org.apache.jena.atlas.lib.Lib ;
-import org.apache.jena.atlas.lib.Tuple ;
import org.apache.jena.atlas.logging.LogCtl ;
import org.apache.jena.tdb.base.file.Location ;
import org.apache.jena.tdb.base.record.Record ;
@@ -33,10 +28,6 @@
import org.apache.jena.tdb.index.IndexFactory ;
import org.apache.jena.tdb.index.RangeIndex ;
import org.apache.jena.tdb.index.bplustree.BPlusTree ;
-import org.apache.jena.tdb.store.NodeId ;
-import org.apache.jena.tdb.store.tupletable.TupleIndex ;
-import org.apache.jena.tdb.store.tupletable.TupleIndexRecord ;
-import org.apache.jena.tdb.sys.Names ;
import org.apache.jena.tdb.sys.SystemTDB ;
import tdb.cmdline.ModLocation ;
import arq.cmdline.CmdGeneral ;
@@ -76,21 +67,10 @@ protected String getCommandName() {
@Override
protected void exec() {
- List tripleIndexes = Arrays.asList(Names.tripleIndexes) ;
- List quadIndexes = Arrays.asList(Names.quadIndexes) ;
Location loc = modLocation.getLocation() ;
// The name is the order.
for ( String indexName : super.getPositional() ) {
- String primary ;
- if ( indexName.length() == 3 ) {
- primary = Names.primaryIndexTriples ;
- } else if ( indexName.length() == 4 ) {
- primary = Names.primaryIndexQuads ;
- } else {
- cmdError("Wrong length: " + indexName) ;
- primary = null ;
- }
int keySubLen = SystemTDB.SizeOfNodeId ;
int keyUnitLen = indexName.length() ;
@@ -101,21 +81,17 @@ protected void exec() {
RangeIndex rIndex = IndexFactory.buildRangeIndex(loc, indexName, rf) ;
BPlusTree bpt = (BPlusTree)rIndex ;
- if ( false ) {
- System.out.println("---- Index structure") ;
- bpt.dump() ;
- }
- if ( true ) {
- System.out.println("---- Index contents") ;
- Iterator iter = bpt.iterator() ;
- if ( !iter.hasNext() )
- System.out.println("<>") ;
-
- for ( ; iter.hasNext() ; ) {
- Record r = iter.next() ;
- printRecord("", System.out, r, keyUnitLen) ;
- }
+
+ System.out.println("---- Index contents") ;
+ Iterator iter = bpt.iterator() ;
+ if ( !iter.hasNext() )
+ System.out.println("<>") ;
+
+ for ( ; iter.hasNext() ; ) {
+ Record r = iter.next() ;
+ printRecord("", System.out, r, keyUnitLen) ;
}
+
// Check.
Iterator iterCheck = bpt.iterator() ;
@@ -134,23 +110,6 @@ protected void exec() {
}
r1 = r2 ;
}
-
- if ( false ) {
- // Dump in tuple order.
- TupleIndex tupleIndex = new TupleIndexRecord(primary.length(), new ColumnMap(primary, indexName), indexName,
- rIndex.getRecordFactory(), rIndex) ;
- if ( true ) {
- System.out.println("---- Tuple contents") ;
- Iterator> iter2 = tupleIndex.all() ;
- if ( !iter2.hasNext() )
- System.out.println("<>") ;
-
- for ( ; iter2.hasNext() ; ) {
- Tuple row = iter2.next() ;
- System.out.println(row) ;
- }
- }
- }
}
}
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/TC_TDB.java b/jena-tdb/src/test/java/org/apache/jena/tdb/TC_TDB.java
index f720a76ea1c..163de60d64b 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/TC_TDB.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/TC_TDB.java
@@ -22,7 +22,6 @@
import org.apache.jena.sparql.engine.optimizer.reorder.ReorderTransformation ;
import org.apache.jena.tdb.assembler.TS_TDBAssembler ;
import org.apache.jena.tdb.base.TC_Base ;
-import org.apache.jena.tdb.base.block.FileMode ;
import org.apache.jena.tdb.base.objectfile.TS_ObjectFile ;
import org.apache.jena.tdb.graph.TS_Graph ;
import org.apache.jena.tdb.index.TS_Index ;
@@ -67,10 +66,6 @@
public class TC_TDB
{
- static {
- if ( false )
- SystemTDB.setFileMode(FileMode.direct) ;
- }
static ReorderTransformation dftReorder = null ;
@BeforeClass static public void beforeClass()
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_QuadsObjectIsNull.java b/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_QuadsObjectIsNull.java
index 76218c7a782..5e01a1a3830 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_QuadsObjectIsNull.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_QuadsObjectIsNull.java
@@ -20,18 +20,12 @@
import java.util.Iterator ;
-import org.apache.jena.atlas.lib.FileOps ;
-import org.apache.jena.atlas.logging.LogCtl ;
import org.apache.jena.query.ReadWrite ;
import org.apache.jena.sparql.core.Quad ;
import org.apache.jena.sparql.sse.SSE ;
import org.apache.jena.tdb.TDBFactory ;
import org.apache.jena.tdb.base.file.Location ;
-import org.apache.jena.tdb.sys.SystemTDB ;
import org.apache.jena.tdb.transaction.DatasetGraphTransaction ;
-import org.apache.jena.tdb.transaction.Journal ;
-import org.apache.jena.tdb.transaction.JournalControl ;
-import org.apache.jena.tdb.transaction.NodeTableTrans ;
public class T_QuadsObjectIsNull {
// static {
@@ -43,25 +37,6 @@ public class T_QuadsObjectIsNull {
static Location location = Location.create(DIR) ;
public static void main(String[] args) {
-
- if ( false )
- {
- LogCtl.enable(SystemTDB.syslog.getName()) ;
- LogCtl.enable(Journal.class) ;
- LogCtl.enable(JournalControl.class) ;
- LogCtl.enable(NodeTableTrans.class) ;
- }
- if ( false )
- {
- String journal = "DBX/journal.jrnl" ;
- if ( FileOps.exists(journal))
- JournalControl.print(journal) ;
- }
-
- if ( false ) {
- FileOps.ensureDir(DIR) ;
- FileOps.clearDirectory(DIR) ;
- }
one() ;
}
@@ -93,15 +68,12 @@ public static void one()
{
Quad q1 = SSE.parseQuad("( '1')") ;
Quad q2 = SSE.parseQuad("( '2')") ;
- Quad q3 = SSE.parseQuad("( '3')") ;
-
DatasetGraphTransaction dsg = (DatasetGraphTransaction)TDBFactory.createDatasetGraph(location);
System.out.println("Start") ;
dump(dsg) ;
write(dsg, q1) ;
write(dsg, q2) ;
- //write(dsg, q3) ;
System.out.println("Finish") ;
dump(dsg) ;
}
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_TDBWriteTransaction.java b/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_TDBWriteTransaction.java
index c01e1904002..96939818f84 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_TDBWriteTransaction.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_TDBWriteTransaction.java
@@ -41,10 +41,7 @@
import org.apache.jena.rdf.model.Resource ;
import org.apache.jena.tdb.TDBFactory ;
import org.apache.jena.tdb.base.block.FileMode ;
-import org.apache.jena.tdb.base.file.Location ;
import org.apache.jena.tdb.sys.SystemTDB ;
-import org.apache.jena.tdb.transaction.Journal ;
-import org.apache.jena.tdb.transaction.JournalControl ;
import org.apache.jena.tdb.transaction.TransactionManager ;
public class T_TDBWriteTransaction {
@@ -82,14 +79,6 @@ public static void main(String[] args) {
static public void run(String location)
{
- if ( false )
- {
- Journal journal = Journal.create(Location.create(location)) ;
- JournalControl.print(journal) ;
- journal.close() ;
- }
- //String location = args[0]; // + "/" + UUID.randomUUID().toString();
-
//String baseGraphName = "com.ibm.test.graphNamePrefix.";
long totalExecTime = 0L;
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_TransSystem.java b/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_TransSystem.java
index 11db7d65520..f6d4208320d 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_TransSystem.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_TransSystem.java
@@ -40,7 +40,6 @@
import org.apache.jena.sparql.core.DatasetGraph ;
import org.apache.jena.sparql.core.Quad ;
import org.apache.jena.sparql.sse.SSE ;
-import org.apache.jena.tdb.ConfigTest ;
import org.apache.jena.tdb.StoreConnection ;
import org.apache.jena.tdb.TDBException ;
import org.apache.jena.tdb.base.block.FileMode ;
@@ -67,15 +66,11 @@ public class T_TransSystem
*/
static boolean MEM = true ;
- static String location = true ? "/mnt/ssd1/tmp/DB163" : ConfigTest.getTestingDirDB() ; // Using an SSD here is very helpful
+ static String location = "/mnt/ssd1/tmp/DB163" ; // Using an SSD here is very helpful
//static String location = ConfigTest.getTestingDirDB() ; // Using an SSD here is very helpful
static final Location LOC = MEM ? Location.mem() : Location.create(location) ;
static {
- //SystemTDB.isWindows
- if ( false )
- SystemTDB.setFileMode(FileMode.direct) ;
-
if ( SystemTDB.isWindows && SystemTDB.fileMode() == FileMode.mapped )
log.error("**** Running with file mapped mode on MS Windows - expected test failure") ;
@@ -156,9 +151,7 @@ public static void main(String...args) throws InterruptedException
{
clean() ;
- execService = ( numThreadsInPool > 0 )
- ? Executors.newFixedThreadPool(numThreadsInPool)
- : Executors.newCachedThreadPool() ;
+ execService = Executors.newFixedThreadPool(numThreadsInPool) ;
startTestIteration() ;
@@ -218,13 +211,12 @@ public Object call()
// if (x1 != x2) log.warn(format("READER: %s Change seen: %d/%d : id=%d: i=%d",
// dsg.getTransaction().getLabel(), x1, x2, id, i)) ;
- // Add in an abort.
- long start = System.currentTimeMillis();
- int x1 = count("SELECT * { ?s ?p ?o }", dsg) ;
+ System.currentTimeMillis();
+ count("SELECT * { ?s ?p ?o }", dsg);
pause(maxpause) ;
- String qs1 = StrUtils.strjoinNL("PREFIX afn: ",
- "SELECT * { {FILTER(afn:wait(10))} UNION {?s ?p ?o }}") ;
+ StrUtils.strjoinNL("PREFIX afn: ",
+ "SELECT * { {FILTER(afn:wait(10))} UNION {?s ?p ?o }}");
String qs2 = StrUtils.strjoinNL("DESCRIBE ?s { ?s ?p ?o }") ;
try {
//countWithAbort(qs1, dsg, 5) ;
@@ -400,7 +392,6 @@ public static void beforeClass()
DatasetGraphTxn dsg = sConn.begin(ReadWrite.WRITE) ;
dsg.add(q1) ;
dsg.add(q2) ;
- initCount = 2 ;
dsg.commit() ;
dsg.end() ;
}
@@ -419,7 +410,6 @@ private static void clean()
}
}
- private StoreConnection sConn ;
protected synchronized StoreConnection getStoreConnection()
{
@@ -519,15 +509,11 @@ static class Callable2Runnable implements Runnable
@Override public void run() { try { callable.call() ; } catch (Exception ex) {} }
}
- private static int counter = 0 ;
private void submit(ExecutorService execService, Callable proc, int numTasks, String label)
{
for ( int i = 0 ; i < numTasks ; i++ )
{
execService.submit(proc) ;
-// counter++ ;
-// Thread t = new Thread(new Callable2Runnable(proc), label+counter) ;
-// t.start();
}
}
@@ -557,9 +543,9 @@ static void pause(int maxInternal)
static Quad genQuad(int value)
{
- Node g1 = q.getGraph() ;
- int n1 = (int)Math.round(Math.random()*10000) ;
- int n2 = (int)Math.round(Math.random()*10000) ;
+ q.getGraph();
+ Math.round(Math.random()*10000);
+ Math.round(Math.random()*10000);
Node g = Quad.defaultGraphNodeGenerated ; // urn:x-arq:DefaultGraphNode
Node s = NodeFactory.createURI("S") ;
@@ -575,7 +561,6 @@ static void txn(String label, DatasetGraphTxn dsg )
return ;
checkCol() ;
print(label) ;
- //print("["+dsg.getTransaction().getTxnId()+"]") ;
colCount += label.length() ;
}
@@ -666,9 +651,6 @@ private static void printf(String string, Object...args)
static Quad q4 = SSE.parseQuad("(_ )") ;
- private static int initCount = -1 ;
-
- //static final Location LOC = Location.create(ConfigTest.getTestingDirDB()) ;
static final AtomicInteger gen = new AtomicInteger() ;
}
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_TxnDeadlockTest.java b/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_TxnDeadlockTest.java
index a3f4413acb8..6a74eea15ce 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_TxnDeadlockTest.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_TxnDeadlockTest.java
@@ -33,15 +33,11 @@
import org.apache.jena.tdb.StoreConnection ;
import org.apache.jena.tdb.base.file.Location ;
import org.apache.jena.tdb.transaction.DatasetGraphTxn ;
-import org.apache.jena.tdb.transaction.TransactionManager ;
public class T_TxnDeadlockTest {
static {
- LogCtl.setLog4j() ;
- //Log.enable("TDB") ;
- if ( false ) LogCtl.enable(TransactionManager.class) ;
- //Log.enable(LockMRSW.class) ;
+ LogCtl.setLog4j() ;
}
private static final int CONCURRENT_RANDOM_OPERATIONS = 1000;
@@ -121,10 +117,8 @@ public void run() {
Iterator result = txnGraph.find(
Node.ANY, Node.ANY, Node.ANY, Node.ANY);
- long count = 0;
while (result.hasNext()) {
result.next();
- count++;
}
txnGraph.end();
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/graph/TestPrefixMappingTDB.java b/jena-tdb/src/test/java/org/apache/jena/tdb/graph/TestPrefixMappingTDB.java
index e226421eb1f..7f736961288 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/graph/TestPrefixMappingTDB.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/graph/TestPrefixMappingTDB.java
@@ -26,14 +26,12 @@
import org.apache.jena.sparql.graph.AbstractTestPrefixMapping2 ;
import org.apache.jena.tdb.ConfigTest ;
import org.apache.jena.tdb.StoreConnection ;
-import org.apache.jena.tdb.TDB ;
import org.apache.jena.tdb.TDBFactory ;
import org.apache.jena.tdb.base.file.Location ;
import org.apache.jena.tdb.setup.Build ;
import org.apache.jena.tdb.store.DatasetPrefixesTDB ;
import org.apache.jena.tdb.sys.DatasetControl ;
import org.apache.jena.tdb.sys.DatasetControlMRSW ;
-import org.apache.jena.tdb.sys.SystemTDB ;
import org.junit.* ;
public class TestPrefixMappingTDB extends AbstractTestPrefixMapping2
@@ -117,11 +115,6 @@ public void persistent2() {
@Test
public void persistent3() {
- // Test case from a report by Holger Knublauch
- if ( false ) {
- // TDB.getContext().set(SystemTDB.symFileMode, "mapped") ;
- TDB.getContext().set(SystemTDB.symFileMode, "direct") ;
- }
String DB = ConfigTest.getCleanDir() ;
{
// Create new DB (assuming it's empty now)
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/index/bplustree/CmdTestBPlusTreeRewriter.java b/jena-tdb/src/test/java/org/apache/jena/tdb/index/bplustree/CmdTestBPlusTreeRewriter.java
index 18318a52cd1..76fa7559921 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/index/bplustree/CmdTestBPlusTreeRewriter.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/index/bplustree/CmdTestBPlusTreeRewriter.java
@@ -22,7 +22,6 @@
import org.apache.jena.atlas.lib.RandomLib ;
import org.apache.jena.atlas.logging.LogCtl ;
import org.apache.jena.tdb.base.record.RecordFactory ;
-import org.apache.jena.tdb.index.bplustree.BPlusTreeRewriter ;
import org.apache.jena.tdb.sys.SystemTDB ;
public class CmdTestBPlusTreeRewriter
@@ -76,28 +75,15 @@ public static void main(String...argv)
int[] orders = null ;
int[] sizes = null ;
- if ( false )
- {
- // Specific test case.
- orders = new int[]{2} ;
- sizes = new int[]{20} ;
- NumTest = sizes.length ;
- SystemTDB.NullOut = true ;
- debug = true ;
- BPlusTreeRewriter.debug = true;
- }
- else
- {
- orders = new int[NumTest] ;
- sizes = new int[NumTest] ;
- for ( int i = 0 ; i < orders.length ; i++ )
- {
- int order = ( MinOrder == MaxOrder ) ? MinOrder : MinOrder+RandomLib.random.nextInt(MaxOrder-MinOrder) ;
- int size = ( MinSize == MaxSize ) ? MinSize : MinSize+RandomLib.random.nextInt(MaxSize-MinSize) ;
- orders[i] = order ;
- sizes[i] = size ;
- }
- }
+ orders = new int[NumTest] ;
+ sizes = new int[NumTest] ;
+ for ( int i = 0 ; i < orders.length ; i++ )
+ {
+ int order = ( MinOrder == MaxOrder ) ? MinOrder : MinOrder+RandomLib.random.nextInt(MaxOrder-MinOrder) ;
+ int size = ( MinSize == MaxSize ) ? MinSize : MinSize+RandomLib.random.nextInt(MaxSize-MinSize) ;
+ orders[i] = order ;
+ sizes[i] = size ;
+ }
int numOnLine = 50 ;
int testsPerTick = 500 ;
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/index/bplustree/TestBPTreeRecords.java b/jena-tdb/src/test/java/org/apache/jena/tdb/index/bplustree/TestBPTreeRecords.java
index acd2acce65f..03704baba0c 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/index/bplustree/TestBPTreeRecords.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/index/bplustree/TestBPTreeRecords.java
@@ -290,12 +290,6 @@ private static void check(BPTreeRecords bpr)
}
}
- private static Record search(BPTreeRecords bpr, int x)
- {
- return search(bpr, RecordLib.intToRecord(x)) ;
- }
-
-
private static Record search(BPTreeRecords bpr, Record r)
{
return bpr.internalSearch(r) ;
@@ -309,12 +303,6 @@ private static void insert(BPTreeRecords bpr, int ... values)
}
}
- private static void insert(BPTreeRecords bpr, Record r)
- {
- bpr.internalInsert(r) ;
- }
-
-
private static void delete(BPTreeRecords bpr, int ... values)
{
for ( int value : values )
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/index/bplustree/TestBPlusTree.java b/jena-tdb/src/test/java/org/apache/jena/tdb/index/bplustree/TestBPlusTree.java
index 17bb72a3236..640f314b6a5 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/index/bplustree/TestBPlusTree.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/index/bplustree/TestBPlusTree.java
@@ -48,13 +48,6 @@ public class TestBPlusTree extends AbstractTestRangeIndex
protected RangeIndex makeRangeIndex(int order, int minRecords)
{
BPlusTree bpt = BPlusTree.makeMem(order, minRecords, RecordLib.TestRecordLength, 0) ;
- if ( false )
- {
- // Breaks with CheckingTree = true ; because of deep reads into the tree.
- BPlusTreeParams.CheckingNode = true ;
- BPlusTreeParams.CheckingTree = false ;
- bpt = BPlusTree.addTracking(bpt) ;
- }
return bpt ;
}
}
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/index/ext/ExtHashTestBase.java b/jena-tdb/src/test/java/org/apache/jena/tdb/index/ext/ExtHashTestBase.java
index 3becd655430..41ed4546357 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/index/ext/ExtHashTestBase.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/index/ext/ExtHashTestBase.java
@@ -119,8 +119,6 @@ public static ExtHash create(int...recs)
{
Record r = intToRecord(i) ;
extHash.add(r) ;
-
- if ( false ) extHash.dump() ;
}
return extHash ;
}
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/solver/TestSolverTDB.java b/jena-tdb/src/test/java/org/apache/jena/tdb/solver/TestSolverTDB.java
index ba73f432871..2d7931db6a0 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/solver/TestSolverTDB.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/solver/TestSolverTDB.java
@@ -20,14 +20,11 @@
import java.util.ArrayList ;
-import java.util.Iterator ;
import java.util.List ;
import org.apache.jena.atlas.junit.BaseTest ;
import org.apache.jena.atlas.lib.StrUtils ;
import org.apache.jena.graph.Graph ;
-import org.apache.jena.graph.Node ;
-import org.apache.jena.graph.Triple ;
import org.apache.jena.query.ResultSet ;
import org.apache.jena.query.ResultSetFactory ;
import org.apache.jena.query.ResultSetFormatter ;
@@ -41,7 +38,6 @@
import org.apache.jena.sparql.algebra.OpVars ;
import org.apache.jena.sparql.core.Var ;
import org.apache.jena.sparql.engine.QueryIterator ;
-import org.apache.jena.sparql.engine.binding.Binding ;
import org.apache.jena.sparql.resultset.ResultSetCompare ;
import org.apache.jena.sparql.sse.SSE ;
import org.apache.jena.tdb.ConfigTest ;
@@ -68,13 +64,6 @@ public class TestSolverTDB extends BaseTest
}
- static private void addAll(Graph srcGraph, Graph dstGraph)
- {
- Iterator triples = srcGraph.find(Node.ANY, Node.ANY, Node.ANY) ;
- triples.forEachRemaining(dstGraph::add) ;
- }
-
-
@Test public void solve_01()
{
ResultSet rs1 = exec("(bgp (:s :p :o))", graph) ;
@@ -160,12 +149,4 @@ private static ResultSet exec(String pattern, Graph graph)
QueryIterator qIter = Algebra.exec(op, graph) ;
return ResultSetFactory.create(qIter, Var.varNames(vars)) ;
}
-
- private static List toList(QueryIterator qIter)
- {
- List x = new ArrayList<>() ;
- for ( ; qIter.hasNext() ; )
- x.add(qIter.nextBinding()) ;
- return x ;
- }
}
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestDatasetTDB.java b/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestDatasetTDB.java
index 53a58df30a5..150963d8a11 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestDatasetTDB.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestDatasetTDB.java
@@ -30,7 +30,6 @@
import org.apache.jena.sparql.sse.SSE ;
import org.apache.jena.tdb.TDB ;
import org.apache.jena.tdb.TDBFactory ;
-import org.apache.jena.util.FileManager ;
import org.junit.Test ;
/** Tests of datasets, prefixes, special URIs etc (see also {@link org.apache.jena.sparql.graph.GraphsTests} */
@@ -42,11 +41,6 @@ private static Dataset create()
return TDBFactory.createDataset() ;
}
- private static void load(Model model, String file)
- {
- FileManager.get().readModel(model, file) ;
- }
-
private static String base1 = "http://example/" ;
private static String baseNS = "http://example/ns#" ;
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/transaction/TestTransRestart.java b/jena-tdb/src/test/java/org/apache/jena/tdb/transaction/TestTransRestart.java
index 50d64d36a3e..33ef42d4cb6 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/transaction/TestTransRestart.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/transaction/TestTransRestart.java
@@ -29,13 +29,11 @@
import org.apache.jena.sparql.sse.SSE ;
import org.apache.jena.tdb.ConfigTest ;
import org.apache.jena.tdb.StoreConnection ;
-import org.apache.jena.tdb.base.block.FileMode ;
import org.apache.jena.tdb.base.file.FileFactory ;
import org.apache.jena.tdb.base.file.Location ;
import org.apache.jena.tdb.base.objectfile.ObjectFile ;
import org.apache.jena.tdb.store.DatasetGraphTDB ;
import org.apache.jena.tdb.sys.Names ;
-import org.apache.jena.tdb.sys.SystemTDB ;
import org.apache.jena.tdb.sys.TDBMaker ;
import org.apache.jena.tdb.transaction.DatasetGraphTxn ;
import org.junit.After ;
@@ -44,12 +42,7 @@
/** Test of re-attaching to a pre-existing database */
public class TestTransRestart extends BaseTest {
- static {
- // Only if run directly, not in test suite.
- if ( false )
- SystemTDB.setFileMode(FileMode.direct) ;
- }
-
+
private String path = null ;
private Location location = null ;
diff --git a/jena-text/src/main/java/org/apache/jena/query/text/TextDocProducerEntities.java b/jena-text/src/main/java/org/apache/jena/query/text/TextDocProducerEntities.java
index dce81cddee1..ca3e1951cfa 100644
--- a/jena-text/src/main/java/org/apache/jena/query/text/TextDocProducerEntities.java
+++ b/jena-text/src/main/java/org/apache/jena/query/text/TextDocProducerEntities.java
@@ -20,18 +20,13 @@
import java.util.List ;
-import org.apache.jena.graph.Node ;
import org.apache.jena.sparql.core.DatasetChangesBatched ;
import org.apache.jena.sparql.core.Quad ;
import org.apache.jena.sparql.core.QuadAction ;
-import org.apache.jena.sparql.util.FmtUtils ;
-import org.slf4j.Logger ;
-import org.slf4j.LoggerFactory ;
// Currently unused
// This would index multiple quads at a time from batched stream of changes (e.g. rdf-patch)
public class TextDocProducerEntities extends DatasetChangesBatched implements TextDocProducer {
- private static Logger log = LoggerFactory.getLogger(TextDocProducer.class) ;
private final EntityDefinition defn ;
private final TextIndex indexer ;
@@ -68,47 +63,9 @@ protected void dispatch(QuadAction quadAction, List batch) {
return ;
if ( batch.size() == 0 )
return ;
- if ( false ) {
- // One document per entity - future possibility.
- Quad q = batch.get(0) ;
- Node g = q.getGraph() ;
- Node s = q.getSubject() ;
- docEntity(g, s, batch) ;
- return ;
- }
docQuads(batch) ; // Does not need batching.
}
- private void docEntity(Node g, Node s, List batch) {
- // One document per entity
- String x = TextQueryFuncs.subjectToString(s) ;
- String gx = TextQueryFuncs.graphNodeToString(g) ;
- Entity entity = new Entity(x, gx) ;
- String graphField = defn.getGraphField() ;
- if ( defn.getGraphField() != null )
- entity.put(graphField, gx) ;
-
- for ( Quad quad : batch ) {
- Node p = quad.getPredicate() ;
- String field = defn.getField(p) ;
- if ( field == null )
- continue ;
- Node o = quad.getObject() ;
- String val = null ;
- if ( o.isURI() )
- val = o.getURI() ;
- else if ( o.isLiteral() )
- val = o.getLiteralLexicalForm() ;
- else {
- log.warn("Not a literal value for mapped field-predicate: " + field + " :: "
- + FmtUtils.stringForString(field)) ;
- continue ;
- }
- entity.put(field, val) ;
- }
- indexer.addEntity(entity) ;
- }
-
private void docQuads(List batch) {
// One document per triple/quad
diff --git a/jena-text/src/test/java/org/apache/jena/query/text/assembler/TestTextDatasetAssembler.java b/jena-text/src/test/java/org/apache/jena/query/text/assembler/TestTextDatasetAssembler.java
index 9826118b754..8274d2acc6a 100644
--- a/jena-text/src/test/java/org/apache/jena/query/text/assembler/TestTextDatasetAssembler.java
+++ b/jena-text/src/test/java/org/apache/jena/query/text/assembler/TestTextDatasetAssembler.java
@@ -125,8 +125,6 @@ public void testCustomTextDocProducerDyadicConstructor() {
private static class CustomTextDocProducer implements TextDocProducer {
- public CustomTextDocProducer(TextIndex textIndex) { }
-
@Override
public void start() { }
From 348152a177331b5a46536abfc4657254762929b0 Mon Sep 17 00:00:00 2001
From: ajs6f
Date: Thu, 7 May 2015 20:17:21 -0400
Subject: [PATCH 2/7] Removing unnecessary superinterfaces, unused local
variables, unthrown exceptions.
---
.../org/apache/jena/atlas/data/DataBag.java | 3 +-
.../org/apache/jena/atlas/json/JsonArray.java | 2 +-
.../jena/riot/lang/CollectorStreamQuads.java | 3 +-
.../riot/lang/CollectorStreamTriples.java | 3 +-
.../jena/riot/lang/PipedQuadsStream.java | 3 +-
.../jena/riot/lang/PipedTriplesStream.java | 3 +-
.../jena/riot/lang/PipedTuplesStream.java | 3 +-
.../jena/riot/out/SinkQuadBracedOutput.java | 3 +-
.../riot/system/IteratorStreamRDFText.java | 2 +-
.../riot/system/StreamRDFCountingBase.java | 6 +-
.../jena/riot/thrift/IteratorThriftRDF.java | 8 +-
.../jena/riot/thrift/Thift2Binding.java | 8 +-
.../org/apache/jena/sparql/algebra/Op.java | 3 +-
.../core/assembler/DatasetAssembler.java | 2 +-
.../DatasetDescriptionAssembler.java | 2 +-
.../core/assembler/DatasetNullAssembler.java | 2 +-
.../sparql/engine/iterator/QueryIterSort.java | 3 +-
.../sparql/function/CastXSD_DateTime.java | 2 +-
.../apache/jena/sparql/graph/GraphSPARQL.java | 2 +-
.../jena/sparql/graph/GraphSPARQLService.java | 130 ------------------
.../sparql/modify/UpdateProcessRemote.java | 3 +-
.../modify/UpdateProcessRemoteForm.java | 3 +-
.../org/apache/jena/update/UpdateAction.java | 1 -
.../api/TestQueryExecutionTimeout1.java | 1 -
.../apache/jena/atlas/io/IndentedWriter.java | 3 +-
.../org/apache/jena/atlas/io/Writer2.java | 4 +-
.../assembler/assemblers/AssemblerGroup.java | 2 +-
.../assemblers/ContentAssembler.java | 2 +-
.../assemblers/DefaultModelAssembler.java | 2 +-
.../assemblers/MemoryModelAssembler.java | 2 +-
.../assembler/assemblers/ModelAssembler.java | 2 +-
.../assemblers/OntModelAssembler.java | 2 +-
.../assemblers/OntModelSpecAssembler.java | 2 +-
.../assemblers/PrefixMappingAssembler.java | 2 +-
.../assemblers/ReasonerFactoryAssembler.java | 2 +-
.../assemblers/RuleSetAssembler.java | 2 +-
.../assemblers/UnionModelAssembler.java | 2 +-
.../datatypes/xsd/impl/RDFLangString.java | 2 +-
.../datatypes/xsd/impl/XMLLiteralType.java | 2 +-
.../org/apache/jena/graph/compose/Delta.java | 2 +-
.../apache/jena/graph/compose/Difference.java | 2 +-
.../jena/graph/compose/Intersection.java | 2 +-
.../compose/PolyadicPrefixMappingImpl.java | 2 +-
.../org/apache/jena/graph/compose/Union.java | 2 +-
.../org/apache/jena/mem/GraphTripleStore.java | 3 +-
.../apache/jena/mem/GraphTripleStoreMem.java | 3 +-
.../jena/ontology/AnnotationProperty.java | 8 +-
.../jena/ontology/impl/AllDifferentImpl.java | 1 -
.../impl/AllValuesFromRestrictionImpl.java | 1 -
.../ontology/impl/AnnotationPropertyImpl.java | 1 -
.../impl/CardinalityQRestrictionImpl.java | 1 -
.../impl/CardinalityRestrictionImpl.java | 1 -
.../ontology/impl/ComplementClassImpl.java | 1 -
.../jena/ontology/impl/DataRangeImpl.java | 1 -
.../ontology/impl/DatatypePropertyImpl.java | 1 -
.../ontology/impl/EnumeratedClassImpl.java | 1 -
.../ontology/impl/FunctionalPropertyImpl.java | 1 -
.../impl/HasValueRestrictionImpl.java | 1 -
.../jena/ontology/impl/IndividualImpl.java | 1 -
.../ontology/impl/IntersectionClassImpl.java | 1 -
.../impl/InverseFunctionalPropertyImpl.java | 1 -
.../impl/MaxCardinalityQRestrictionImpl.java | 1 -
.../impl/MaxCardinalityRestrictionImpl.java | 1 -
.../impl/MinCardinalityQRestrictionImpl.java | 1 -
.../impl/MinCardinalityRestrictionImpl.java | 1 -
.../ontology/impl/ObjectPropertyImpl.java | 1 -
.../jena/ontology/impl/OntClassImpl.java | 1 -
.../jena/ontology/impl/OntPropertyImpl.java | 1 -
.../jena/ontology/impl/OntResourceImpl.java | 1 -
.../jena/ontology/impl/OntologyImpl.java | 1 -
.../impl/QualifiedRestrictionImpl.java | 1 -
.../jena/ontology/impl/RestrictionImpl.java | 1 -
.../impl/SomeValuesFromRestrictionImpl.java | 1 -
.../ontology/impl/SymmetricPropertyImpl.java | 1 -
.../ontology/impl/TransitivePropertyImpl.java | 1 -
.../jena/ontology/impl/UnionClassImpl.java | 1 -
.../apache/jena/rdf/model/impl/AltImpl.java | 1 -
.../apache/jena/rdf/model/impl/BagImpl.java | 1 -
.../apache/jena/rdf/model/impl/ModelCom.java | 3 +-
.../jena/rdf/model/impl/PropertyImpl.java | 1 -
.../jena/rdf/model/impl/RDFListImpl.java | 1 -
.../apache/jena/rdf/model/impl/SeqImpl.java | 1 -
.../rdfxml/xmlinput/impl/AttributeLexer.java | 3 +-
.../rdfxml/xmlinput/impl/SAX2RDFImpl.java | 6 +-
.../xmlinput/impl/XMLBaselessContext.java | 3 +-
.../jena/rdfxml/xmlinput/impl/XMLContext.java | 3 +-
.../rdfxml/xmlinput/states/AbsXMLLiteral.java | 2 +-
.../jena/rdfxml/xmlinput/states/Frame.java | 10 +-
.../xmlinput/states/OuterXMLLiteral.java | 6 +-
.../xmlinput/states/WantTypedLiteral.java | 2 +-
.../apache/jena/reasoner/BaseInfGraph.java | 3 +-
.../reasoner/rulesys/GenericRuleReasoner.java | 1 -
.../reasoner/rulesys/OWLMicroReasoner.java | 2 +-
.../reasoner/rulesys/OWLMiniReasoner.java | 2 +-
.../jena/reasoner/rulesys/impl/SafeGraph.java | 2 +-
.../TransitiveGraphCache.java | 4 +-
.../org/apache/jena/util/cache/RandCache.java | 2 +-
.../jena/util/iterator/Map1Iterator.java | 2 +-
.../jena/util/iterator/MapFilterIterator.java | 2 +-
.../jena/util/iterator/SingletonIterator.java | 2 +-
.../java/org/apache/jena/vocabulary/RDF.java | 2 +-
.../java/org/apache/jena/vocabulary/RDFS.java | 2 +-
.../test/TestReasonerFactoryAssembler.java | 2 +-
.../rdfxml/xmlinput/NTripleTestSuite.java | 5 +-
.../rdfxml/xmlinput/states/TestEventList.java | 2 +-
.../rdfxml/xmloutput/XMLOutputTestBase.java | 1 -
.../test/LoggingClosableIterator.java | 2 +-
.../AbstractLineBasedNodeTupleReader.java | 12 +-
.../io/output/AbstractNodeOutputFormat.java | 4 +-
.../output/AbstractNodeTupleOutputFormat.java | 4 +-
.../main/java/org/apache/jena/iri/IRI.java | 2 +-
.../java/org/apache/jena/iri/IRIFactory.java | 4 +-
.../org/apache/jena/iri/impl/IRIImpl.java | 5 +-
.../org/apache/jena/iri/impl/LexerPath.java | 17 +--
.../statements/JenaPreparedStatement.java | 14 +-
.../SecurityEvaluatorAssembler.java | 2 +-
.../graph/GraphEventManagerTest.java | 4 +-
.../jena/permissions/graph/MemGraphTest.java | 19 ++-
.../jena/permissions/graph/TDBGraphTest.java | 7 +-
.../model/SecuredModelDetailTest.java | 4 +-
.../sdb/assembler/DatasetStoreAssembler.java | 2 +-
.../jena/sdb/assembler/QueryAssembler.java | 2 +-
.../assembler/SDBConnectionDescAssembler.java | 2 +-
.../jena/sdb/assembler/SDBModelAssembler.java | 4 +-
.../sdb/assembler/StoreDescAssembler.java | 2 +-
.../apache/jena/sdb/compiler/QuadBlock.java | 2 +-
.../jena/sdb/exprmatch/ExprMatcher.java | 2 +-
.../org/apache/jena/sdb/graph/GraphSDB.java | 7 +-
.../jena/sdb/script/CmdDescAssembler.java | 2 +-
.../sdb/script/QueryCommandAssembler.java | 2 +-
.../jena/sdb/script/ScriptAssembler.java | 2 +-
.../jena/sdb/store/DatasetGraphSDB.java | 10 +-
.../org/apache/jena/sdb/store/Feature.java | 3 +-
.../org/apache/jena/sdb/store/FeatureSet.java | 3 +-
.../assembler/EntityDefinitionAssembler.java | 2 +-
.../assembler/SpatialDatasetAssembler.java | 5 +-
.../SpatialIndexLuceneAssembler.java | 1 -
.../jena/query/spatial/SpatialSearchUtil.java | 1 -
.../jena/tdb/assembler/TDBGraphAssembler.java | 2 +-
.../base/objectfile/ObjectFileStorage.java | 2 +-
.../jena/tdb/index/bplustree/BPlusTree.java | 6 +-
.../jena/tdb/store/DatasetGraphTDB.java | 4 +-
.../org/apache/jena/tdb/store/GraphTDB.java | 3 +-
.../assembler/EntityDefinitionAssembler.java | 2 +-
.../text/assembler/TextDatasetAssembler.java | 5 +-
.../assembler/TextIndexLuceneAssembler.java | 1 -
146 files changed, 135 insertions(+), 410 deletions(-)
delete mode 100644 jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphSPARQLService.java
diff --git a/jena-arq/src/main/java/org/apache/jena/atlas/data/DataBag.java b/jena-arq/src/main/java/org/apache/jena/atlas/data/DataBag.java
index a059bdfc65b..7d612b791d5 100644
--- a/jena-arq/src/main/java/org/apache/jena/atlas/data/DataBag.java
+++ b/jena-arq/src/main/java/org/apache/jena/atlas/data/DataBag.java
@@ -20,7 +20,6 @@
import java.util.Iterator;
-import org.apache.jena.atlas.lib.Closeable ;
import org.apache.jena.atlas.lib.Sink ;
/**
@@ -52,7 +51,7 @@
* Inspired by Apache Pig
* @see DataBag from Apache Pig
*/
-public interface DataBag extends Sink, Iterable, Closeable
+public interface DataBag extends Sink, Iterable
{
/**
* Get the number of elements in the bag, both in memory and on disk.
diff --git a/jena-arq/src/main/java/org/apache/jena/atlas/json/JsonArray.java b/jena-arq/src/main/java/org/apache/jena/atlas/json/JsonArray.java
index 05604e545dd..023004cf252 100644
--- a/jena-arq/src/main/java/org/apache/jena/atlas/json/JsonArray.java
+++ b/jena-arq/src/main/java/org/apache/jena/atlas/json/JsonArray.java
@@ -24,7 +24,7 @@
import java.util.List ;
import java.util.ListIterator ;
-public class JsonArray extends JsonValue implements List, Iterable
+public class JsonArray extends JsonValue implements List
{
private List array = new ArrayList<>() ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/CollectorStreamQuads.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/CollectorStreamQuads.java
index 646172e2c69..6ad960a4c29 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/CollectorStreamQuads.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/CollectorStreamQuads.java
@@ -22,7 +22,6 @@
import java.util.Collection;
import java.util.List;
-import org.apache.jena.riot.system.StreamRDF;
import org.apache.jena.sparql.core.Quad ;
/**
@@ -30,7 +29,7 @@
*
* @see CollectorStreamBase
*/
-public class CollectorStreamQuads extends CollectorStreamBase implements StreamRDF {
+public class CollectorStreamQuads extends CollectorStreamBase {
private List quads = new ArrayList<>();
@Override
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/CollectorStreamTriples.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/CollectorStreamTriples.java
index 2805eb62d0c..8f2216ce811 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/CollectorStreamTriples.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/CollectorStreamTriples.java
@@ -23,14 +23,13 @@
import java.util.List;
import org.apache.jena.graph.Triple ;
-import org.apache.jena.riot.system.StreamRDF;
/**
* Collector stream for triples.
*
* @see CollectorStreamBase
*/
-public class CollectorStreamTriples extends CollectorStreamBase implements StreamRDF {
+public class CollectorStreamTriples extends CollectorStreamBase {
private List triples = new ArrayList<>();
@Override
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedQuadsStream.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedQuadsStream.java
index 5f9d6a662b1..a08a19af927 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedQuadsStream.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedQuadsStream.java
@@ -19,13 +19,12 @@
package org.apache.jena.riot.lang ;
import org.apache.jena.graph.Triple ;
-import org.apache.jena.riot.system.StreamRDF ;
import org.apache.jena.sparql.core.Quad ;
/**
* Implementation of a producer class that sends Quads; must be connected to a {@code PipedRDFIterator}.
*/
-public class PipedQuadsStream extends PipedRDFStream implements StreamRDF
+public class PipedQuadsStream extends PipedRDFStream
{
/**
* Creates a piped quads stream connected to the specified piped
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedTriplesStream.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedTriplesStream.java
index c5c2dfec7b4..db15a86d33b 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedTriplesStream.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedTriplesStream.java
@@ -19,13 +19,12 @@
package org.apache.jena.riot.lang ;
import org.apache.jena.graph.Triple ;
-import org.apache.jena.riot.system.StreamRDF ;
import org.apache.jena.sparql.core.Quad ;
/**
* Implementation of a producer class that sends Triples; must be connected to a {@code PipedRDFIterator}.
*/
-public class PipedTriplesStream extends PipedRDFStream implements StreamRDF
+public class PipedTriplesStream extends PipedRDFStream
{
/**
* Creates a piped triples stream connected to the specified piped
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedTuplesStream.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedTuplesStream.java
index 599d9ec7039..74e3b17e08f 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedTuplesStream.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/PipedTuplesStream.java
@@ -21,13 +21,12 @@
import org.apache.jena.atlas.lib.Tuple ;
import org.apache.jena.graph.Node ;
import org.apache.jena.graph.Triple ;
-import org.apache.jena.riot.system.StreamRDF ;
import org.apache.jena.sparql.core.Quad ;
/**
* Implementation of a producer class that sends @{code Tuple}; must be connected to a {@code PipedRDFIterator}.
*/
-public class PipedTuplesStream extends PipedRDFStream> implements StreamRDF
+public class PipedTuplesStream extends PipedRDFStream>
{
/**
* Creates a piped tuples stream connected to the specified piped
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/out/SinkQuadBracedOutput.java b/jena-arq/src/main/java/org/apache/jena/riot/out/SinkQuadBracedOutput.java
index 0841c50fec6..4a2579fa678 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/out/SinkQuadBracedOutput.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/out/SinkQuadBracedOutput.java
@@ -22,7 +22,6 @@
import java.util.Objects;
import org.apache.jena.atlas.io.IndentedWriter ;
-import org.apache.jena.atlas.lib.Closeable ;
import org.apache.jena.atlas.lib.Sink ;
import org.apache.jena.graph.Node ;
import org.apache.jena.graph.Triple ;
@@ -33,7 +32,7 @@
/**
* A class that print quads, SPARQL style (maybe good for Trig too?)
*/
-public class SinkQuadBracedOutput implements Sink, Closeable
+public class SinkQuadBracedOutput implements Sink
{
protected static final int BLOCK_INDENT = 2 ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/system/IteratorStreamRDFText.java b/jena-arq/src/main/java/org/apache/jena/riot/system/IteratorStreamRDFText.java
index eb22b28dfc8..52bee1b5b62 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/system/IteratorStreamRDFText.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/system/IteratorStreamRDFText.java
@@ -41,7 +41,7 @@
/** Testing/development convenience.
* Iterator of StreamRowRDF (always a tuple) for an input stream of tokenized RDT terms.
*/
-public class IteratorStreamRDFText extends IteratorStreamRDF implements Iterator {
+public class IteratorStreamRDFText extends IteratorStreamRDF {
private final TokenInputStream in ;
private Node[] previousTuple = null ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/system/StreamRDFCountingBase.java b/jena-arq/src/main/java/org/apache/jena/riot/system/StreamRDFCountingBase.java
index 6a1a865f4fd..58909ae278e 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/system/StreamRDFCountingBase.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/system/StreamRDFCountingBase.java
@@ -23,12 +23,10 @@
import org.apache.jena.sparql.core.Quad ;
/** Wrap another StreamRDF and provide counts of items */
-public class StreamRDFCountingBase extends StreamRDFWrapper implements StreamRDF, StreamRDFCounting {
+public class StreamRDFCountingBase extends StreamRDFWrapper implements StreamRDFCounting {
private long countTriples = 0 ;
private long countQuads = 0 ;
- private long countBase = 0 ;
- private long countPrefixes = 0 ;
-
+
public StreamRDFCountingBase(StreamRDF other) {
super(other) ;
}
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/thrift/IteratorThriftRDF.java b/jena-arq/src/main/java/org/apache/jena/riot/thrift/IteratorThriftRDF.java
index e297a998675..39303d45014 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/thrift/IteratorThriftRDF.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/thrift/IteratorThriftRDF.java
@@ -18,8 +18,6 @@
package org.apache.jena.riot.thrift;
-import java.util.Iterator ;
-
import org.apache.jena.riot.system.* ;
import org.apache.jena.riot.thrift.wire.RDF_StreamRow ;
import org.apache.thrift.TException ;
@@ -29,7 +27,7 @@
/**
* Iterator over a Thrift-encoded RDF stream.
*/
-public class IteratorThriftRDF extends IteratorStreamRDF implements Iterator {
+public class IteratorThriftRDF extends IteratorStreamRDF {
private final PrefixMap pmap = PrefixMapFactory.create() ;
private final StreamRDFCollectOne collector = new StreamRDFCollectOne(pmap) ;
@@ -37,9 +35,7 @@ public class IteratorThriftRDF extends IteratorStreamRDF implements Iterator implements Iterator {
+public class Thift2Binding extends IteratorSlotted {
private List vars = new ArrayList<>() ;
private List varNames = new ArrayList<>() ;
private final RDF_DataTuple row = new RDF_DataTuple() ;
- private InputStream in ;
private TProtocol protocol ;
public Thift2Binding(InputStream in) {
- this.in = in ;
TIOStreamTransport transport = new TIOStreamTransport(in) ;
this.protocol = TRDF.protocol(transport) ;
readVars() ;
}
public Thift2Binding(TProtocol out) {
- this.in = null ;
this.protocol = out ;
readVars() ;
}
@@ -72,7 +68,7 @@ private void readVars() {
// }) ;
for ( RDF_VAR rv : vrow.getVars() ) {
String vn = rv.getName() ;
- Var v = Var.alloc(rv.getName()) ;
+ Var.alloc(rv.getName());
varNames.add(vn) ;
}
vars = Var.varList(varNames) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/Op.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/Op.java
index 6603c4ea940..fe727f21c35 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/Op.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/Op.java
@@ -18,12 +18,11 @@
package org.apache.jena.sparql.algebra;
-import org.apache.jena.atlas.io.Printable ;
import org.apache.jena.sparql.util.Named ;
import org.apache.jena.sparql.util.NodeIsomorphismMap ;
import org.apache.jena.sparql.util.PrintSerializable ;
-public interface Op extends PrintSerializable, Printable, Named
+public interface Op extends PrintSerializable, Named
{
public void visit(OpVisitor opVisitor) ;
public boolean equalTo(Op other, NodeIsomorphismMap labelMap) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetAssembler.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetAssembler.java
index e30b7e9b778..51eca5837b8 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetAssembler.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetAssembler.java
@@ -35,7 +35,7 @@
import org.apache.jena.sparql.util.FmtUtils ;
import org.apache.jena.sparql.util.graph.GraphUtils ;
-public class DatasetAssembler extends AssemblerBase implements Assembler {
+public class DatasetAssembler extends AssemblerBase {
public static Resource getType() {
return DatasetAssemblerVocab.tDataset ;
}
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetDescriptionAssembler.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetDescriptionAssembler.java
index 865013a2474..b949037ef06 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetDescriptionAssembler.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetDescriptionAssembler.java
@@ -27,7 +27,7 @@
import org.apache.jena.sparql.core.DatasetDescription ;
import org.apache.jena.sparql.util.graph.GraphUtils ;
-public class DatasetDescriptionAssembler extends AssemblerBase implements Assembler
+public class DatasetDescriptionAssembler extends AssemblerBase
{
public DatasetDescriptionAssembler() {}
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetNullAssembler.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetNullAssembler.java
index 116f5c504cb..38bdca01133 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetNullAssembler.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/assembler/DatasetNullAssembler.java
@@ -30,7 +30,7 @@
import org.apache.jena.sparql.modify.GraphStoreNull ;
import org.apache.jena.sparql.modify.GraphStoreNullTransactional ;
-public class DatasetNullAssembler extends AssemblerBase implements Assembler
+public class DatasetNullAssembler extends AssemblerBase
{
public static Resource getType() { return DatasetAssemblerVocab.tDatasetNull ; }
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterSort.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterSort.java
index f500526c5af..675f5769e0b 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterSort.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterSort.java
@@ -27,7 +27,6 @@
import org.apache.jena.atlas.data.ThresholdPolicy ;
import org.apache.jena.atlas.data.ThresholdPolicyFactory ;
import org.apache.jena.atlas.iterator.IteratorDelayedInitialization ;
-import org.apache.jena.atlas.lib.Closeable ;
import org.apache.jena.query.QueryCancelledException ;
import org.apache.jena.query.SortCondition ;
import org.apache.jena.riot.system.SerializationFactoryFinder ;
@@ -71,7 +70,7 @@ public void requestCancel()
super.requestCancel() ;
}
- private class SortedBindingIterator extends IteratorDelayedInitialization implements Closeable
+ private class SortedBindingIterator extends IteratorDelayedInitialization
{
private final QueryIterator qIter;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/CastXSD_DateTime.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/CastXSD_DateTime.java
index eab9b96b511..a72c80913a8 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/function/CastXSD_DateTime.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/CastXSD_DateTime.java
@@ -25,7 +25,7 @@
/** Cast DateTime */
-public class CastXSD_DateTime extends CastXSD implements FunctionFactory
+public class CastXSD_DateTime extends CastXSD
{
public CastXSD_DateTime(XSDDatatype dt)
{
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphSPARQL.java b/jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphSPARQL.java
index faafe550f46..8efa29a1871 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphSPARQL.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphSPARQL.java
@@ -44,7 +44,7 @@
* It enables the full Jena API to be used with data only accessible
* via a Dataset. */
-public class GraphSPARQL extends GraphBase implements Graph
+public class GraphSPARQL extends GraphBase
{
private static Logger log = LoggerFactory.getLogger(GraphSPARQL.class) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphSPARQLService.java b/jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphSPARQLService.java
deleted file mode 100644
index 081b19a193c..00000000000
--- a/jena-arq/src/main/java/org/apache/jena/sparql/graph/GraphSPARQLService.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.jena.sparql.graph;
-
-import org.apache.jena.graph.Graph ;
-import org.apache.jena.graph.Node ;
-import org.apache.jena.graph.Triple ;
-import org.apache.jena.graph.impl.GraphBase ;
-import org.apache.jena.sparql.algebra.Op ;
-import org.apache.jena.sparql.algebra.op.OpBGP ;
-import org.apache.jena.sparql.core.BasicPattern ;
-import org.apache.jena.sparql.core.Var ;
-import org.apache.jena.util.iterator.ExtendedIterator ;
-import org.slf4j.Logger ;
-import org.slf4j.LoggerFactory ;
-
-/** This class provides the Jena Graph interface to a remote SPARQL endpoint.
- * Efficiency not guaranteed. */
-
-public class GraphSPARQLService extends GraphBase implements Graph
-{
- private static Logger log = LoggerFactory.getLogger(GraphSPARQLService.class) ;
-
- private String serviceURI ;
- private String graphIRI = null ;
-
- // Remote default graph
- public GraphSPARQLService(String serviceURI)
- {
- this.serviceURI = serviceURI ;
- this.graphIRI = null ;
- }
-
- // Remote named graph
- public GraphSPARQLService(String serviceURI, String graphIRI)
- {
- this.serviceURI = serviceURI ;
- this.graphIRI = graphIRI ;
- }
-
-// @Override
-// public Capabilities getCapabilities()
-// {
-// if (capabilities == null)
-// capabilities = new AllCapabilities()
-// { @Override public boolean handlesLiteralTyping() { return false; } };
-// return capabilities;
-// }
-
- @Override
- protected ExtendedIterator graphBaseFind(Triple m)
- {
- Node s = m.getMatchSubject() ;
- Var sVar = null ;
- if ( s == null )
- {
- sVar = Var.alloc("s") ;
- s = sVar ;
- }
-
- Node p = m.getMatchPredicate() ;
- Var pVar = null ;
- if ( p == null )
- {
- pVar = Var.alloc("p") ;
- p = pVar ;
- }
-
- Node o = m.getMatchObject() ;
- Var oVar = null ;
- if ( o == null )
- {
- oVar = Var.alloc("o") ;
- o = oVar ;
- }
-
- Triple triple = new Triple(s, p ,o) ;
-
- // Evaluate as an algebra expression
- BasicPattern pattern = new BasicPattern() ;
- pattern.add(triple) ;
- Op op = new OpBGP(pattern) ;
-
-// // Make remote execution object.
-// System.err.println("GraphSPARQLService.graphBaseFind: Unimplemented : remote service execution") ;
-// //Plan plan = factory.create(op, getDataset(), BindingRoot.create(), null) ;
-//
-// QueryIterator qIter = plan.iterator() ;
-// List triples = new ArrayList() ;
-//
-//
-// for (; qIter.hasNext() ; )
-// {
-// Binding b = qIter.nextBinding() ;
-// Node sResult = s ;
-// Node pResult = p ;
-// Node oResult = o ;
-// if ( sVar != null )
-// sResult = b.get(sVar) ;
-// if ( pVar != null )
-// pResult = b.get(pVar) ;
-// if ( oVar != null )
-// oResult = b.get(oVar) ;
-// Triple resultTriple = new Triple(sResult, pResult, oResult) ;
-// if ( log.isDebugEnabled() )
-// log.debug(" "+resultTriple) ;
-// triples.add(resultTriple) ;
-// }
-// qIter.close() ;
-// return WrappedIterator.createNoRemove(triples.iterator()) ;
- return null ;
- }
-
-}
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateProcessRemote.java b/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateProcessRemote.java
index bd0b29fae27..e05f24513e3 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateProcessRemote.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateProcessRemote.java
@@ -23,13 +23,12 @@
import org.apache.jena.riot.web.HttpOp ;
import org.apache.jena.sparql.ARQException ;
import org.apache.jena.sparql.util.Context ;
-import org.apache.jena.update.UpdateProcessor ;
import org.apache.jena.update.UpdateRequest ;
/**
* UpdateProcess that send the request to a SPARQL endpoint by using POST of application/sparql-update.
*/
-public class UpdateProcessRemote extends UpdateProcessRemoteBase implements UpdateProcessor
+public class UpdateProcessRemote extends UpdateProcessRemoteBase
{
/**
* Creates a new remote update processor that uses the application/sparql-update submission method
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateProcessRemoteForm.java b/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateProcessRemoteForm.java
index ac1f52bbbf6..77fd27f6ccb 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateProcessRemoteForm.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/modify/UpdateProcessRemoteForm.java
@@ -25,7 +25,6 @@
import org.apache.jena.sparql.engine.http.HttpParams ;
import org.apache.jena.sparql.engine.http.Params ;
import org.apache.jena.sparql.util.Context ;
-import org.apache.jena.update.UpdateProcessor ;
import org.apache.jena.update.UpdateRequest ;
/**
@@ -33,7 +32,7 @@
* form and POST Use of application/sparql-update via @link{UpdateProcessRemote}
* is preferred.
*/
-public class UpdateProcessRemoteForm extends UpdateProcessRemoteBase implements UpdateProcessor {
+public class UpdateProcessRemoteForm extends UpdateProcessRemoteBase {
/**
* Creates a new remote update processor that uses the form URL encoded
diff --git a/jena-arq/src/main/java/org/apache/jena/update/UpdateAction.java b/jena-arq/src/main/java/org/apache/jena/update/UpdateAction.java
index 013ebe6f0ad..e9a147e6161 100644
--- a/jena-arq/src/main/java/org/apache/jena/update/UpdateAction.java
+++ b/jena-arq/src/main/java/org/apache/jena/update/UpdateAction.java
@@ -333,7 +333,6 @@ public static void parseExecute(UsingList usingList, DatasetGraph dataset, Strin
}
/** Parse update operations into a GraphStore by reading it from a file */
- @SuppressWarnings("resource")
public static void parseExecute(UsingList usingList, DatasetGraph dataset, String fileName, Binding inputBinding, String baseURI, Syntax syntax)
{
InputStream in = null ;
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/api/TestQueryExecutionTimeout1.java b/jena-arq/src/test/java/org/apache/jena/sparql/api/TestQueryExecutionTimeout1.java
index d3771a4c740..169bebcb09e 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/api/TestQueryExecutionTimeout1.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/api/TestQueryExecutionTimeout1.java
@@ -91,7 +91,6 @@ public void timeout_02()
public void timeout_03()
{
String qs = prefix + "SELECT * { ?s ?p ?o }" ;
- @SuppressWarnings("resource")
QueryExecution qExec = QueryExecutionFactory.create(qs, ds) ;
qExec.setTimeout(100, TimeUnit.MILLISECONDS) ;
ResultSet rs = qExec.execSelect() ;
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/io/IndentedWriter.java b/jena-base/src/main/java/org/apache/jena/atlas/io/IndentedWriter.java
index 3d7faf2900b..995d32255ef 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/io/IndentedWriter.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/io/IndentedWriter.java
@@ -24,13 +24,12 @@
import java.io.Writer ;
import org.apache.jena.atlas.RuntimeIOException ;
-import org.apache.jena.atlas.lib.Closeable ;
/** A writer that records what the current indentation level is, and
* uses that to insert a prefix at each line.
* It can also insert line numbers at the beginning of lines. */
-public class IndentedWriter extends AWriterBase implements AWriter, Closeable
+public class IndentedWriter extends AWriterBase
{
/** Stdout wrapped in an IndentedWriter - no line numbers */
public static final IndentedWriter stdout = new IndentedWriter(System.out) ;
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/io/Writer2.java b/jena-base/src/main/java/org/apache/jena/atlas/io/Writer2.java
index 100ec6fc78d..779ab4d54ca 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/io/Writer2.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/io/Writer2.java
@@ -22,11 +22,9 @@
import java.io.IOException ;
import java.io.Writer ;
-import org.apache.jena.atlas.lib.Closeable ;
-
/** A Writer, without the checked exceptions. */
-public class Writer2 extends AWriterBase implements AWriter, Closeable
+public class Writer2 extends AWriterBase
{
protected final Writer writer ;
diff --git a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/AssemblerGroup.java b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/AssemblerGroup.java
index 02d21ca6b3f..dae306156fb 100644
--- a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/AssemblerGroup.java
+++ b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/AssemblerGroup.java
@@ -25,7 +25,7 @@
import org.apache.jena.rdf.model.* ;
import org.apache.jena.vocabulary.RDFS ;
-public abstract class AssemblerGroup extends AssemblerBase implements Assembler
+public abstract class AssemblerGroup extends AssemblerBase
{
public abstract AssemblerGroup implementWith( Resource type, Assembler a );
diff --git a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/ContentAssembler.java b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/ContentAssembler.java
index 76c2ee59d65..e804d9f5bb6 100644
--- a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/ContentAssembler.java
+++ b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/ContentAssembler.java
@@ -28,7 +28,7 @@
import org.apache.jena.util.* ;
import org.apache.jena.vocabulary.* ;
-public class ContentAssembler extends AssemblerBase implements Assembler
+public class ContentAssembler extends AssemblerBase
{
protected final FileManager defaultFileManager;
diff --git a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/DefaultModelAssembler.java b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/DefaultModelAssembler.java
index dbfdc351458..41f5005ea33 100644
--- a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/DefaultModelAssembler.java
+++ b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/DefaultModelAssembler.java
@@ -21,7 +21,7 @@
import org.apache.jena.assembler.* ;
import org.apache.jena.rdf.model.* ;
-public class DefaultModelAssembler extends ModelAssembler implements Assembler
+public class DefaultModelAssembler extends ModelAssembler
{
@Override
public Object open( Assembler a, Resource root, Mode mode )
diff --git a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/MemoryModelAssembler.java b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/MemoryModelAssembler.java
index 2509b2c3d48..7bab9c21a69 100644
--- a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/MemoryModelAssembler.java
+++ b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/MemoryModelAssembler.java
@@ -26,7 +26,7 @@
import org.apache.jena.rdf.model.ModelFactory ;
import org.apache.jena.rdf.model.Resource ;
-public class MemoryModelAssembler extends ModelAssembler implements Assembler
+public class MemoryModelAssembler extends ModelAssembler
{
@Override
public Object open( Assembler a, Resource root, Mode mode )
diff --git a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/ModelAssembler.java b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/ModelAssembler.java
index 35d7491e514..dd14b67691a 100644
--- a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/ModelAssembler.java
+++ b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/ModelAssembler.java
@@ -27,7 +27,7 @@
import org.apache.jena.shared.* ;
import org.apache.jena.vocabulary.RDF ;
-public abstract class ModelAssembler extends AssemblerBase implements Assembler
+public abstract class ModelAssembler extends AssemblerBase
{
protected abstract Model openEmptyModel( Assembler a, Resource root, Mode mode );
diff --git a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/OntModelAssembler.java b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/OntModelAssembler.java
index 8f408b6d1e0..73823cfa9b5 100644
--- a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/OntModelAssembler.java
+++ b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/OntModelAssembler.java
@@ -24,7 +24,7 @@
import org.apache.jena.ontology.* ;
import org.apache.jena.rdf.model.* ;
-public class OntModelAssembler extends InfModelAssembler implements Assembler
+public class OntModelAssembler extends InfModelAssembler
{
@Override public Model openEmptyModel( Assembler a, Resource root, Mode mode )
{
diff --git a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/OntModelSpecAssembler.java b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/OntModelSpecAssembler.java
index 1e8a21c6144..27fbab384cb 100644
--- a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/OntModelSpecAssembler.java
+++ b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/OntModelSpecAssembler.java
@@ -35,7 +35,7 @@
unless the root is ja:SPOO for some constant SPOO of OntModelSpec,
in which case the defaults are taken from there.
*/
-public class OntModelSpecAssembler extends AssemblerBase implements Assembler
+public class OntModelSpecAssembler extends AssemblerBase
{
private static final OntModelSpec DEFAULT = OntModelSpec.OWL_MEM_RDFS_INF;
diff --git a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/PrefixMappingAssembler.java b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/PrefixMappingAssembler.java
index 21baa0171f6..b8f58a193e1 100644
--- a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/PrefixMappingAssembler.java
+++ b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/PrefixMappingAssembler.java
@@ -22,7 +22,7 @@
import org.apache.jena.rdf.model.* ;
import org.apache.jena.shared.PrefixMapping ;
-public class PrefixMappingAssembler extends AssemblerBase implements Assembler
+public class PrefixMappingAssembler extends AssemblerBase
{
@Override
public Object open( Assembler a, Resource root, Mode irrelevant )
diff --git a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/ReasonerFactoryAssembler.java b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/ReasonerFactoryAssembler.java
index 77e84d657e1..5e4e42204e1 100644
--- a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/ReasonerFactoryAssembler.java
+++ b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/ReasonerFactoryAssembler.java
@@ -41,7 +41,7 @@ the class up in the registry) or by class name; otherwise it defaults to
Thanks to Adam Cimarosti for provoking this code and providing an
example implementation.
*/
-public class ReasonerFactoryAssembler extends AssemblerBase implements Assembler
+public class ReasonerFactoryAssembler extends AssemblerBase
{
@Override
public Object open( Assembler a, Resource root, Mode irrelevant )
diff --git a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/RuleSetAssembler.java b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/RuleSetAssembler.java
index e53a2d99429..969994d61b0 100644
--- a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/RuleSetAssembler.java
+++ b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/RuleSetAssembler.java
@@ -24,7 +24,7 @@
import org.apache.jena.rdf.model.* ;
import org.apache.jena.reasoner.rulesys.Rule ;
-public class RuleSetAssembler extends AssemblerBase implements Assembler
+public class RuleSetAssembler extends AssemblerBase
{
@Override public Object open( Assembler a, Resource root, Mode irrelevant )
{
diff --git a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/UnionModelAssembler.java b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/UnionModelAssembler.java
index 4186e59912d..e61599fc37a 100644
--- a/jena-core/src/main/java/org/apache/jena/assembler/assemblers/UnionModelAssembler.java
+++ b/jena-core/src/main/java/org/apache/jena/assembler/assemblers/UnionModelAssembler.java
@@ -29,7 +29,7 @@
import org.apache.jena.rdf.model.Resource ;
import org.apache.jena.rdf.model.StmtIterator ;
-public class UnionModelAssembler extends ModelAssembler implements Assembler
+public class UnionModelAssembler extends ModelAssembler
{
@Override
diff --git a/jena-core/src/main/java/org/apache/jena/datatypes/xsd/impl/RDFLangString.java b/jena-core/src/main/java/org/apache/jena/datatypes/xsd/impl/RDFLangString.java
index 89c84bcccb3..d363b3fe784 100644
--- a/jena-core/src/main/java/org/apache/jena/datatypes/xsd/impl/RDFLangString.java
+++ b/jena-core/src/main/java/org/apache/jena/datatypes/xsd/impl/RDFLangString.java
@@ -28,7 +28,7 @@
* This is not rdf:plainLiteral!
*/
-public class RDFLangString extends BaseDatatype implements RDFDatatype {
+public class RDFLangString extends BaseDatatype {
/** Singleton instance */
// Include the string for the RDF namespace, not use RDF.getURI(), to avoid an initializer circularity
public static final RDFDatatype rdfLangString = new RDFLangString("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString");
diff --git a/jena-core/src/main/java/org/apache/jena/datatypes/xsd/impl/XMLLiteralType.java b/jena-core/src/main/java/org/apache/jena/datatypes/xsd/impl/XMLLiteralType.java
index dd22430b908..f4fde40acdf 100644
--- a/jena-core/src/main/java/org/apache/jena/datatypes/xsd/impl/XMLLiteralType.java
+++ b/jena-core/src/main/java/org/apache/jena/datatypes/xsd/impl/XMLLiteralType.java
@@ -37,7 +37,7 @@
* Builtin data type to represent XMLLiteral (i.e. items created
* by use of rdf:parsetype='literal'.
*/
-public class XMLLiteralType extends BaseDatatype implements RDFDatatype {
+public class XMLLiteralType extends BaseDatatype {
/** Singleton instance */
// Include the string for the RDF namespace, not use RDF.getURI(), to avoid an initializer circularity
public static final RDFDatatype theXMLLiteralType = new XMLLiteralType("http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral");
diff --git a/jena-core/src/main/java/org/apache/jena/graph/compose/Delta.java b/jena-core/src/main/java/org/apache/jena/graph/compose/Delta.java
index b35ff68b64f..91949c20167 100644
--- a/jena-core/src/main/java/org/apache/jena/graph/compose/Delta.java
+++ b/jena-core/src/main/java/org/apache/jena/graph/compose/Delta.java
@@ -31,7 +31,7 @@
* while this graph is in use.
*/
-public class Delta extends CompositionBase implements Graph
+public class Delta extends CompositionBase
{
private Graph base ;
private Graph additions ;
diff --git a/jena-core/src/main/java/org/apache/jena/graph/compose/Difference.java b/jena-core/src/main/java/org/apache/jena/graph/compose/Difference.java
index e37f40e7d45..f46d978e095 100644
--- a/jena-core/src/main/java/org/apache/jena/graph/compose/Difference.java
+++ b/jena-core/src/main/java/org/apache/jena/graph/compose/Difference.java
@@ -25,7 +25,7 @@
Class representing the dynamic set difference L - R of two graphs. This is updatable;
the updates are written through to one or other of the base graphs.
*/
-public class Difference extends Dyadic implements Graph
+public class Difference extends Dyadic
{
/**
Initialise a graph representing the difference L - R.
diff --git a/jena-core/src/main/java/org/apache/jena/graph/compose/Intersection.java b/jena-core/src/main/java/org/apache/jena/graph/compose/Intersection.java
index 90bfcb573f4..5df90e7acf7 100644
--- a/jena-core/src/main/java/org/apache/jena/graph/compose/Intersection.java
+++ b/jena-core/src/main/java/org/apache/jena/graph/compose/Intersection.java
@@ -31,7 +31,7 @@
/**
The dynamic intersection of two graphs L and R. add() affects both L and R, whereas delete() affects L only.
*/
-public class Intersection extends Dyadic implements Graph
+public class Intersection extends Dyadic
{
public Intersection( Graph L, Graph R )
{
diff --git a/jena-core/src/main/java/org/apache/jena/graph/compose/PolyadicPrefixMappingImpl.java b/jena-core/src/main/java/org/apache/jena/graph/compose/PolyadicPrefixMappingImpl.java
index 2a31edf0d5b..e70dfc02421 100644
--- a/jena-core/src/main/java/org/apache/jena/graph/compose/PolyadicPrefixMappingImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/graph/compose/PolyadicPrefixMappingImpl.java
@@ -26,7 +26,7 @@
import org.apache.jena.util.CollectionFactory ;
-public class PolyadicPrefixMappingImpl extends PrefixMappingImpl implements PrefixMapping
+public class PolyadicPrefixMappingImpl extends PrefixMappingImpl
{
private Polyadic poly;
private PrefixMapping pending = new PrefixMappingImpl();
diff --git a/jena-core/src/main/java/org/apache/jena/graph/compose/Union.java b/jena-core/src/main/java/org/apache/jena/graph/compose/Union.java
index 7375b61e509..72efb5793eb 100644
--- a/jena-core/src/main/java/org/apache/jena/graph/compose/Union.java
+++ b/jena-core/src/main/java/org/apache/jena/graph/compose/Union.java
@@ -31,7 +31,7 @@
@see MultiUnion
*/
-public class Union extends Dyadic implements Graph
+public class Union extends Dyadic
{
public Union( Graph L, Graph R )
{ super( L, R ); }
diff --git a/jena-core/src/main/java/org/apache/jena/mem/GraphTripleStore.java b/jena-core/src/main/java/org/apache/jena/mem/GraphTripleStore.java
index 5a915a60cac..cf8ef07b9e2 100644
--- a/jena-core/src/main/java/org/apache/jena/mem/GraphTripleStore.java
+++ b/jena-core/src/main/java/org/apache/jena/mem/GraphTripleStore.java
@@ -20,7 +20,6 @@
import org.apache.jena.graph.* ;
import org.apache.jena.graph.Triple.* ;
-import org.apache.jena.graph.impl.TripleStore ;
/**
GraphTripleStore - the underlying triple-indexed triple store for GraphMem et al,
@@ -29,7 +28,7 @@
*/
-public class GraphTripleStore extends GraphTripleStoreBase implements TripleStore
+public class GraphTripleStore extends GraphTripleStoreBase
{
public GraphTripleStore( Graph parent )
{
diff --git a/jena-core/src/main/java/org/apache/jena/mem/GraphTripleStoreMem.java b/jena-core/src/main/java/org/apache/jena/mem/GraphTripleStoreMem.java
index 38974581ce6..3f44461071e 100644
--- a/jena-core/src/main/java/org/apache/jena/mem/GraphTripleStoreMem.java
+++ b/jena-core/src/main/java/org/apache/jena/mem/GraphTripleStoreMem.java
@@ -20,9 +20,8 @@
import org.apache.jena.graph.Graph ;
import org.apache.jena.graph.Triple.Field ;
-import org.apache.jena.graph.impl.TripleStore ;
-public class GraphTripleStoreMem extends GraphTripleStoreBase implements TripleStore
+public class GraphTripleStoreMem extends GraphTripleStoreBase
{
public GraphTripleStoreMem( Graph parent )
{
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/AnnotationProperty.java b/jena-core/src/main/java/org/apache/jena/ontology/AnnotationProperty.java
index 246ed057370..b2d99ef3235 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/AnnotationProperty.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/AnnotationProperty.java
@@ -21,11 +21,6 @@
package org.apache.jena.ontology;
-// Imports
-///////////////
-import org.apache.jena.rdf.model.* ;
-
-
/**
*
* Interface that represents the category of annotation properties in an ontology
@@ -36,8 +31,7 @@
* have any annotation properties.
*
*/
-public interface AnnotationProperty
- extends OntProperty, Property
+public interface AnnotationProperty extends OntProperty
{
// Constants
//////////////////////////////////
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/AllDifferentImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/AllDifferentImpl.java
index d72e5d767ac..4328687cb76 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/AllDifferentImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/AllDifferentImpl.java
@@ -52,7 +52,6 @@ public class AllDifferentImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/AllValuesFromRestrictionImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/AllValuesFromRestrictionImpl.java
index 4a30166b3c1..92c47d832b6 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/AllValuesFromRestrictionImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/AllValuesFromRestrictionImpl.java
@@ -50,7 +50,6 @@ public class AllValuesFromRestrictionImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/AnnotationPropertyImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/AnnotationPropertyImpl.java
index 0382ebb14bb..9d93527efb7 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/AnnotationPropertyImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/AnnotationPropertyImpl.java
@@ -49,7 +49,6 @@ public class AnnotationPropertyImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/CardinalityQRestrictionImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/CardinalityQRestrictionImpl.java
index 4808d5e1054..43a8e19251f 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/CardinalityQRestrictionImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/CardinalityQRestrictionImpl.java
@@ -48,7 +48,6 @@ public class CardinalityQRestrictionImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/CardinalityRestrictionImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/CardinalityRestrictionImpl.java
index 91bba743c0e..3db78315bac 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/CardinalityRestrictionImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/CardinalityRestrictionImpl.java
@@ -49,7 +49,6 @@ public class CardinalityRestrictionImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/ComplementClassImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/ComplementClassImpl.java
index a576d7b1ceb..6a0e113c86b 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/ComplementClassImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/ComplementClassImpl.java
@@ -52,7 +52,6 @@ public class ComplementClassImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/DataRangeImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/DataRangeImpl.java
index 557e73c7389..75ef9a36311 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/DataRangeImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/DataRangeImpl.java
@@ -53,7 +53,6 @@ public class DataRangeImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/DatatypePropertyImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/DatatypePropertyImpl.java
index c4149ce5feb..9571acc381c 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/DatatypePropertyImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/DatatypePropertyImpl.java
@@ -50,7 +50,6 @@ public class DatatypePropertyImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/EnumeratedClassImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/EnumeratedClassImpl.java
index 71f29d6d4bd..7ac54c5aee3 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/EnumeratedClassImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/EnumeratedClassImpl.java
@@ -52,7 +52,6 @@ public class EnumeratedClassImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/FunctionalPropertyImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/FunctionalPropertyImpl.java
index 6120d33e1c7..c06351b4cd9 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/FunctionalPropertyImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/FunctionalPropertyImpl.java
@@ -50,7 +50,6 @@ public class FunctionalPropertyImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/HasValueRestrictionImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/HasValueRestrictionImpl.java
index 4402f2965c8..e96ac23435c 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/HasValueRestrictionImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/HasValueRestrictionImpl.java
@@ -50,7 +50,6 @@ public class HasValueRestrictionImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/IndividualImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/IndividualImpl.java
index 56c249d8dda..16c0ff28c04 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/IndividualImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/IndividualImpl.java
@@ -50,7 +50,6 @@ public class IndividualImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/IntersectionClassImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/IntersectionClassImpl.java
index 20c66f21882..a03437a6d42 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/IntersectionClassImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/IntersectionClassImpl.java
@@ -49,7 +49,6 @@ public class IntersectionClassImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/InverseFunctionalPropertyImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/InverseFunctionalPropertyImpl.java
index 4d0157b959a..0f0fdf33dbe 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/InverseFunctionalPropertyImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/InverseFunctionalPropertyImpl.java
@@ -50,7 +50,6 @@ public class InverseFunctionalPropertyImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/MaxCardinalityQRestrictionImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/MaxCardinalityQRestrictionImpl.java
index 5495d858901..f124b4ccc28 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/MaxCardinalityQRestrictionImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/MaxCardinalityQRestrictionImpl.java
@@ -48,7 +48,6 @@ public class MaxCardinalityQRestrictionImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/MaxCardinalityRestrictionImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/MaxCardinalityRestrictionImpl.java
index 71590fa289a..7bc3a97993a 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/MaxCardinalityRestrictionImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/MaxCardinalityRestrictionImpl.java
@@ -49,7 +49,6 @@ public class MaxCardinalityRestrictionImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/MinCardinalityQRestrictionImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/MinCardinalityQRestrictionImpl.java
index 4748cd499bd..6f8602d39d3 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/MinCardinalityQRestrictionImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/MinCardinalityQRestrictionImpl.java
@@ -48,7 +48,6 @@ public class MinCardinalityQRestrictionImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/MinCardinalityRestrictionImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/MinCardinalityRestrictionImpl.java
index 184be05d614..af006eab62c 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/MinCardinalityRestrictionImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/MinCardinalityRestrictionImpl.java
@@ -49,7 +49,6 @@ public class MinCardinalityRestrictionImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/ObjectPropertyImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/ObjectPropertyImpl.java
index 165041f12d0..da6dcc66a37 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/ObjectPropertyImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/ObjectPropertyImpl.java
@@ -54,7 +54,6 @@ public class ObjectPropertyImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/OntClassImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/OntClassImpl.java
index bbbe3168b8b..e2aae367a19 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/OntClassImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/OntClassImpl.java
@@ -71,7 +71,6 @@ public class OntClassImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/OntPropertyImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/OntPropertyImpl.java
index 1b9400aed15..22802993651 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/OntPropertyImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/OntPropertyImpl.java
@@ -54,7 +54,6 @@ public class OntPropertyImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/OntResourceImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/OntResourceImpl.java
index fe9038b55ba..97911de77d6 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/OntResourceImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/OntResourceImpl.java
@@ -69,7 +69,6 @@ public class OntResourceImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/OntologyImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/OntologyImpl.java
index f8485ff32bd..98821c1360a 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/OntologyImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/OntologyImpl.java
@@ -50,7 +50,6 @@ public class OntologyImpl
/**
* A factory for generating Ontology facets from nodes in enhanced graphs.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/QualifiedRestrictionImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/QualifiedRestrictionImpl.java
index 158598aa5d6..04643bb7799 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/QualifiedRestrictionImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/QualifiedRestrictionImpl.java
@@ -49,7 +49,6 @@ public class QualifiedRestrictionImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/RestrictionImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/RestrictionImpl.java
index 837339938b7..0cfccf11c36 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/RestrictionImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/RestrictionImpl.java
@@ -50,7 +50,6 @@ public class RestrictionImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/SomeValuesFromRestrictionImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/SomeValuesFromRestrictionImpl.java
index 5fa5f701f38..8b6917f9164 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/SomeValuesFromRestrictionImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/SomeValuesFromRestrictionImpl.java
@@ -50,7 +50,6 @@ public class SomeValuesFromRestrictionImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/SymmetricPropertyImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/SymmetricPropertyImpl.java
index da7b4a03144..90099f90603 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/SymmetricPropertyImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/SymmetricPropertyImpl.java
@@ -50,7 +50,6 @@ public class SymmetricPropertyImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/TransitivePropertyImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/TransitivePropertyImpl.java
index 5409d457b86..3bf8b859c2c 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/TransitivePropertyImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/TransitivePropertyImpl.java
@@ -50,7 +50,6 @@ public class TransitivePropertyImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/UnionClassImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/UnionClassImpl.java
index d78c932ee9f..690f7c86ce1 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/UnionClassImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/UnionClassImpl.java
@@ -49,7 +49,6 @@ public class UnionClassImpl
* Note: should not be invoked directly by user code: use
* {@link org.apache.jena.rdf.model.RDFNode#as as()} instead.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override
public EnhNode wrap( Node n, EnhGraph eg ) {
diff --git a/jena-core/src/main/java/org/apache/jena/rdf/model/impl/AltImpl.java b/jena-core/src/main/java/org/apache/jena/rdf/model/impl/AltImpl.java
index 3ac85a9cc73..3a42e93dfcb 100644
--- a/jena-core/src/main/java/org/apache/jena/rdf/model/impl/AltImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/rdf/model/impl/AltImpl.java
@@ -27,7 +27,6 @@
*/
public class AltImpl extends ContainerImpl implements Alt {
- @SuppressWarnings("hiding")
final static public Implementation factory = new Implementation() {
@Override
public boolean canWrap( Node n, EnhGraph eg )
diff --git a/jena-core/src/main/java/org/apache/jena/rdf/model/impl/BagImpl.java b/jena-core/src/main/java/org/apache/jena/rdf/model/impl/BagImpl.java
index 4df6a678fc5..471a048935c 100644
--- a/jena-core/src/main/java/org/apache/jena/rdf/model/impl/BagImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/rdf/model/impl/BagImpl.java
@@ -26,7 +26,6 @@
*/
public class BagImpl extends ContainerImpl implements Bag {
- @SuppressWarnings("hiding")
final static public Implementation factory = new Implementation() {
@Override
public boolean canWrap( Node n, EnhGraph eg )
diff --git a/jena-core/src/main/java/org/apache/jena/rdf/model/impl/ModelCom.java b/jena-core/src/main/java/org/apache/jena/rdf/model/impl/ModelCom.java
index 8d25a3e48ba..fb8bf443031 100644
--- a/jena-core/src/main/java/org/apache/jena/rdf/model/impl/ModelCom.java
+++ b/jena-core/src/main/java/org/apache/jena/rdf/model/impl/ModelCom.java
@@ -46,8 +46,7 @@
* model implemenations can be derived.
*/
-public class ModelCom extends EnhGraph
-implements Model, PrefixMapping, Lock
+public class ModelCom extends EnhGraph implements Model
{
private static final RDFReaderF readerFactory = new RDFReaderFImpl();
diff --git a/jena-core/src/main/java/org/apache/jena/rdf/model/impl/PropertyImpl.java b/jena-core/src/main/java/org/apache/jena/rdf/model/impl/PropertyImpl.java
index efd71114e58..e6072378962 100644
--- a/jena-core/src/main/java/org/apache/jena/rdf/model/impl/PropertyImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/rdf/model/impl/PropertyImpl.java
@@ -32,7 +32,6 @@
public class PropertyImpl extends ResourceImpl implements Property
{
- @SuppressWarnings("hiding")
final static public Implementation factory = new Implementation()
{
@Override
diff --git a/jena-core/src/main/java/org/apache/jena/rdf/model/impl/RDFListImpl.java b/jena-core/src/main/java/org/apache/jena/rdf/model/impl/RDFListImpl.java
index d9f5e6d19bf..21188de1bc1 100644
--- a/jena-core/src/main/java/org/apache/jena/rdf/model/impl/RDFListImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/rdf/model/impl/RDFListImpl.java
@@ -56,7 +56,6 @@ public class RDFListImpl
/**
* A factory for generating RDFList facets from nodes in enhanced graphs.
*/
- @SuppressWarnings("hiding")
public static Implementation factory = new Implementation() {
@Override public EnhNode wrap( Node n, EnhGraph eg ) {
if (canWrap( n, eg )) {
diff --git a/jena-core/src/main/java/org/apache/jena/rdf/model/impl/SeqImpl.java b/jena-core/src/main/java/org/apache/jena/rdf/model/impl/SeqImpl.java
index c77fa397511..edb7362953b 100644
--- a/jena-core/src/main/java/org/apache/jena/rdf/model/impl/SeqImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/rdf/model/impl/SeqImpl.java
@@ -29,7 +29,6 @@
public class SeqImpl extends ContainerImpl implements Seq {
- @SuppressWarnings("hiding")
final static public Implementation factory = new Implementation() {
@Override
public boolean canWrap( Node n, EnhGraph eg )
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/AttributeLexer.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/AttributeLexer.java
index 01a79e2cafe..99c96dc14ba 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/AttributeLexer.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/AttributeLexer.java
@@ -20,13 +20,12 @@
import java.util.BitSet;
-import org.apache.jena.rdfxml.xmlinput.ARPErrorNumbers ;
import org.apache.jena.rdfxml.xmlinput.states.Frame ;
import org.xml.sax.Attributes;
import org.xml.sax.SAXParseException;
-public class AttributeLexer extends QNameLexer implements ARPErrorNumbers {
+public class AttributeLexer extends QNameLexer {
public AttributeLexer(Frame f, int which, int bad) {
super(f, which, bad);
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/SAX2RDFImpl.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/SAX2RDFImpl.java
index 1e7f23da090..05ad68fa9fd 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/SAX2RDFImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/SAX2RDFImpl.java
@@ -20,11 +20,8 @@
import org.apache.jena.rdfxml.xmlinput.SAX2RDF ;
import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
-import org.xml.sax.ext.LexicalHandler;
/**
* This class is public merely to reduce the amount of irrelevant documentation
* generated by Javadoc for {@link SAX2RDF}.
@@ -33,8 +30,7 @@
* implements the functionality needed by {@link SAX2RDF}. The API given here
* is the familiar SAX.
*/
-public class SAX2RDFImpl extends XMLHandler implements LexicalHandler,
- ContentHandler, ErrorHandler {
+public class SAX2RDFImpl extends XMLHandler {
private int depth;
final private String lang;
protected SAX2RDFImpl(String base, String l) {
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/XMLBaselessContext.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/XMLBaselessContext.java
index 9f5f0559ed0..89087816147 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/XMLBaselessContext.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/XMLBaselessContext.java
@@ -20,9 +20,8 @@
import org.xml.sax.SAXParseException;
import org.apache.jena.iri.IRI;
-import org.apache.jena.rdfxml.xmlinput.ARPErrorNumbers ;
-public class XMLBaselessContext extends AbsXMLContext implements ARPErrorNumbers {
+public class XMLBaselessContext extends AbsXMLContext {
final int errno;
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/XMLContext.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/XMLContext.java
index ff8052346fb..9887e7b9382 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/XMLContext.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/XMLContext.java
@@ -25,7 +25,6 @@
package org.apache.jena.rdfxml.xmlinput.impl;
import org.apache.jena.iri.IRI ;
-import org.apache.jena.rdfxml.xmlinput.ARPErrorNumbers ;
import org.xml.sax.SAXParseException ;
/**
@@ -33,7 +32,7 @@
* Both the baseURI and the lang may be tainted with errors. They should not be
* accessed without providing a taint object to propogate such tainting.
*/
-public class XMLContext extends AbsXMLContext implements ARPErrorNumbers
+public class XMLContext extends AbsXMLContext
{
// final private String base;
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/states/AbsXMLLiteral.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/states/AbsXMLLiteral.java
index be9ebc70408..3363b529b6a 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/states/AbsXMLLiteral.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/states/AbsXMLLiteral.java
@@ -171,7 +171,7 @@ public void characters(char[] chrs, int start, int length) throws SAXParseExcept
}
@Override
- public void comment(char[] ch, int start, int length) throws SAXParseException {
+ public void comment(char[] ch, int start, int length) {
append("");
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/states/Frame.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/states/Frame.java
index 0b1f11072b5..a027794024e 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/states/Frame.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/states/Frame.java
@@ -18,13 +18,11 @@
package org.apache.jena.rdfxml.xmlinput.states;
-import org.apache.jena.rdfxml.xmlinput.ARPErrorNumbers ;
import org.apache.jena.rdfxml.xmlinput.impl.* ;
import org.xml.sax.Attributes;
import org.xml.sax.SAXParseException;
-public abstract class Frame extends ParserSupport implements Names, FrameI,
- ARPErrorNumbers {
+public abstract class Frame extends ParserSupport implements FrameI {
final FrameI parent;
protected boolean nonWhiteMsgGiven = false;
@@ -62,8 +60,7 @@ public void afterChild() {
}
@Override
- public void comment(char[] ch, int start, int length)
- throws SAXParseException {
+ public void comment(char[] ch, int start, int length) {
// generally ignore
}
@@ -73,8 +70,7 @@ public void comment(char[] ch, int start, int length)
/**
* endElement is called on the state of the frame created by the matching
* startElement.
- *
- * @throws SAXParseException
+ * @throws SAXParseException
*
*/
@Override
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/states/OuterXMLLiteral.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/states/OuterXMLLiteral.java
index dd111f712e1..271bce362ce 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/states/OuterXMLLiteral.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/states/OuterXMLLiteral.java
@@ -41,11 +41,7 @@ public void endElement() throws SAXParseException {
ARPString xmlLiteral = new ARPString(this,rslt.toString(),parseType );
if (taint.isTainted())
xmlLiteral.taint();
- ((WantsObjectFrameI)getParent()).theObject(
- xmlLiteral
- );
-
-
+ ((WantsObjectFrameI)getParent()).theObject( xmlLiteral );
}
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/states/WantTypedLiteral.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/states/WantTypedLiteral.java
index 7dbc443a99d..0482793f1a8 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/states/WantTypedLiteral.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/states/WantTypedLiteral.java
@@ -24,7 +24,7 @@
import org.xml.sax.Attributes;
import org.xml.sax.SAXParseException;
-public class WantTypedLiteral extends AbsWantLiteralValueOrDescription implements FrameI {
+public class WantTypedLiteral extends AbsWantLiteralValueOrDescription {
final URIReference dtURI;
public WantTypedLiteral(WantsObjectFrameI p, String datatypeURI, AbsXMLContext ap)
diff --git a/jena-core/src/main/java/org/apache/jena/reasoner/BaseInfGraph.java b/jena-core/src/main/java/org/apache/jena/reasoner/BaseInfGraph.java
index ca2d84c815b..6046d0bd2c0 100644
--- a/jena-core/src/main/java/org/apache/jena/reasoner/BaseInfGraph.java
+++ b/jena-core/src/main/java/org/apache/jena/reasoner/BaseInfGraph.java
@@ -163,8 +163,7 @@ public void clear()
public TransactionHandler getTransactionHandler()
{ return new InfTransactionHandler( this ); }
- public static class InfTransactionHandler
- extends TransactionHandlerBase implements TransactionHandler
+ public static class InfTransactionHandler extends TransactionHandlerBase
{
protected final BaseInfGraph base;
diff --git a/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/GenericRuleReasoner.java b/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/GenericRuleReasoner.java
index 7bb8fc3094e..77fd4fb0f18 100644
--- a/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/GenericRuleReasoner.java
+++ b/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/GenericRuleReasoner.java
@@ -43,7 +43,6 @@ public class GenericRuleReasoner extends FBRuleReasoner {
protected RuleMode mode = HYBRID;
/** Flag, if true we cache the closure of the pure rule set with its axioms */
- @SuppressWarnings("hiding")
protected static final boolean cachePreload = true;
/** Flag, if true then subClass and subProperty lattices will be optimized using TGCs, only applicable to HYBRID reasoners */
diff --git a/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/OWLMicroReasoner.java b/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/OWLMicroReasoner.java
index 7b7723161d7..205cc97a218 100644
--- a/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/OWLMicroReasoner.java
+++ b/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/OWLMicroReasoner.java
@@ -37,7 +37,7 @@
* There is some experimental support for the cheaper class restriction handlingly which
* should not be relied on at this point.
*/
-public class OWLMicroReasoner extends GenericRuleReasoner implements Reasoner {
+public class OWLMicroReasoner extends GenericRuleReasoner {
/** The location of the OWL rule definitions on the class path */
protected static final String MICRO_RULE_FILE = "etc/owl-fb-micro.rules";
diff --git a/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/OWLMiniReasoner.java b/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/OWLMiniReasoner.java
index 92e273b82b4..aca9abab0ca 100644
--- a/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/OWLMiniReasoner.java
+++ b/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/OWLMiniReasoner.java
@@ -33,7 +33,7 @@
* omits inheritance of range implications for XSD datatype ranges
*
*/
-public class OWLMiniReasoner extends GenericRuleReasoner implements Reasoner {
+public class OWLMiniReasoner extends GenericRuleReasoner {
/** The location of the OWL rule definitions on the class path */
protected static final String MINI_RULE_FILE = "etc/owl-fb-mini.rules";
diff --git a/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/impl/SafeGraph.java b/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/impl/SafeGraph.java
index cc055615b8e..e9b2781bc06 100644
--- a/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/impl/SafeGraph.java
+++ b/jena-core/src/main/java/org/apache/jena/reasoner/rulesys/impl/SafeGraph.java
@@ -30,7 +30,7 @@
* triples and hides them from API queries so that consumers
* of it are safe (but can use getRawGraph() to get back the unsafe graph.
*/
-public class SafeGraph extends WrappedGraph implements Graph {
+public class SafeGraph extends WrappedGraph {
/** Wrap a graph to hide generalized triples */
public SafeGraph(Graph base) {
diff --git a/jena-core/src/main/java/org/apache/jena/reasoner/transitiveReasoner/TransitiveGraphCache.java b/jena-core/src/main/java/org/apache/jena/reasoner/transitiveReasoner/TransitiveGraphCache.java
index a21642e224b..f7b8d0f0750 100644
--- a/jena-core/src/main/java/org/apache/jena/reasoner/transitiveReasoner/TransitiveGraphCache.java
+++ b/jena-core/src/main/java/org/apache/jena/reasoner/transitiveReasoner/TransitiveGraphCache.java
@@ -92,7 +92,7 @@ static interface Visitor {
* Inner class used to walk backward links of the graph.
* The triples are dynamically allocated which is costly.
*/
- static class GraphWalker extends NiceIterator implements ExtendedIterator {
+ static class GraphWalker extends NiceIterator {
/** Indicate if this is a shallow or deep walk */
boolean isDeep;
@@ -215,7 +215,7 @@ protected void popStack() {
/**
* Inner class used to do a complete walk over the graph
*/
- private static class FullGraphWalker extends NiceIterator implements ExtendedIterator {
+ private static class FullGraphWalker extends NiceIterator {
/** Flag whether we are walking over the closed or direct relations */
boolean closed;
diff --git a/jena-core/src/main/java/org/apache/jena/util/cache/RandCache.java b/jena-core/src/main/java/org/apache/jena/util/cache/RandCache.java
index 4b6c500e80c..89a2776d609 100644
--- a/jena-core/src/main/java/org/apache/jena/util/cache/RandCache.java
+++ b/jena-core/src/main/java/org/apache/jena/util/cache/RandCache.java
@@ -25,7 +25,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class RandCache implements Cache, CacheControl {
+public class RandCache implements Cache {
int size;
int threshhold;
boolean enabled = true;
diff --git a/jena-core/src/main/java/org/apache/jena/util/iterator/Map1Iterator.java b/jena-core/src/main/java/org/apache/jena/util/iterator/Map1Iterator.java
index ea79c7ae705..b7d5fe2edff 100644
--- a/jena-core/src/main/java/org/apache/jena/util/iterator/Map1Iterator.java
+++ b/jena-core/src/main/java/org/apache/jena/util/iterator/Map1Iterator.java
@@ -26,7 +26,7 @@
delivering them; supports remove if the underlying iterator does.
*/
-public class Map1Iterator extends NiceIterator implements ClosableIterator
+public class Map1Iterator extends NiceIterator
{
private Function map;
private Iterator base;
diff --git a/jena-core/src/main/java/org/apache/jena/util/iterator/MapFilterIterator.java b/jena-core/src/main/java/org/apache/jena/util/iterator/MapFilterIterator.java
index ec49ad761b7..8d187e08dc5 100644
--- a/jena-core/src/main/java/org/apache/jena/util/iterator/MapFilterIterator.java
+++ b/jena-core/src/main/java/org/apache/jena/util/iterator/MapFilterIterator.java
@@ -26,7 +26,7 @@
for X from the base iterator.
*/
-public class MapFilterIterator extends NiceIterator implements ExtendedIterator
+public class MapFilterIterator extends NiceIterator
{
MapFilter f;
X current;
diff --git a/jena-core/src/main/java/org/apache/jena/util/iterator/SingletonIterator.java b/jena-core/src/main/java/org/apache/jena/util/iterator/SingletonIterator.java
index 1d36a666ff2..7acdff50dd6 100644
--- a/jena-core/src/main/java/org/apache/jena/util/iterator/SingletonIterator.java
+++ b/jena-core/src/main/java/org/apache/jena/util/iterator/SingletonIterator.java
@@ -21,7 +21,7 @@
/**
* A ClosableIterator that contains only one element
*/
-public class SingletonIterator extends NiceIterator implements ExtendedIterator {
+public class SingletonIterator extends NiceIterator {
/** The single value to be returned */
private T item;
diff --git a/jena-core/src/main/java/org/apache/jena/vocabulary/RDF.java b/jena-core/src/main/java/org/apache/jena/vocabulary/RDF.java
index d62fe49228d..9b7617219e9 100644
--- a/jena-core/src/main/java/org/apache/jena/vocabulary/RDF.java
+++ b/jena-core/src/main/java/org/apache/jena/vocabulary/RDF.java
@@ -77,7 +77,7 @@ public static Property li( int i )
The same items of vocabulary, but at the Node level, parked inside a
nested class so that there's a simple way to refer to them.
*/
- @SuppressWarnings("hiding") public static final class Nodes
+ public static final class Nodes
{
public static final Node Alt = RDF.Alt.asNode();
public static final Node Bag = RDF.Bag.asNode();
diff --git a/jena-core/src/main/java/org/apache/jena/vocabulary/RDFS.java b/jena-core/src/main/java/org/apache/jena/vocabulary/RDFS.java
index ff4dd42794f..a7653ad1523 100644
--- a/jena-core/src/main/java/org/apache/jena/vocabulary/RDFS.java
+++ b/jena-core/src/main/java/org/apache/jena/vocabulary/RDFS.java
@@ -58,7 +58,7 @@ protected static final Property property( String local )
/**
The RDFS vocabulary, expressed for the SPI layer in terms of .graph Nodes.
*/
- @SuppressWarnings("hiding") public static class Nodes
+ public static class Nodes
{
public static final Node Class = RDFS.Class.asNode();
public static final Node Datatype = RDFS.Datatype.asNode();
diff --git a/jena-core/src/test/java/org/apache/jena/assembler/test/TestReasonerFactoryAssembler.java b/jena-core/src/test/java/org/apache/jena/assembler/test/TestReasonerFactoryAssembler.java
index b521e4349d6..e4b15443673 100644
--- a/jena-core/src/test/java/org/apache/jena/assembler/test/TestReasonerFactoryAssembler.java
+++ b/jena-core/src/test/java/org/apache/jena/assembler/test/TestReasonerFactoryAssembler.java
@@ -82,7 +82,7 @@ public String getURI()
{ return null; }
}
- public static class MockFactory extends MockBase implements ReasonerFactory
+ public static class MockFactory extends MockBase
{
public static final MockFactory instance = new MockFactory();
diff --git a/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/NTripleTestSuite.java b/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/NTripleTestSuite.java
index f5ae838735e..27cd1d32c1a 100644
--- a/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/NTripleTestSuite.java
+++ b/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/NTripleTestSuite.java
@@ -69,7 +69,7 @@ static class SimulatedException extends RuntimeException {
}
static class TestHandler
extends ARPSaxErrorHandler
- implements ARPEventHandler, org.xml.sax.ErrorHandler {
+ implements ARPEventHandler {
TestHandler(RDFErrorHandler eh) {
this(eh, 0);
}
@@ -251,7 +251,6 @@ Model loadRDF(InFactoryX in, RDFErrorHandler eh, String base)
return loadRDFx(in, eh, base, true, 0);
}
- @SuppressWarnings("resource")
static Model loadRDFx(
InFactoryX in,
RDFErrorHandler eh,
@@ -273,7 +272,7 @@ static Model loadRDFx(
out = new PrintStream(new OutputStream() {
@Override
- public void write(int b) throws IOException {
+ public void write(int b) {
}
});
th = new TestHandler(eh, cnt);
diff --git a/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/states/TestEventList.java b/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/states/TestEventList.java
index 98a6151d368..d87a0698d8e 100644
--- a/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/states/TestEventList.java
+++ b/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/states/TestEventList.java
@@ -23,7 +23,7 @@
import junit.framework.TestSuite;
import org.apache.jena.rdfxml.xmlinput.states.FrameI ;
-public class TestEventList extends TestCase implements Test {
+public class TestEventList extends TestCase {
final EventRecord record1, record2;
diff --git a/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/XMLOutputTestBase.java b/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/XMLOutputTestBase.java
index 1a585ef2b7b..bd3b92b659b 100644
--- a/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/XMLOutputTestBase.java
+++ b/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/XMLOutputTestBase.java
@@ -186,7 +186,6 @@ protected void check(String filename,
try(InputStream in = new FileInputStream(filename)) {
m.read(in,base);
}
- @SuppressWarnings("resource")
Writer sw;
ByteArrayOutputStream bos = null;
if (encoding == null)
diff --git a/jena-core/src/test/java/org/apache/jena/util/iterator/test/LoggingClosableIterator.java b/jena-core/src/test/java/org/apache/jena/util/iterator/test/LoggingClosableIterator.java
index e9be8578b0e..62dc7e8d7ab 100644
--- a/jena-core/src/test/java/org/apache/jena/util/iterator/test/LoggingClosableIterator.java
+++ b/jena-core/src/test/java/org/apache/jena/util/iterator/test/LoggingClosableIterator.java
@@ -26,7 +26,7 @@
A closable iterator that wraps a base iterator and reports whether or not it
has been closed.
*/
-public class LoggingClosableIterator extends WrappedIterator implements ClosableIterator
+public class LoggingClosableIterator extends WrappedIterator
{
protected LoggingClosableIterator( Iterator< ? extends T> base )
{ super( base ); }
diff --git a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/readers/AbstractLineBasedNodeTupleReader.java b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/readers/AbstractLineBasedNodeTupleReader.java
index 6c1abe941f6..04adb3b0b44 100644
--- a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/readers/AbstractLineBasedNodeTupleReader.java
+++ b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/readers/AbstractLineBasedNodeTupleReader.java
@@ -69,7 +69,7 @@ public abstract class AbstractLineBasedNodeTupleReader {}", key);
return key;
}
@Override
- public T getCurrentValue() throws IOException, InterruptedException {
+ public T getCurrentValue() {
LOG.debug("getCurrentValue() --> {}", tuple);
return tuple;
}
@Override
- public float getProgress() throws IOException, InterruptedException {
+ public float getProgress() {
float progress = 0.0f;
if (start != end) {
if (end == Long.MAX_VALUE) {
diff --git a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/AbstractNodeOutputFormat.java b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/AbstractNodeOutputFormat.java
index cfc98bdc096..aec3309984c 100644
--- a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/AbstractNodeOutputFormat.java
+++ b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/AbstractNodeOutputFormat.java
@@ -50,14 +50,14 @@ public abstract class AbstractNodeOutputFormat extends FileOutputFormat<
private static final Logger LOG = LoggerFactory.getLogger(AbstractNodeOutputFormat.class);
@Override
- public RecordWriter getRecordWriter(TaskAttemptContext context) throws IOException, InterruptedException {
+ public RecordWriter getRecordWriter(TaskAttemptContext context) throws IOException {
Configuration config = context.getConfiguration();
boolean isCompressed = getCompressOutput(context);
CompressionCodec codec = null;
String extension = this.getFileExtension();
if (isCompressed) {
Class extends CompressionCodec> codecClass = getOutputCompressorClass(context, GzipCodec.class);
- codec = (CompressionCodec) ReflectionUtils.newInstance(codecClass, config);
+ codec = ReflectionUtils.newInstance(codecClass, config);
extension += codec.getDefaultExtension();
}
Path file = getDefaultWorkFile(context, extension);
diff --git a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/AbstractNodeTupleOutputFormat.java b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/AbstractNodeTupleOutputFormat.java
index c4a34f582fb..fd86f00a877 100644
--- a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/AbstractNodeTupleOutputFormat.java
+++ b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/AbstractNodeTupleOutputFormat.java
@@ -55,7 +55,7 @@ public abstract class AbstractNodeTupleOutputFormat getRecordWriter(TaskAttemptContext context) throws IOException, InterruptedException {
+ public RecordWriter getRecordWriter(TaskAttemptContext context) throws IOException {
Configuration config = context.getConfiguration();
boolean isCompressed = getCompressOutput(context);
CompressionCodec codec = null;
@@ -65,7 +65,7 @@ public RecordWriter getRecordWriter(TaskAttemptContext context) throws
if (isCompressed) {
// Add compression extension if applicable
Class extends CompressionCodec> codecClass = getOutputCompressorClass(context, GzipCodec.class);
- codec = (CompressionCodec) ReflectionUtils.newInstance(codecClass, config);
+ codec = ReflectionUtils.newInstance(codecClass, config);
extension += codec.getDefaultExtension();
}
Path file = getDefaultWorkFile(context, extension);
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/IRI.java b/jena-iri/src/main/java/org/apache/jena/iri/IRI.java
index 209803f54da..0e5491970a2 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/IRI.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/IRI.java
@@ -56,7 +56,7 @@
* of a different appropriately configured {@link IRIFactory}.
*
*/
-abstract public class IRI extends AbsIRIFactoryImpl implements IRIFactoryI, IRIRelativize {
+abstract public class IRI extends AbsIRIFactoryImpl implements IRIRelativize {
/**
* Advanced usage only:
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/IRIFactory.java b/jena-iri/src/main/java/org/apache/jena/iri/IRIFactory.java
index 2c0eedcad5d..d3b8a33e295 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/IRIFactory.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/IRIFactory.java
@@ -99,9 +99,7 @@
* have order dependencies.
*/
-public class IRIFactory extends IRIFactoryImpl
- implements
- IRIFactoryI {
+public class IRIFactory extends IRIFactoryImpl {
static {
// call static initializers
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/IRIImpl.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/IRIImpl.java
index f2dc6bf05b3..d015617b8fa 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/IRIImpl.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/IRIImpl.java
@@ -19,12 +19,9 @@
package org.apache.jena.iri.impl;
-import org.apache.jena.iri.IRIComponents ;
import org.apache.jena.iri.IRIFactory ;
-public class IRIImpl
- extends AbsIRIImpl
-implements IRIComponents {
+public class IRIImpl extends AbsIRIImpl {
final IRIFactoryImpl factory;
final String original;
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPath.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPath.java
index 5c74057ac92..77c1b69efb5 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPath.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPath.java
@@ -26,7 +26,7 @@
* on 04/03/12 16:02 from the specification file
* tmp.jflex
*/
-class LexerPath extends AbsLexer implements org.apache.jena.iri.ViolationCodes, org.apache.jena.iri.IRIComponents, Lexer {
+class LexerPath extends AbsLexer implements org.apache.jena.iri.IRIComponents, Lexer {
/** This character denotes the end of file */
private static final int YYEOF = -1;
@@ -227,18 +227,9 @@ the source of the yytext() string */
from input */
private int zzEndRead;
- /** number of newlines encountered up to the start of the matched text */
- private int yyline;
-
/** the number of characters up to the start of the matched text */
private int yychar;
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- private int yycolumn;
-
/**
* zzAtBOL == true <=> the scanner is currently at the beginning of a line
*/
@@ -247,8 +238,7 @@ the source of the yytext() string */
/** zzAtEOF == true <=> the scanner is at the EOF */
private boolean zzAtEOF;
- /** denotes if the user-EOF-code has already been executed */
- private boolean zzEOFDone;
+
/* user code: */
@@ -375,10 +365,9 @@ private final void yyreset(java.io.Reader reader) {
zzReader = reader;
zzAtBOL = true;
zzAtEOF = false;
- zzEOFDone = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = 0;
- yyline = yychar = yycolumn = 0;
+ yychar = 0;
zzLexicalState = YYINITIAL;
}
diff --git a/jena-jdbc/jena-jdbc-core/src/main/java/org/apache/jena/jdbc/statements/JenaPreparedStatement.java b/jena-jdbc/jena-jdbc-core/src/main/java/org/apache/jena/jdbc/statements/JenaPreparedStatement.java
index 6bcaab69ba0..0502f81445f 100644
--- a/jena-jdbc/jena-jdbc-core/src/main/java/org/apache/jena/jdbc/statements/JenaPreparedStatement.java
+++ b/jena-jdbc/jena-jdbc-core/src/main/java/org/apache/jena/jdbc/statements/JenaPreparedStatement.java
@@ -98,7 +98,7 @@ public void addBatch() throws SQLException {
}
@Override
- public void clearParameters() throws SQLException {
+ public void clearParameters() {
this.sparqlStr.clearParams();
}
@@ -118,13 +118,13 @@ public int executeUpdate() throws SQLException {
}
@Override
- public ResultSetMetaData getMetaData() throws SQLException {
+ public ResultSetMetaData getMetaData() {
// Return null because we don't know in advance the column types
return null;
}
@Override
- public ParameterMetaData getParameterMetaData() throws SQLException {
+ public ParameterMetaData getParameterMetaData() {
return this.paramMetadata;
}
@@ -451,7 +451,7 @@ public void setObject(int parameterIndex, Object value, int targetSqlType) throw
if (value instanceof Double) {
this.setParameter(parameterIndex, NodeFactoryExtra.doubleToNode((Double)value));
} else if (value instanceof Float) {
- this.setParameter(parameterIndex, NodeFactoryExtra.doubleToNode((double)(Float)value));
+ this.setParameter(parameterIndex, NodeFactoryExtra.doubleToNode((Float)value));
} else if (value instanceof Node) {
Double d = JdbcNodeUtils.toDouble((Node)value);
this.setParameter(parameterIndex, NodeFactoryExtra.doubleToNode(d));
@@ -473,9 +473,9 @@ public void setObject(int parameterIndex, Object value, int targetSqlType) throw
if (value instanceof Integer) {
this.setParameter(parameterIndex, NodeFactoryExtra.intToNode((Integer)value));
} else if (value instanceof Short) {
- this.setParameter(parameterIndex, NodeFactoryExtra.intToNode((int)(Short)value));
+ this.setParameter(parameterIndex, NodeFactoryExtra.intToNode((Short)value));
} else if (value instanceof Byte) {
- this.setParameter(parameterIndex, NodeFactoryExtra.intToNode((int)(Byte)value));
+ this.setParameter(parameterIndex, NodeFactoryExtra.intToNode((Byte)value));
} else if (value instanceof Node) {
Integer i = JdbcNodeUtils.toInt((Node)value);
this.setParameter(parameterIndex, NodeFactoryExtra.intToNode(i));
@@ -536,7 +536,7 @@ public void setObject(int parameterIndex, Object value, int targetSqlType) throw
Short s = (Short)value;
this.setParameter(parameterIndex, NodeFactory.createLiteral(Short.toString(s), XSDDatatype.XSDshort));
} else if (value instanceof Byte) {
- this.setParameter(parameterIndex, NodeFactory.createLiteral(Short.toString((short)(Byte)value), XSDDatatype.XSDshort));
+ this.setParameter(parameterIndex, NodeFactory.createLiteral(Short.toString((Byte)value), XSDDatatype.XSDshort));
} else if (value instanceof Node) {
Short s = JdbcNodeUtils.toShort((Node)value);
this.setParameter(parameterIndex, NodeFactory.createLiteral(Short.toString(s), XSDDatatype.XSDshort));
diff --git a/jena-permissions/src/main/java/org/apache/jena/permissions/SecurityEvaluatorAssembler.java b/jena-permissions/src/main/java/org/apache/jena/permissions/SecurityEvaluatorAssembler.java
index bb4814f7105..d20e421d969 100644
--- a/jena-permissions/src/main/java/org/apache/jena/permissions/SecurityEvaluatorAssembler.java
+++ b/jena-permissions/src/main/java/org/apache/jena/permissions/SecurityEvaluatorAssembler.java
@@ -102,7 +102,7 @@
*
*
*/
-public class SecurityEvaluatorAssembler extends AssemblerBase implements Assembler, AssemblerConstants {
+public class SecurityEvaluatorAssembler extends AssemblerBase implements AssemblerConstants {
// initialization and registration is performed by SecuredAssembler
@Override
diff --git a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/GraphEventManagerTest.java b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/GraphEventManagerTest.java
index ffb56044072..5eb269f1569 100644
--- a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/GraphEventManagerTest.java
+++ b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/GraphEventManagerTest.java
@@ -64,7 +64,6 @@ public GraphEventManagerTest( final MockSecurityEvaluator securityEvaluator )
}
@Test
- @SuppressWarnings("deprecation")
public void notifyAddTest()
{
Object principal = securityEvaluator.getPrincipal();
@@ -84,8 +83,7 @@ public void notifyAddTest()
}
- @SuppressWarnings("deprecation")
- @Test
+ @Test
public void notifyDeleteTest()
{
Object principal = securityEvaluator.getPrincipal();
diff --git a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/MemGraphTest.java b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/MemGraphTest.java
index 078584a3517..fd26198aa71 100644
--- a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/MemGraphTest.java
+++ b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/MemGraphTest.java
@@ -50,13 +50,12 @@ public MemGraphTest( final MockSecurityEvaluator securityEvaluator )
this.securityEvaluator = securityEvaluator;
}
- protected Graph createGraph() throws Exception
+ protected Graph createGraph()
{
return GraphFactory.createDefaultGraph();
}
- @SuppressWarnings("deprecation")
- @Before
+ @Before
public void setUp() throws Exception
{
baseGraph = createGraph();
@@ -72,7 +71,7 @@ public void setUp() throws Exception
}
@Test
- public void testContainsNodes() throws Exception
+ public void testContainsNodes()
{
try
{
@@ -94,7 +93,7 @@ public void testContainsNodes() throws Exception
}
@Test
- public void testContainsTriple() throws Exception
+ public void testContainsTriple()
{
try
{
@@ -144,7 +143,7 @@ public void testDelete() throws Exception
}
@Test
- public void testDependsOn() throws Exception
+ public void testDependsOn()
{
try
{
@@ -184,7 +183,7 @@ public void testDependsOn() throws Exception
}
@Test
- public void testFindNodes() throws Exception
+ public void testFindNodes()
{
try
{
@@ -208,7 +207,7 @@ public void testFindNodes() throws Exception
}
@Test
- public void testFindTriple() throws Exception
+ public void testFindTriple()
{
try
{
@@ -249,7 +248,7 @@ public void testInequality()
}
@Test
- public void testIsIsomorphicWith() throws Exception
+ public void testIsIsomorphicWith()
{
try
{
@@ -289,7 +288,7 @@ public void testIsIsomorphicWith() throws Exception
}
@Test
- public void testSize() throws Exception
+ public void testSize()
{
try
{
diff --git a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/TDBGraphTest.java b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/TDBGraphTest.java
index 18be198cd0e..0ee994f2b01 100644
--- a/jena-permissions/src/test/java/org/apache/jena/permissions/graph/TDBGraphTest.java
+++ b/jena-permissions/src/test/java/org/apache/jena/permissions/graph/TDBGraphTest.java
@@ -17,9 +17,6 @@
*/
package org.apache.jena.permissions.graph;
-import java.io.File;
-import java.io.IOException;
-
import org.apache.jena.graph.Graph ;
import org.apache.jena.permissions.MockSecurityEvaluator;
import org.apache.jena.sparql.core.DatasetGraph ;
@@ -32,15 +29,13 @@ public class TDBGraphTest extends MemGraphTest
private DatasetGraph dsGraph;
- private File f;
-
public TDBGraphTest( final MockSecurityEvaluator securityEvaluator )
{
super(securityEvaluator);
}
@Override
- protected Graph createGraph() throws IOException
+ protected Graph createGraph()
{
TDB.init();
dsGraph = TDBFactory.createDataset().asDatasetGraph();
diff --git a/jena-permissions/src/test/java/org/apache/jena/permissions/model/SecuredModelDetailTest.java b/jena-permissions/src/test/java/org/apache/jena/permissions/model/SecuredModelDetailTest.java
index 28b33bae23a..e6001f9f800 100644
--- a/jena-permissions/src/test/java/org/apache/jena/permissions/model/SecuredModelDetailTest.java
+++ b/jena-permissions/src/test/java/org/apache/jena/permissions/model/SecuredModelDetailTest.java
@@ -252,8 +252,8 @@ private boolean evaluate( Resource r )
// a message is only available to sender or recipient
if (r.hasProperty( RDF.type, msgType ))
{
- return r.hasProperty( pTo, ((Principal)principal).getName() ) ||
- r.hasProperty( pFrom, ((Principal)principal).getName());
+ return r.hasProperty( pTo, principal.getName() ) ||
+ r.hasProperty( pFrom, principal.getName());
}
return true;
}
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/DatasetStoreAssembler.java b/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/DatasetStoreAssembler.java
index 592b0c1367e..5798921dd7b 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/DatasetStoreAssembler.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/DatasetStoreAssembler.java
@@ -28,7 +28,7 @@
import org.apache.jena.sparql.core.assembler.AssemblerUtils ;
import org.apache.jena.sparql.util.graph.GraphUtils ;
-public class DatasetStoreAssembler extends AssemblerBase implements Assembler
+public class DatasetStoreAssembler extends AssemblerBase
{
static StoreDescAssembler storeAssem = new StoreDescAssembler() ;
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/QueryAssembler.java b/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/QueryAssembler.java
index a7bc3ac118a..8803c380b28 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/QueryAssembler.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/QueryAssembler.java
@@ -29,7 +29,7 @@
import org.apache.jena.util.FileManager ;
-public class QueryAssembler extends AssemblerBase implements Assembler
+public class QueryAssembler extends AssemblerBase
{
@Override
public Object open(Assembler a, Resource cmd, Mode mode)
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/SDBConnectionDescAssembler.java b/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/SDBConnectionDescAssembler.java
index f548cb80c34..64f2e7f644d 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/SDBConnectionDescAssembler.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/SDBConnectionDescAssembler.java
@@ -29,7 +29,7 @@
import org.apache.jena.sparql.util.graph.GraphUtils ;
import org.apache.jena.vocabulary.RDFS ;
-public class SDBConnectionDescAssembler extends AssemblerBase implements Assembler
+public class SDBConnectionDescAssembler extends AssemblerBase
{
@Override
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/SDBModelAssembler.java b/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/SDBModelAssembler.java
index 5601ecf91ce..950bf5a33b2 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/SDBModelAssembler.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/SDBModelAssembler.java
@@ -28,7 +28,7 @@
import org.apache.jena.sdb.StoreDesc ;
import org.apache.jena.sparql.util.graph.GraphUtils ;
-public class SDBModelAssembler extends AssemblerBase implements Assembler
+public class SDBModelAssembler extends AssemblerBase
{
DatasetStoreAssembler datasetAssem = new DatasetStoreAssembler() ;
@@ -54,8 +54,6 @@ public Model open(Assembler a, Resource root, Mode mode)
if ( x == null )
x = GraphUtils.getAsStringValue(root, AssemblerVocab.pNamedGraph2) ;
- // No name - default model.
- Graph g = null ;
if ( x == null )
return SDBFactory.connectDefaultModel(storeDesc) ;
else
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/StoreDescAssembler.java b/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/StoreDescAssembler.java
index de8d9f57493..fe08482eda6 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/StoreDescAssembler.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/assembler/StoreDescAssembler.java
@@ -36,7 +36,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class StoreDescAssembler extends AssemblerBase implements Assembler
+public class StoreDescAssembler extends AssemblerBase
{
static { SDB.init() ; }
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/QuadBlock.java b/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/QuadBlock.java
index fdc733905b5..19de9cf9cf3 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/QuadBlock.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/compiler/QuadBlock.java
@@ -34,7 +34,7 @@
import org.apache.jena.sparql.util.PrintSerializable ;
import org.apache.jena.sparql.util.QueryOutputUtils ;
-public class QuadBlock extends ArrayList implements Iterable, PrintSerializable
+public class QuadBlock extends ArrayList implements PrintSerializable
{
// Pre-dates QuadPattern
Node graphNode ;
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/exprmatch/ExprMatcher.java b/jena-sdb/src/main/java/org/apache/jena/sdb/exprmatch/ExprMatcher.java
index 50771d30528..7a1a568c5c7 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/exprmatch/ExprMatcher.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/exprmatch/ExprMatcher.java
@@ -77,7 +77,7 @@ public static MapResult match(String expression, String pattern, MapAction mapAc
}
// Visit/walk the pattern
- static class MatchVisitor extends ExprVisitorFunction implements ExprVisitor
+ static class MatchVisitor extends ExprVisitorFunction
{
private Expr target ;
private MapAction aMap ;
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/graph/GraphSDB.java b/jena-sdb/src/main/java/org/apache/jena/sdb/graph/GraphSDB.java
index 72ee20f1ba7..46684eab9fd 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/graph/GraphSDB.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/graph/GraphSDB.java
@@ -24,10 +24,8 @@
import org.apache.jena.graph.* ;
import org.apache.jena.graph.impl.AllCapabilities ;
import org.apache.jena.graph.impl.GraphBase ;
-import org.apache.jena.query.Query ;
import org.apache.jena.sdb.SDB ;
import org.apache.jena.sdb.Store ;
-import org.apache.jena.sdb.core.SDBRequest ;
import org.apache.jena.sdb.engine.QueryEngineSDB ;
import org.apache.jena.sdb.sql.SDBConnection ;
import org.apache.jena.sdb.store.DatasetGraphSDB ;
@@ -49,7 +47,7 @@
import org.slf4j.Logger ;
import org.slf4j.LoggerFactory ;
-public class GraphSDB extends GraphBase implements Graph
+public class GraphSDB extends GraphBase
{
private static Logger log = LoggerFactory.getLogger(GraphSDB.class) ;
@@ -122,9 +120,6 @@ else if ( graphNode.isURI() )
@Override
protected ExtendedIterator graphBaseFind(Triple m)
{
- // Fake a query.
- SDBRequest cxt = new SDBRequest(getStore(), new Query()) ;
-
// If null, create and remember a variable, else use the node.
final Node s = (m.getMatchSubject()==null) ? Var.alloc("s") : m.getMatchSubject() ;
final Node p = (m.getMatchPredicate()==null) ? Var.alloc("p") : m.getMatchPredicate() ;
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/script/CmdDescAssembler.java b/jena-sdb/src/main/java/org/apache/jena/sdb/script/CmdDescAssembler.java
index eac049ca566..a2ef6242db7 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/script/CmdDescAssembler.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/script/CmdDescAssembler.java
@@ -30,7 +30,7 @@
import org.apache.jena.sparql.util.graph.GraphUtils ;
import org.apache.jena.vocabulary.RDF ;
-public class CmdDescAssembler extends AssemblerBase implements Assembler
+public class CmdDescAssembler extends AssemblerBase
{
/* This SPARQL query will process arguments
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/script/QueryCommandAssembler.java b/jena-sdb/src/main/java/org/apache/jena/sdb/script/QueryCommandAssembler.java
index e4b862af85f..5aa246dae3a 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/script/QueryCommandAssembler.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/script/QueryCommandAssembler.java
@@ -32,7 +32,7 @@
// EXPERIMENTAL - Move to ARQ?
-public class QueryCommandAssembler extends AssemblerBase implements Assembler
+public class QueryCommandAssembler extends AssemblerBase
{
@Override
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/script/ScriptAssembler.java b/jena-sdb/src/main/java/org/apache/jena/sdb/script/ScriptAssembler.java
index 63327c353ce..0e406e79885 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/script/ScriptAssembler.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/script/ScriptAssembler.java
@@ -29,7 +29,7 @@
//EXPERIMENTAL - Move to ARQ?
-public class ScriptAssembler extends AssemblerBase implements Assembler
+public class ScriptAssembler extends AssemblerBase
{
// A script is a number of command descriptions (CmdDesc)
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/store/DatasetGraphSDB.java b/jena-sdb/src/main/java/org/apache/jena/sdb/store/DatasetGraphSDB.java
index 60d736f9fdd..0056f938689 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/store/DatasetGraphSDB.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/store/DatasetGraphSDB.java
@@ -20,7 +20,6 @@
import java.util.Iterator ;
-import org.apache.jena.atlas.lib.Closeable ;
import org.apache.jena.graph.Graph ;
import org.apache.jena.graph.Node ;
import org.apache.jena.query.Dataset ;
@@ -28,20 +27,14 @@
import org.apache.jena.sdb.Store ;
import org.apache.jena.sdb.graph.GraphSDB ;
import org.apache.jena.sdb.util.StoreUtils ;
-import org.apache.jena.shared.Lock ;
-import org.apache.jena.shared.LockMRSW ;
-import org.apache.jena.sparql.core.DatasetGraph ;
import org.apache.jena.sparql.core.DatasetGraphCaching ;
import org.apache.jena.sparql.core.Quad ;
import org.apache.jena.sparql.util.Context ;
import org.apache.jena.update.GraphStore ;
-public class DatasetGraphSDB extends DatasetGraphCaching
- implements DatasetGraph, Closeable, GraphStore
+public class DatasetGraphSDB extends DatasetGraphCaching implements GraphStore
{
private final Store store ;
- private Lock lock = new LockMRSW() ;
- private final Context context ;
public DatasetGraphSDB(Store store, Context context)
{
@@ -53,7 +46,6 @@ public DatasetGraphSDB(Store store, GraphSDB graph, Context context)
this.store = store ;
// Force the "default" graph
this.defaultGraph = graph ;
- this.context = context ;
}
public Store getStore() { return store ; }
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/store/Feature.java b/jena-sdb/src/main/java/org/apache/jena/sdb/store/Feature.java
index 3acffa279a8..c4029572204 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/store/Feature.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/store/Feature.java
@@ -19,7 +19,6 @@
package org.apache.jena.sdb.store;
import org.apache.jena.atlas.io.IndentedWriter ;
-import org.apache.jena.atlas.io.Printable ;
import org.apache.jena.atlas.io.PrintableBase ;
import org.apache.jena.sparql.util.Named ;
import org.apache.jena.sparql.util.Symbol ;
@@ -28,7 +27,7 @@
/** A Feature is a name/value pair */
-public class Feature extends PrintableBase implements Named, Printable
+public class Feature extends PrintableBase implements Named
{
public static class Name extends Symbol
{
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/store/FeatureSet.java b/jena-sdb/src/main/java/org/apache/jena/sdb/store/FeatureSet.java
index 4e098d29989..66316d830ad 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/store/FeatureSet.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/store/FeatureSet.java
@@ -23,13 +23,12 @@
import java.util.List ;
import org.apache.jena.atlas.io.IndentedWriter ;
-import org.apache.jena.atlas.io.Printable ;
import org.apache.jena.atlas.io.PrintableBase ;
import org.apache.jena.atlas.iterator.Iter ;
/** A set of features (order retained */
-public class FeatureSet extends PrintableBase implements Printable, Iterable
+public class FeatureSet extends PrintableBase implements Iterable
{
List features = new ArrayList() ;
diff --git a/jena-spatial/src/main/java/org/apache/jena/query/spatial/assembler/EntityDefinitionAssembler.java b/jena-spatial/src/main/java/org/apache/jena/query/spatial/assembler/EntityDefinitionAssembler.java
index 53c38238496..33eeb830b62 100644
--- a/jena-spatial/src/main/java/org/apache/jena/query/spatial/assembler/EntityDefinitionAssembler.java
+++ b/jena-spatial/src/main/java/org/apache/jena/query/spatial/assembler/EntityDefinitionAssembler.java
@@ -33,7 +33,7 @@
import org.apache.jena.rdf.model.Model ;
import org.apache.jena.rdf.model.Resource ;
-public class EntityDefinitionAssembler extends AssemblerBase implements Assembler
+public class EntityDefinitionAssembler extends AssemblerBase
{
// V1
diff --git a/jena-spatial/src/main/java/org/apache/jena/query/spatial/assembler/SpatialDatasetAssembler.java b/jena-spatial/src/main/java/org/apache/jena/query/spatial/assembler/SpatialDatasetAssembler.java
index 7eb01bbde7a..e96bf75bd2a 100644
--- a/jena-spatial/src/main/java/org/apache/jena/query/spatial/assembler/SpatialDatasetAssembler.java
+++ b/jena-spatial/src/main/java/org/apache/jena/query/spatial/assembler/SpatialDatasetAssembler.java
@@ -29,11 +29,8 @@
import org.apache.jena.rdf.model.Resource ;
import org.apache.jena.sparql.util.graph.GraphUtils ;
-public class SpatialDatasetAssembler extends AssemblerBase implements Assembler
+public class SpatialDatasetAssembler extends AssemblerBase
{
-// private DatasetAssembler datasetAssembler = new DatasetAssembler() ;
-//
-// public static Resource getType() { return textDataset ; }
/*
<#spatial_dataset> rdf:type spatial:SpatialDataset ;
diff --git a/jena-spatial/src/main/java/org/apache/jena/query/spatial/assembler/SpatialIndexLuceneAssembler.java b/jena-spatial/src/main/java/org/apache/jena/query/spatial/assembler/SpatialIndexLuceneAssembler.java
index 5554e3da6d6..59e8eb44b71 100644
--- a/jena-spatial/src/main/java/org/apache/jena/query/spatial/assembler/SpatialIndexLuceneAssembler.java
+++ b/jena-spatial/src/main/java/org/apache/jena/query/spatial/assembler/SpatialIndexLuceneAssembler.java
@@ -50,7 +50,6 @@ public class SpatialIndexLuceneAssembler extends AssemblerBase
.
*/
- @SuppressWarnings("resource")
@Override
public SpatialIndex open(Assembler a, Resource root, Mode mode)
{
diff --git a/jena-spatial/src/test/java/org/apache/jena/query/spatial/SpatialSearchUtil.java b/jena-spatial/src/test/java/org/apache/jena/query/spatial/SpatialSearchUtil.java
index 6c4fba78349..ce1401b4e38 100644
--- a/jena-spatial/src/test/java/org/apache/jena/query/spatial/SpatialSearchUtil.java
+++ b/jena-spatial/src/test/java/org/apache/jena/query/spatial/SpatialSearchUtil.java
@@ -65,7 +65,6 @@ public static void createEmptyIndex(File indexDir) {
try {
Directory directory = FSDirectory.open(indexDir) ;
IndexWriterConfig wConfig = new IndexWriterConfig(VER, analyzer) ;
- @SuppressWarnings("resource")
IndexWriter indexWriter = new IndexWriter(directory, wConfig) ;
indexWriter.close() ; // force creation of the index files
} catch (IOException ex) {
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/TDBGraphAssembler.java b/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/TDBGraphAssembler.java
index 8c4c91abaef..92666898e3e 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/TDBGraphAssembler.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/assembler/TDBGraphAssembler.java
@@ -32,7 +32,7 @@
import org.apache.jena.tdb.assembler.IndexAssembler ;
import org.apache.jena.tdb.base.file.Location ;
-public class TDBGraphAssembler extends AssemblerBase implements Assembler
+public class TDBGraphAssembler extends AssemblerBase
{
static IndexAssembler indexAssembler = null ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/objectfile/ObjectFileStorage.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/objectfile/ObjectFileStorage.java
index 4803c20b832..4dd42c39896 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/objectfile/ObjectFileStorage.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/objectfile/ObjectFileStorage.java
@@ -394,7 +394,7 @@ private String state()
}
- private class BufferIterator extends IteratorSlotted> implements Iterator>
+ private class BufferIterator extends IteratorSlotted>
{
private ByteBuffer buffer ;
private int posn ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTree.java b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTree.java
index 70ccb92f3c1..0ac05618fc6 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTree.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTree.java
@@ -34,8 +34,6 @@
import org.apache.jena.tdb.base.recordbuffer.RecordBufferPageMgr ;
import org.apache.jena.tdb.base.recordbuffer.RecordRangeIterator ;
import org.apache.jena.tdb.index.RangeIndex ;
-import org.slf4j.Logger ;
-import org.slf4j.LoggerFactory ;
/** B-Tree converted to B+Tree
*
@@ -70,7 +68,7 @@
* The root is always the same block.
*/
-public class BPlusTree implements Iterable, RangeIndex
+public class BPlusTree implements RangeIndex
{
/*
* Insertion:
@@ -120,8 +118,6 @@ public class BPlusTree implements Iterable, RangeIndex
* sibling nodes instead of immediately splitting (like delete, only on insert).
*/
- private static Logger log = LoggerFactory.getLogger(BPlusTree.class) ;
-
private int rootIdx = BPlusTreeParams.RootId ;
///*package*/ BPTreeNode root ;
private BPTreeNodeMgr nodeManager ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/DatasetGraphTDB.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/DatasetGraphTDB.java
index 55dfe53fa7e..6b3138675cd 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/DatasetGraphTDB.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/DatasetGraphTDB.java
@@ -21,7 +21,6 @@
import java.util.Iterator ;
import org.apache.jena.atlas.iterator.Iter ;
-import org.apache.jena.atlas.lib.Closeable ;
import org.apache.jena.atlas.lib.Sync ;
import org.apache.jena.atlas.lib.Tuple ;
import org.apache.jena.graph.Graph ;
@@ -50,8 +49,7 @@
*
*/
final
-public class DatasetGraphTDB extends DatasetGraphCaching
- implements /*DatasetGraph,*/ Sync, Closeable, GraphStore, Session
+public class DatasetGraphTDB extends DatasetGraphCaching implements Sync, GraphStore, Session
{
private TripleTable tripleTable ;
private QuadTable quadTable ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java
index 93fbf6940fb..d0c70aab4c2 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/GraphTDB.java
@@ -23,7 +23,6 @@
import org.apache.jena.atlas.iterator.Iter ;
import org.apache.jena.atlas.lib.Closeable ;
-import org.apache.jena.atlas.lib.Sync ;
import org.apache.jena.atlas.lib.Tuple ;
import org.apache.jena.graph.* ;
import org.apache.jena.riot.other.GLib ;
@@ -40,7 +39,7 @@
* General operations for TDB graphs (free-standing graph, default graph and
* named graphs)
*/
-public class GraphTDB extends GraphView implements Closeable, Sync {
+public class GraphTDB extends GraphView implements Closeable {
private final TransactionHandler transactionHandler = new TransactionHandlerTDB(this) ;
// Switch this to DatasetGraphTransaction
diff --git a/jena-text/src/main/java/org/apache/jena/query/text/assembler/EntityDefinitionAssembler.java b/jena-text/src/main/java/org/apache/jena/query/text/assembler/EntityDefinitionAssembler.java
index ca66f271c5b..af391db9798 100644
--- a/jena-text/src/main/java/org/apache/jena/query/text/assembler/EntityDefinitionAssembler.java
+++ b/jena-text/src/main/java/org/apache/jena/query/text/assembler/EntityDefinitionAssembler.java
@@ -40,7 +40,7 @@
import org.apache.jena.vocabulary.RDF ;
import org.apache.lucene.analysis.Analyzer;
-public class EntityDefinitionAssembler extends AssemblerBase implements Assembler
+public class EntityDefinitionAssembler extends AssemblerBase
{
/*
<#entMap> a text:EntityMap ;
diff --git a/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextDatasetAssembler.java b/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextDatasetAssembler.java
index 0125a6a37ed..6e4613bc265 100644
--- a/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextDatasetAssembler.java
+++ b/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextDatasetAssembler.java
@@ -36,14 +36,11 @@
import org.apache.jena.rdf.model.Resource ;
import org.apache.jena.sparql.ARQConstants ;
import org.apache.jena.sparql.core.DatasetGraph ;
-import org.apache.jena.sparql.core.assembler.DatasetAssembler ;
import org.apache.jena.sparql.util.Loader ;
import org.apache.jena.sparql.util.graph.GraphUtils ;
-public class TextDatasetAssembler extends AssemblerBase implements Assembler
+public class TextDatasetAssembler extends AssemblerBase
{
- private DatasetAssembler datasetAssembler = new DatasetAssembler() ;
-
public static Resource getType() { return textDataset ; }
/*
diff --git a/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextIndexLuceneAssembler.java b/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextIndexLuceneAssembler.java
index 361841c0580..9324bbbea4e 100644
--- a/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextIndexLuceneAssembler.java
+++ b/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextIndexLuceneAssembler.java
@@ -53,7 +53,6 @@ public class TextIndexLuceneAssembler extends AssemblerBase {
.
*/
- @SuppressWarnings("resource")
@Override
public TextIndex open(Assembler a, Resource root, Mode mode) {
try {
From 2fef2f5567a227e2701dc1eb7db8bc64dc4d6f01 Mon Sep 17 00:00:00 2001
From: ajs6f
Date: Thu, 7 May 2015 21:40:17 -0400
Subject: [PATCH 3/7] Further removal of dead code
---
.../algebra/uniongraph/TestUnionGraph.java | 1 -
.../jena/sparql/expr/TestExpressions.java | 14 +++---
.../jena/tdb/base/objectfile/StringFile.java | 1 +
.../query/text/TextDocProducerEntities.java | 43 +++++++++++++++++++
.../assembler/EntityDefinitionAssembler.java | 2 +-
.../text/assembler/TextDatasetAssembler.java | 5 ++-
.../assembler/TextIndexLuceneAssembler.java | 1 +
.../assembler/TestTextDatasetAssembler.java | 2 +
8 files changed, 60 insertions(+), 9 deletions(-)
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/algebra/uniongraph/TestUnionGraph.java b/jena-arq/src/test/java/org/apache/jena/sparql/algebra/uniongraph/TestUnionGraph.java
index 7c71e74749a..df442ef6f5e 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/algebra/uniongraph/TestUnionGraph.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/algebra/uniongraph/TestUnionGraph.java
@@ -97,7 +97,6 @@ static private List exec(String pattern, boolean applyQuad, DatasetGrap
Op op = SSE.parseOp(pattern) ;
if ( applyQuad )
op = Algebra.toQuadForm(op) ;
- Op op2 = Algebra.unionDefaultGraph(op) ;
QueryIterator qIter = Algebra.exec(op, TestUnionGraph.dsg1) ;
return Iter.toList(qIter) ;
}
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestExpressions.java b/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestExpressions.java
index d7f9ccf3cd7..2b766586da5 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestExpressions.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestExpressions.java
@@ -136,8 +136,8 @@ public class TestExpressions
@Test public void testBoolean_17() { testBoolean("2 > 3", 2 > 3) ; }
@Test public void testBoolean_18() { testBoolean("(2 < 3) && (3<4)", (2 < 3) && (3<4)) ; }
@Test public void testBoolean_19() { testBoolean("(2 < 3) && (3>=4)", (2 < 3) && (3>=4)) ; }
- @Test public void testBoolean_20() { testBoolean("(2 < 3) || (3>=4)", (2 < 3)) ; }
-
+ @Test public void testBoolean_20() { testBoolean("(2 < 3) || (3>=4)", (2 < 3) || (3>=4)) ; }
+
// ?x is unbound in the next few tests
@Test public void testBoolean_21() { testBoolean("(2 < 3) || ?x > 2", true) ; }
@Test(expected=ExprEvalException.class) public void testBoolean_22() { testEval("(2 > 3) || ?x > 2") ; }
@@ -460,10 +460,12 @@ private static void testNumeric(String string, double d)
assertEquals(d, v.getDouble(),0) ;
}
- private static void testEval(String string)
- {
- parse(string) ;
- }
+ private static void testEval(String string) {
+ Expr expr = parse(string);
+ NodeValue v = expr
+ .eval(BindingFactory.binding(), new FunctionEnvBase());
+ }
+
private static void testBoolean(String string, boolean b)
{
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/objectfile/StringFile.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/objectfile/StringFile.java
index 5548c3f5427..12d91ae0818 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/objectfile/StringFile.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/objectfile/StringFile.java
@@ -48,6 +48,7 @@ public long write(String str)
{
str = compress(str) ;
Block block = file.allocWrite(4*str.length()) ;
+ Bytes.toByteBuffer(str, block.getByteBuffer()) ;
block.getByteBuffer().flip() ;
file.completeWrite(block) ;
return block.getId() ;
diff --git a/jena-text/src/main/java/org/apache/jena/query/text/TextDocProducerEntities.java b/jena-text/src/main/java/org/apache/jena/query/text/TextDocProducerEntities.java
index ca3e1951cfa..dce81cddee1 100644
--- a/jena-text/src/main/java/org/apache/jena/query/text/TextDocProducerEntities.java
+++ b/jena-text/src/main/java/org/apache/jena/query/text/TextDocProducerEntities.java
@@ -20,13 +20,18 @@
import java.util.List ;
+import org.apache.jena.graph.Node ;
import org.apache.jena.sparql.core.DatasetChangesBatched ;
import org.apache.jena.sparql.core.Quad ;
import org.apache.jena.sparql.core.QuadAction ;
+import org.apache.jena.sparql.util.FmtUtils ;
+import org.slf4j.Logger ;
+import org.slf4j.LoggerFactory ;
// Currently unused
// This would index multiple quads at a time from batched stream of changes (e.g. rdf-patch)
public class TextDocProducerEntities extends DatasetChangesBatched implements TextDocProducer {
+ private static Logger log = LoggerFactory.getLogger(TextDocProducer.class) ;
private final EntityDefinition defn ;
private final TextIndex indexer ;
@@ -63,9 +68,47 @@ protected void dispatch(QuadAction quadAction, List batch) {
return ;
if ( batch.size() == 0 )
return ;
+ if ( false ) {
+ // One document per entity - future possibility.
+ Quad q = batch.get(0) ;
+ Node g = q.getGraph() ;
+ Node s = q.getSubject() ;
+ docEntity(g, s, batch) ;
+ return ;
+ }
docQuads(batch) ; // Does not need batching.
}
+ private void docEntity(Node g, Node s, List batch) {
+ // One document per entity
+ String x = TextQueryFuncs.subjectToString(s) ;
+ String gx = TextQueryFuncs.graphNodeToString(g) ;
+ Entity entity = new Entity(x, gx) ;
+ String graphField = defn.getGraphField() ;
+ if ( defn.getGraphField() != null )
+ entity.put(graphField, gx) ;
+
+ for ( Quad quad : batch ) {
+ Node p = quad.getPredicate() ;
+ String field = defn.getField(p) ;
+ if ( field == null )
+ continue ;
+ Node o = quad.getObject() ;
+ String val = null ;
+ if ( o.isURI() )
+ val = o.getURI() ;
+ else if ( o.isLiteral() )
+ val = o.getLiteralLexicalForm() ;
+ else {
+ log.warn("Not a literal value for mapped field-predicate: " + field + " :: "
+ + FmtUtils.stringForString(field)) ;
+ continue ;
+ }
+ entity.put(field, val) ;
+ }
+ indexer.addEntity(entity) ;
+ }
+
private void docQuads(List batch) {
// One document per triple/quad
diff --git a/jena-text/src/main/java/org/apache/jena/query/text/assembler/EntityDefinitionAssembler.java b/jena-text/src/main/java/org/apache/jena/query/text/assembler/EntityDefinitionAssembler.java
index af391db9798..ca66f271c5b 100644
--- a/jena-text/src/main/java/org/apache/jena/query/text/assembler/EntityDefinitionAssembler.java
+++ b/jena-text/src/main/java/org/apache/jena/query/text/assembler/EntityDefinitionAssembler.java
@@ -40,7 +40,7 @@
import org.apache.jena.vocabulary.RDF ;
import org.apache.lucene.analysis.Analyzer;
-public class EntityDefinitionAssembler extends AssemblerBase
+public class EntityDefinitionAssembler extends AssemblerBase implements Assembler
{
/*
<#entMap> a text:EntityMap ;
diff --git a/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextDatasetAssembler.java b/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextDatasetAssembler.java
index 6e4613bc265..0125a6a37ed 100644
--- a/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextDatasetAssembler.java
+++ b/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextDatasetAssembler.java
@@ -36,11 +36,14 @@
import org.apache.jena.rdf.model.Resource ;
import org.apache.jena.sparql.ARQConstants ;
import org.apache.jena.sparql.core.DatasetGraph ;
+import org.apache.jena.sparql.core.assembler.DatasetAssembler ;
import org.apache.jena.sparql.util.Loader ;
import org.apache.jena.sparql.util.graph.GraphUtils ;
-public class TextDatasetAssembler extends AssemblerBase
+public class TextDatasetAssembler extends AssemblerBase implements Assembler
{
+ private DatasetAssembler datasetAssembler = new DatasetAssembler() ;
+
public static Resource getType() { return textDataset ; }
/*
diff --git a/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextIndexLuceneAssembler.java b/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextIndexLuceneAssembler.java
index 9324bbbea4e..361841c0580 100644
--- a/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextIndexLuceneAssembler.java
+++ b/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextIndexLuceneAssembler.java
@@ -53,6 +53,7 @@ public class TextIndexLuceneAssembler extends AssemblerBase {
.
*/
+ @SuppressWarnings("resource")
@Override
public TextIndex open(Assembler a, Resource root, Mode mode) {
try {
diff --git a/jena-text/src/test/java/org/apache/jena/query/text/assembler/TestTextDatasetAssembler.java b/jena-text/src/test/java/org/apache/jena/query/text/assembler/TestTextDatasetAssembler.java
index 8274d2acc6a..9826118b754 100644
--- a/jena-text/src/test/java/org/apache/jena/query/text/assembler/TestTextDatasetAssembler.java
+++ b/jena-text/src/test/java/org/apache/jena/query/text/assembler/TestTextDatasetAssembler.java
@@ -125,6 +125,8 @@ public void testCustomTextDocProducerDyadicConstructor() {
private static class CustomTextDocProducer implements TextDocProducer {
+ public CustomTextDocProducer(TextIndex textIndex) { }
+
@Override
public void start() { }
From 058c3e4074847b71b52304c54d8484203583d8b6 Mon Sep 17 00:00:00 2001
From: ajs6f
Date: Thu, 7 May 2015 21:46:41 -0400
Subject: [PATCH 4/7] Further removal of dead code in jena-text
---
.../src/main/java/jena/textindexdump.java | 4 --
.../query/text/TextDocProducerEntities.java | 43 -------------------
.../query/text/TextDocProducerTriples.java | 3 --
.../apache/jena/query/text/TextIndexSolr.java | 2 -
.../apache/jena/query/text/TextQueryPF.java | 6 ---
.../assembler/EntityDefinitionAssembler.java | 2 +-
.../text/assembler/TextDatasetAssembler.java | 5 +--
.../assembler/TextIndexLuceneAssembler.java | 1 -
8 files changed, 2 insertions(+), 64 deletions(-)
diff --git a/jena-text/src/main/java/jena/textindexdump.java b/jena-text/src/main/java/jena/textindexdump.java
index b421ee0cb0b..dd2c9fab534 100644
--- a/jena-text/src/main/java/jena/textindexdump.java
+++ b/jena-text/src/main/java/jena/textindexdump.java
@@ -32,8 +32,6 @@
import org.apache.lucene.search.Query ;
import org.apache.lucene.search.ScoreDoc ;
import org.apache.lucene.store.Directory ;
-import org.slf4j.Logger ;
-import org.slf4j.LoggerFactory ;
import arq.cmd.ArgDecl ;
import arq.cmd.CmdException ;
import arq.cmdline.CmdARQ ;
@@ -43,8 +41,6 @@
*/
public class textindexdump extends CmdARQ {
- private static Logger log = LoggerFactory.getLogger(textindexdump.class) ;
-
public static final ArgDecl assemblerDescDecl = new ArgDecl(ArgDecl.HasValue, "desc", "dataset") ;
protected TextIndex textIndex = null ;
diff --git a/jena-text/src/main/java/org/apache/jena/query/text/TextDocProducerEntities.java b/jena-text/src/main/java/org/apache/jena/query/text/TextDocProducerEntities.java
index dce81cddee1..ca3e1951cfa 100644
--- a/jena-text/src/main/java/org/apache/jena/query/text/TextDocProducerEntities.java
+++ b/jena-text/src/main/java/org/apache/jena/query/text/TextDocProducerEntities.java
@@ -20,18 +20,13 @@
import java.util.List ;
-import org.apache.jena.graph.Node ;
import org.apache.jena.sparql.core.DatasetChangesBatched ;
import org.apache.jena.sparql.core.Quad ;
import org.apache.jena.sparql.core.QuadAction ;
-import org.apache.jena.sparql.util.FmtUtils ;
-import org.slf4j.Logger ;
-import org.slf4j.LoggerFactory ;
// Currently unused
// This would index multiple quads at a time from batched stream of changes (e.g. rdf-patch)
public class TextDocProducerEntities extends DatasetChangesBatched implements TextDocProducer {
- private static Logger log = LoggerFactory.getLogger(TextDocProducer.class) ;
private final EntityDefinition defn ;
private final TextIndex indexer ;
@@ -68,47 +63,9 @@ protected void dispatch(QuadAction quadAction, List batch) {
return ;
if ( batch.size() == 0 )
return ;
- if ( false ) {
- // One document per entity - future possibility.
- Quad q = batch.get(0) ;
- Node g = q.getGraph() ;
- Node s = q.getSubject() ;
- docEntity(g, s, batch) ;
- return ;
- }
docQuads(batch) ; // Does not need batching.
}
- private void docEntity(Node g, Node s, List batch) {
- // One document per entity
- String x = TextQueryFuncs.subjectToString(s) ;
- String gx = TextQueryFuncs.graphNodeToString(g) ;
- Entity entity = new Entity(x, gx) ;
- String graphField = defn.getGraphField() ;
- if ( defn.getGraphField() != null )
- entity.put(graphField, gx) ;
-
- for ( Quad quad : batch ) {
- Node p = quad.getPredicate() ;
- String field = defn.getField(p) ;
- if ( field == null )
- continue ;
- Node o = quad.getObject() ;
- String val = null ;
- if ( o.isURI() )
- val = o.getURI() ;
- else if ( o.isLiteral() )
- val = o.getLiteralLexicalForm() ;
- else {
- log.warn("Not a literal value for mapped field-predicate: " + field + " :: "
- + FmtUtils.stringForString(field)) ;
- continue ;
- }
- entity.put(field, val) ;
- }
- indexer.addEntity(entity) ;
- }
-
private void docQuads(List batch) {
// One document per triple/quad
diff --git a/jena-text/src/main/java/org/apache/jena/query/text/TextDocProducerTriples.java b/jena-text/src/main/java/org/apache/jena/query/text/TextDocProducerTriples.java
index c0bcabd16b7..fca0743fbba 100644
--- a/jena-text/src/main/java/org/apache/jena/query/text/TextDocProducerTriples.java
+++ b/jena-text/src/main/java/org/apache/jena/query/text/TextDocProducerTriples.java
@@ -20,11 +20,8 @@
import org.apache.jena.graph.Node ;
import org.apache.jena.sparql.core.QuadAction ;
-import org.slf4j.Logger ;
-import org.slf4j.LoggerFactory ;
public class TextDocProducerTriples implements TextDocProducer {
- private static Logger log = LoggerFactory.getLogger(TextDocProducerTriples.class) ;
private final EntityDefinition defn ;
private final TextIndex indexer ;
diff --git a/jena-text/src/main/java/org/apache/jena/query/text/TextIndexSolr.java b/jena-text/src/main/java/org/apache/jena/query/text/TextIndexSolr.java
index 54a3263ece5..0d78f0ae737 100644
--- a/jena-text/src/main/java/org/apache/jena/query/text/TextIndexSolr.java
+++ b/jena-text/src/main/java/org/apache/jena/query/text/TextIndexSolr.java
@@ -166,8 +166,6 @@ private List> process(SolrDocumentList solrResults)
// Null means "not stored" or "not present"
if ( obj instanceof List> )
{
- @SuppressWarnings("unchecked")
- List vals = (List)obj ;
continue ;
}
diff --git a/jena-text/src/main/java/org/apache/jena/query/text/TextQueryPF.java b/jena-text/src/main/java/org/apache/jena/query/text/TextQueryPF.java
index 140ef09a19d..3cd8291714e 100644
--- a/jena-text/src/main/java/org/apache/jena/query/text/TextQueryPF.java
+++ b/jena-text/src/main/java/org/apache/jena/query/text/TextQueryPF.java
@@ -36,7 +36,6 @@
import org.apache.jena.sparql.mgt.Explain ;
import org.apache.jena.sparql.pfunction.PropFuncArg ;
import org.apache.jena.sparql.pfunction.PropertyFunctionBase ;
-import org.apache.jena.sparql.util.Context ;
import org.apache.jena.sparql.util.IterLib ;
import org.apache.jena.sparql.util.NodeFactoryExtra ;
import org.apache.lucene.queryparser.classic.QueryParserBase ;
@@ -80,8 +79,6 @@ public void build(PropFuncArg argSubject, Node predicate, PropFuncArg argObject,
private static TextIndex chooseTextIndex(DatasetGraph dsg) {
- Context c = dsg.getContext() ;
-
Object obj = dsg.getContext().get(TextQuery.textIndex) ;
if (obj != null) {
@@ -112,8 +109,6 @@ public QueryIterator exec(Binding binding, PropFuncArg argSubject, Node predicat
return IterLib.result(binding, execCxt) ;
}
- DatasetGraph dsg = execCxt.getDataset() ;
-
argSubject = Substitute.substitute(argSubject, binding) ;
argObject = Substitute.substitute(argObject, binding) ;
@@ -157,7 +152,6 @@ private QueryIterator concreteSubject(Binding binding, Node s, StrMatch match, E
return IterLib.noResults(execCxt) ;
}
- String qs = match.getQueryString() ;
List x = query(match.getQueryString(), -1, execCxt) ;
if ( x == null || ! x.contains(s) )
return IterLib.noResults(execCxt) ;
diff --git a/jena-text/src/main/java/org/apache/jena/query/text/assembler/EntityDefinitionAssembler.java b/jena-text/src/main/java/org/apache/jena/query/text/assembler/EntityDefinitionAssembler.java
index ca66f271c5b..af391db9798 100644
--- a/jena-text/src/main/java/org/apache/jena/query/text/assembler/EntityDefinitionAssembler.java
+++ b/jena-text/src/main/java/org/apache/jena/query/text/assembler/EntityDefinitionAssembler.java
@@ -40,7 +40,7 @@
import org.apache.jena.vocabulary.RDF ;
import org.apache.lucene.analysis.Analyzer;
-public class EntityDefinitionAssembler extends AssemblerBase implements Assembler
+public class EntityDefinitionAssembler extends AssemblerBase
{
/*
<#entMap> a text:EntityMap ;
diff --git a/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextDatasetAssembler.java b/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextDatasetAssembler.java
index 0125a6a37ed..6e4613bc265 100644
--- a/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextDatasetAssembler.java
+++ b/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextDatasetAssembler.java
@@ -36,14 +36,11 @@
import org.apache.jena.rdf.model.Resource ;
import org.apache.jena.sparql.ARQConstants ;
import org.apache.jena.sparql.core.DatasetGraph ;
-import org.apache.jena.sparql.core.assembler.DatasetAssembler ;
import org.apache.jena.sparql.util.Loader ;
import org.apache.jena.sparql.util.graph.GraphUtils ;
-public class TextDatasetAssembler extends AssemblerBase implements Assembler
+public class TextDatasetAssembler extends AssemblerBase
{
- private DatasetAssembler datasetAssembler = new DatasetAssembler() ;
-
public static Resource getType() { return textDataset ; }
/*
diff --git a/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextIndexLuceneAssembler.java b/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextIndexLuceneAssembler.java
index 361841c0580..9324bbbea4e 100644
--- a/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextIndexLuceneAssembler.java
+++ b/jena-text/src/main/java/org/apache/jena/query/text/assembler/TextIndexLuceneAssembler.java
@@ -53,7 +53,6 @@ public class TextIndexLuceneAssembler extends AssemblerBase {
.
*/
- @SuppressWarnings("resource")
@Override
public TextIndex open(Assembler a, Resource root, Mode mode) {
try {
From da89f84d0a4440129301bf922235a9742a3204a3 Mon Sep 17 00:00:00 2001
From: ajs6f
Date: Thu, 7 May 2015 22:23:38 -0400
Subject: [PATCH 5/7] Removing unused fields
---
.../src/main/java/arq/cmdline/ModEngine.java | 2 --
jena-arq/src/main/java/arq/sse.java | 1 -
.../main/java/org/apache/jena/riot/IO_Jena.java | 2 --
.../java/org/apache/jena/riot/RDFDataMgr.java | 1 -
.../org/apache/jena/riot/checker/CheckerVar.java | 3 ---
.../java/org/apache/jena/riot/lang/LangCSV.java | 3 ---
.../org/apache/jena/riot/lang/LangRDFXML.java | 2 --
.../org/apache/jena/riot/lang/ReaderTriX.java | 1 -
.../apache/jena/riot/out/NodeFormatterTTL.java | 2 --
.../org/apache/jena/riot/out/SinkQuadOutput.java | 4 ----
.../apache/jena/riot/out/SinkTripleOutput.java | 5 -----
.../process/inf/InferenceProcessorStreamRDF.java | 2 --
.../org/apache/jena/riot/system/Checker.java | 2 --
.../jena/riot/system/ParserProfileChecker.java | 2 --
.../java/org/apache/jena/riot/thrift/BinRDF.java | 1 -
.../apache/jena/riot/thrift/Binding2Thrift.java | 3 ---
.../jena/riot/thrift/StreamRDF2Thrift.java | 4 ----
.../apache/jena/riot/tokens/PrintTokenizer.java | 1 -
.../optimize/ExprTransformConstantFold.java | 2 --
.../core/describe/DescribeHandlerRegistry.java | 2 --
.../jena/sparql/engine/QueryExecutionBase.java | 4 ----
.../org/apache/jena/sparql/engine/Rename.java | 3 ---
.../engine/binding/BindingOutputStream.java | 1 -
.../sparql/engine/iterator/QueryIterMinus.java | 4 +---
.../sparql/engine/iterator/QueryIterPath.java | 4 ----
.../sparql/engine/optimizer/StatsMatcher.java | 13 -------------
.../org/apache/jena/sparql/expr/ExprBuild.java | 1 -
.../apache/jena/sparql/expr/ExprFunctionOp.java | 1 -
.../org/apache/jena/sparql/expr/NodeValue.java | 5 -----
.../expr/aggregate/AccumulatorDistinctExpr.java | 2 --
.../sparql/expr/aggregate/AccumulatorExpr.java | 2 --
.../jena/sparql/expr/aggregate/AggCustom.java | 4 +---
.../jena/sparql/expr/aggregate/AggNull.java | 4 +---
.../jena/sparql/expr/nodevalue/NodeValueOps.java | 2 --
.../jena/sparql/function/FunctionEnvBase.java | 3 ---
.../jena/sparql/pfunction/library/ListBase.java | 3 ---
.../jena/sparql/resultset/JSONInputIterator.java | 4 +---
.../sparql/sse/writers/WriterBasePrefix.java | 3 ---
.../jena/sparql/sse/writers/WriterNode.java | 4 ----
.../jena/sparql/sse/writers/WriterPath.java | 5 -----
.../org/apache/jena/sparql/syntax/Template.java | 1 -
.../jena/riot/system/TestFormatRegistration.java | 2 --
.../jena/riot/system/TestLangRegistration.java | 2 --
.../jena/riot/thrift/TestStreamRDFThrift.java | 2 --
.../jena/sparql/expr/TestNodeFunctions.java | 3 ---
.../apache/jena/sparql/expr/TestXSDFuncOp.java | 3 +--
.../org/apache/jena/atlas/io/InStreamASCII.java | 3 ---
.../jena/atlas/io/InputStreamBuffered.java | 3 ---
.../jena/atlas/iterator/IteratorInteger.java | 2 --
.../java/org/apache/jena/atlas/lib/IRILib.java | 7 +------
.../org/apache/jena/atlas/lib/TestBytes.java | 2 --
.../org/apache/jena/graph/impl/GraphMatcher.java | 1 -
.../apache/jena/ontology/impl/OntModelImpl.java | 4 +---
.../jena/rdfxml/xmloutput/TestXMLFeatures.java | 7 -------
.../org/apache/jena/reasoner/test/Matcher.java | 1 -
.../jena/util/junit/TestFactoryManifest.java | 2 --
.../apache/jena/propertytable/lang/LangCSV.java | 3 ---
.../apache/jena/fuseki/server/CounterName.java | 3 +--
.../server/FusekiServletContextListener.java | 3 ---
.../apache/jena/fuseki/servlets/HttpAction.java | 7 -------
.../fuseki/servlets/SimpleVelocityServlet.java | 1 -
.../apache/jena/fuseki/server/DataService.java | 2 --
.../apache/jena/fuseki/server/SystemState.java | 1 -
.../apache/jena/fuseki/servlets/HttpAction.java | 7 +------
.../java/org/apache/jena/iri/impl/LexerPort.java | 12 ++----------
.../org/apache/jena/iri/impl/LexerQuery.java | 12 ++----------
.../org/apache/jena/iri/impl/LexerScheme.java | 12 ++----------
.../org/apache/jena/iri/impl/LexerUserinfo.java | 12 ++----------
.../org/apache/jena/iri/impl/LexerXHost.java | 12 ++----------
.../org/apache/jena/iri/impl/Specification.java | 5 -----
.../apache/jena/iri/impl/ViolationCodeInfo.java | 10 +---------
.../jena/jdbc/mem/TestMemDriverWithLogging.java | 3 ---
.../main/java/org/apache/jena/sdb/StoreDesc.java | 3 ---
.../java/org/apache/jena/sdb/core/ValScope.java | 6 ------
.../apache/jena/sdb/graph/PrefixMappingSDB.java | 3 ---
.../apache/jena/sdb/layout2/QueryCompiler2.java | 4 +---
.../apache/jena/sdb/layout2/TableDescQuads.java | 3 ---
.../sdb/layout2/hash/FmtLayout2HashHSQL.java | 2 --
.../java/org/apache/jena/sdb/shared/Env.java | 1 -
.../org/apache/jena/sdb/store/StoreConfig.java | 2 --
jena-sdb/src/main/java/sdb/cmd/ModGraph.java | 1 -
jena-sdb/src/main/java/sdb/sdbdelete.java | 2 --
jena-sdb/src/main/java/sdb/sdbload.java | 2 --
jena-sdb/src/main/java/sdb/sdbtruncate.java | 2 --
.../query/spatial/SpatialDocProducerTriples.java | 3 ---
.../main/java/org/apache/jena/tdb/TDBLoader.java | 1 -
.../jena/tdb/base/block/BlockMgrTracker.java | 1 -
.../jena/tdb/base/file/BlockAccessMapped.java | 6 ------
.../jena/tdb/base/file/BufferChannelMem.java | 1 -
.../org/apache/jena/tdb/base/file/MetaFile.java | 3 ---
.../base/recordbuffer/RecordRangeIterator.java | 3 ---
.../jena/tdb/index/bplustree/BPTreeNode.java | 2 --
.../tdb/index/bplustree/BPlusTreeRewriter.java | 1 -
.../java/org/apache/jena/tdb/lib/NodeLib.java | 2 --
.../java/org/apache/jena/tdb/setup/Build.java | 1 -
.../apache/jena/tdb/setup/DatasetBuilderStd.java | 2 --
.../apache/jena/tdb/solver/StageMatchTuple.java | 2 --
.../jena/tdb/store/bulkloader/BulkLoader.java | 6 ------
.../jena/tdb/store/bulkloader/LoadMonitor.java | 4 ----
.../store/bulkloader2/CmdNodeTableBuilder.java | 2 --
.../tdb/store/bulkloader2/RecordsFromInput.java | 2 --
.../jena/tdb/store/bulkloader2/WriteRows.java | 2 --
.../apache/jena/tdb/sys/DatasetControlMRSW.java | 1 -
.../jena/tdb/transaction/DatasetBuilderTxn.java | 4 +---
.../org/apache/jena/tdb/transaction/Journal.java | 1 -
.../apache/jena/tdb/transaction/Transaction.java | 16 ++++------------
.../jena/tdb/transaction/TransactionManager.java | 2 --
.../tdb/extra/T_TransSystemMultiDatasets.java | 3 ---
.../jena/tdb/store/nodetable/TestCodec.java | 1 -
.../tdb/transaction/AbstractTestTransSeq.java | 2 --
110 files changed, 26 insertions(+), 346 deletions(-)
diff --git a/jena-arq/src/main/java/arq/cmdline/ModEngine.java b/jena-arq/src/main/java/arq/cmdline/ModEngine.java
index d140bd8ec58..47b64905716 100644
--- a/jena-arq/src/main/java/arq/cmdline/ModEngine.java
+++ b/jena-arq/src/main/java/arq/cmdline/ModEngine.java
@@ -43,8 +43,6 @@ public class ModEngine extends ModBase
"removeengine"
) ;
- private boolean timing = false ;
-
@Override
public void registerWith(CmdGeneral cmdLine)
{
diff --git a/jena-arq/src/main/java/arq/sse.java b/jena-arq/src/main/java/arq/sse.java
index d12e794d3f5..f1a07219860 100644
--- a/jena-arq/src/main/java/arq/sse.java
+++ b/jena-arq/src/main/java/arq/sse.java
@@ -36,7 +36,6 @@ public class sse extends CmdARQ_SSE
protected final ArgDecl noResolveDecl = new ArgDecl(ArgDecl.NoValue, "raw") ;
private boolean print = true ;
- private boolean structural = true ;
private boolean lineNumbers = false ;
public static void main (String... argv)
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/IO_Jena.java b/jena-arq/src/main/java/org/apache/jena/riot/IO_Jena.java
index 4709b0c7202..3e18cdd03a4 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/IO_Jena.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/IO_Jena.java
@@ -29,8 +29,6 @@ public class IO_Jena
private static String riotBase = "http://jena.apache.org/riot/" ;
private static String streamManagerSymbolStr = riotBase + "streammanager" ;
public static Symbol streamManagerSymbol = Symbol.create(streamManagerSymbolStr) ;
- private static FileManager coreFileManager = null ;
-
public static void wireIntoJena() {
FileManager.setGlobalFileManager(AdapterFileManager.get()) ;
IO_JenaReaders.wireIntoJena() ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/RDFDataMgr.java b/jena-arq/src/main/java/org/apache/jena/riot/RDFDataMgr.java
index 64fa07fac89..772505b0c74 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/RDFDataMgr.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/RDFDataMgr.java
@@ -80,7 +80,6 @@ public class RDFDataMgr
static Logger log = LoggerFactory.getLogger(RDFDataMgr.class) ;
private static String riotBase = "http://jena.apache.org/riot/" ;
- private static String StreamManagerSymbolStr = riotBase+"streamManager" ;
public static Symbol streamManagerSymbol = Symbol.create(riotBase+"streamManager") ;
/** Read triples into a Model from the given location.
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/checker/CheckerVar.java b/jena-arq/src/main/java/org/apache/jena/riot/checker/CheckerVar.java
index e19ed931c1c..33fe84a4b53 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/checker/CheckerVar.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/checker/CheckerVar.java
@@ -24,11 +24,8 @@
public class CheckerVar implements NodeChecker
{
- private ErrorHandler handler ;
-
public CheckerVar(ErrorHandler handler)
{
- this.handler = handler ;
}
@Override
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/LangCSV.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/LangCSV.java
index da1f4a1cc30..ed6945eced1 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/LangCSV.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/LangCSV.java
@@ -43,7 +43,6 @@ public class LangCSV implements LangRIOT {
private InputStream input = null;
private Reader reader = null;
- private String base;
private String filename;
private StreamRDF sink;
private ParserProfile profile; // Warning - we don't use all of this.
@@ -67,7 +66,6 @@ public void setProfile(ParserProfile profile) {
public LangCSV(Reader reader, String base, String filename,
ErrorHandler errorHandler, StreamRDF sink) {
this.reader = reader;
- this.base = base;
this.filename = filename;
this.sink = sink;
this.profile = RiotLib.profile(getLang(), base, errorHandler);
@@ -76,7 +74,6 @@ public LangCSV(Reader reader, String base, String filename,
public LangCSV(InputStream in, String base, String filename,
ErrorHandler errorHandler, StreamRDF sink) {
this.input = in;
- this.base = base;
this.filename = filename;
this.sink = sink;
this.profile = RiotLib.profile(getLang(), base, errorHandler);
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFXML.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFXML.java
index 5e563a27dfd..f9cee1ea849 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFXML.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/LangRDFXML.java
@@ -154,14 +154,12 @@ public void parse()
private static class HandlerSink extends ARPSaxErrorHandler implements StatementHandler, NamespaceHandler
{
private StreamRDF output ;
- private ErrorHandler errHandler ;
private CheckerLiterals checker ;
HandlerSink(StreamRDF output, ErrorHandler errHandler)
{
super(new ErrorHandlerBridge(errHandler)) ;
this.output = output ;
- this.errHandler = errHandler ;
this.checker = new CheckerLiterals(errHandler) ;
}
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java
index 30269e98ba7..8e1e02ff1e7 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java
@@ -99,7 +99,6 @@ public void read(Reader reader, String baseURI, ContentType ct, StreamRDF output
}
private static String nsRDF = RDF.getURI() ;
- private static String nsXSD = XSDDatatype.XSD ; // No "#"
private static String nsXML0 = "http://www.w3.org/XML/1998/namespace" ;
private static String rdfXMLLiteral = XMLLiteralType.theXMLLiteralType.getURI() ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/out/NodeFormatterTTL.java b/jena-arq/src/main/java/org/apache/jena/riot/out/NodeFormatterTTL.java
index 3cd6d4443a3..37aa810f3b9 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/out/NodeFormatterTTL.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/out/NodeFormatterTTL.java
@@ -36,7 +36,6 @@ public class NodeFormatterTTL extends NodeFormatterNT
{
private final NodeToLabel nodeToLabel ;
private final PrefixMap prefixMap ;
- private final String baseIRI ;
private final IRI iriResolver ;
public NodeFormatterTTL(String baseIRI, PrefixMap prefixMap) {
@@ -49,7 +48,6 @@ public NodeFormatterTTL(String baseIRI, PrefixMap prefixMap, NodeToLabel nodeToL
if ( prefixMap == null )
prefixMap = PrefixMapFactory.create() ;
this.prefixMap = prefixMap ;
- this.baseIRI = baseIRI ;
this.iriResolver =
baseIRI != null ? IRIFactory.jenaImplementation().construct(baseIRI) : null ;
}
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/out/SinkQuadOutput.java b/jena-arq/src/main/java/org/apache/jena/riot/out/SinkQuadOutput.java
index 5c61099932e..1dbc229ace8 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/out/SinkQuadOutput.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/out/SinkQuadOutput.java
@@ -35,9 +35,7 @@
*/
public class SinkQuadOutput implements Sink
{
- private Prologue prologue = null ;
private AWriter out ;
- private NodeToLabel labelPolicy = null ;
private NodeFormatter nodeFmt = new NodeFormatterNT() ;
public SinkQuadOutput(OutputStream outs, Prologue prologue, NodeToLabel labels)
@@ -50,12 +48,10 @@ public SinkQuadOutput(OutputStream outs, Prologue prologue, NodeToLabel labels)
// Need to do this later sometimes to sort out the plumbing.
public void setPrologue(Prologue prologue)
{
- this.prologue = prologue ;
}
public void setLabelPolicy(NodeToLabel labels)
{
- this.labelPolicy = labels ;
}
@Override
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/out/SinkTripleOutput.java b/jena-arq/src/main/java/org/apache/jena/riot/out/SinkTripleOutput.java
index 951dfc12af4..3b37b661710 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/out/SinkTripleOutput.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/out/SinkTripleOutput.java
@@ -39,10 +39,7 @@ public class SinkTripleOutput implements Sink
{
// WriterStreamRDFTuples
- private Prologue prologue = null ;
private final AWriter out ;
- private NodeToLabel labelPolicy = null ;
-
private NodeFormatter nodeFmt = new NodeFormatterNT() ;
public SinkTripleOutput(OutputStream outs, Prologue prologue, NodeToLabel labels) {
@@ -53,11 +50,9 @@ public SinkTripleOutput(OutputStream outs, Prologue prologue, NodeToLabel labels
// Need to do this later sometimes to sort out the plumbing.
public void setPrologue(Prologue prologue) {
- this.prologue = prologue ;
}
public void setLabelPolicy(NodeToLabel labels) {
- this.labelPolicy = labels ;
}
@Override
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/process/inf/InferenceProcessorStreamRDF.java b/jena-arq/src/main/java/org/apache/jena/riot/process/inf/InferenceProcessorStreamRDF.java
index 9511b483ab2..54ada9d499f 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/process/inf/InferenceProcessorStreamRDF.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/process/inf/InferenceProcessorStreamRDF.java
@@ -29,7 +29,6 @@
*/
public class InferenceProcessorStreamRDF extends StreamRDFWrapper
{
- private final InferenceSetupRDFS rdfsSetup ;
private final InferenceProcessorRDFS rdfs ;
private boolean isTriple = true ;
private Node g ;
@@ -37,7 +36,6 @@ public class InferenceProcessorStreamRDF extends StreamRDFWrapper
public InferenceProcessorStreamRDF(final StreamRDF output, InferenceSetupRDFS rdfsSetup)
{
super(output) ;
- this.rdfsSetup = rdfsSetup ;
this.rdfs = new InferenceProcessorRDFS(rdfsSetup)
{
@Override
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/system/Checker.java b/jena-arq/src/main/java/org/apache/jena/riot/system/Checker.java
index 37efa29f08f..1749e05228d 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/system/Checker.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/system/Checker.java
@@ -27,8 +27,6 @@
/** A checker validates RDF terms. */
public final class Checker
{
- private boolean allowRelativeIRIs = false ;
- private boolean warningsAreErrors = false ;
private ErrorHandler handler ;
private NodeChecker checkLiterals ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/system/ParserProfileChecker.java b/jena-arq/src/main/java/org/apache/jena/riot/system/ParserProfileChecker.java
index 30809a6b8d4..b9185f4ebf7 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/system/ParserProfileChecker.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/system/ParserProfileChecker.java
@@ -43,8 +43,6 @@
public class ParserProfileChecker extends ParserProfileBase // implements
// ParserProfile
{
- private boolean checkLiterals = true ;
-
public ParserProfileChecker(Prologue prologue, ErrorHandler errorHandler) {
super(prologue, errorHandler) ;
}
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/thrift/BinRDF.java b/jena-arq/src/main/java/org/apache/jena/riot/thrift/BinRDF.java
index 96e4ea614e2..88e8109cc12 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/thrift/BinRDF.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/thrift/BinRDF.java
@@ -44,7 +44,6 @@
*/
public class BinRDF {
- private static int BUFSIZE_IN = 128*1024 ;
private static int BUFSIZE_OUT = 128*1024 ;
/**
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/thrift/Binding2Thrift.java b/jena-arq/src/main/java/org/apache/jena/riot/thrift/Binding2Thrift.java
index 8a95acf312b..15bd81b8069 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/thrift/Binding2Thrift.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/thrift/Binding2Thrift.java
@@ -37,12 +37,10 @@
public class Binding2Thrift implements AutoCloseable {
private final RDF_DataTuple row = new RDF_DataTuple() ;
private final Collection vars ;
- private final OutputStream out ;
private final TProtocol protocol ;
private final boolean encodeValues ;
public Binding2Thrift(OutputStream out, Collection vars, boolean encodeValues) {
- this.out = out ;
this.vars = vars ;
TIOStreamTransport transport = new TIOStreamTransport(out) ;
this.protocol = TRDF.protocol(transport) ;
@@ -69,7 +67,6 @@ private void varsRow() {
public Binding2Thrift(TProtocol out, Collection vars, boolean encodeValues) {
this.vars = vars ;
- this.out = null ;
this.protocol = out ;
this.encodeValues = encodeValues ;
varsRow() ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/thrift/StreamRDF2Thrift.java b/jena-arq/src/main/java/org/apache/jena/riot/thrift/StreamRDF2Thrift.java
index 4109d2c0f35..411ebe28b42 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/thrift/StreamRDF2Thrift.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/thrift/StreamRDF2Thrift.java
@@ -39,8 +39,6 @@
*/
public class StreamRDF2Thrift implements StreamRDF, AutoCloseable
{
- // No REPEAT support.
- private final OutputStream out ;
private final TProtocol protocol ;
private PrefixMap pmap = PrefixMapFactory.create() ;
private final boolean encodeValues ;
@@ -50,7 +48,6 @@ public class StreamRDF2Thrift implements StreamRDF, AutoCloseable
// }
public StreamRDF2Thrift(OutputStream out, boolean encodeValues) {
- this.out = out ;
this.protocol = TRDF.protocol(out) ;
this.encodeValues = encodeValues ;
}
@@ -60,7 +57,6 @@ public StreamRDF2Thrift(OutputStream out, boolean encodeValues) {
// }
public StreamRDF2Thrift(TProtocol out, boolean encodeValues) {
- this.out = null ;
this.protocol = out ;
this.pmap = PrefixMapFactory.create() ;
this.encodeValues = encodeValues ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/tokens/PrintTokenizer.java b/jena-arq/src/main/java/org/apache/jena/riot/tokens/PrintTokenizer.java
index 31490665a00..00277c82fab 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/tokens/PrintTokenizer.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/tokens/PrintTokenizer.java
@@ -24,7 +24,6 @@
/** Print a logging message on every token */
public class PrintTokenizer extends TokenizerWrapper
{
- static private int counter = 0 ;
static private Logger log = LoggerFactory.getLogger("Token") ;
private String label ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/ExprTransformConstantFold.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/ExprTransformConstantFold.java
index 33591d7fa6b..3d87df6e8f1 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/ExprTransformConstantFold.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/ExprTransformConstantFold.java
@@ -33,8 +33,6 @@
*/
public class ExprTransformConstantFold extends ExprTransformCopy {
- private Binding b = null;
-
@Override
public Expr transform(ExprFunction1 func, Expr expr1) {
if (isFoldable(expr1)) {
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/core/describe/DescribeHandlerRegistry.java b/jena-arq/src/main/java/org/apache/jena/sparql/core/describe/DescribeHandlerRegistry.java
index 474ab8a118c..877562978c3 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/core/describe/DescribeHandlerRegistry.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/core/describe/DescribeHandlerRegistry.java
@@ -30,8 +30,6 @@
public class DescribeHandlerRegistry
{
- static private DescribeHandlerRegistry globalRegistry = null ;
-
private List registry = new ArrayList<>() ;
private DescribeHandlerRegistry() { }
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/QueryExecutionBase.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/QueryExecutionBase.java
index 444f83cc9ed..c3de0da36f2 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/QueryExecutionBase.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/QueryExecutionBase.java
@@ -73,7 +73,6 @@ public class QueryExecutionBase implements QueryExecution
private final Object lockTimeout = new Object() ; // synchronization.
private static final long TIMEOUT_UNSET = -1 ;
- private static final long TIMEOUT_INF = -2 ;
private long timeout1 = TIMEOUT_UNSET ;
private long timeout2 = TIMEOUT_UNSET ;
private final AlarmClock alarmClock = AlarmClock.get() ;
@@ -415,14 +414,11 @@ public QueryIteratorTimer2(QueryIterator qIter)
super(qIter) ;
}
- long yieldCount = 0 ;
boolean resetDone = false ;
@Override
protected Binding moveToNextBinding()
{
Binding b = super.moveToNextBinding() ;
- yieldCount++ ;
-
if ( ! resetDone )
{
// Sync on calls of .abort.
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/Rename.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/Rename.java
index 966941d23a3..c2b9e40b1c9 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/Rename.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/Rename.java
@@ -119,12 +119,9 @@ static class RenameAnyVars implements NodeTransform
{
private final Map aliases = new HashMap<>() ;
private final Collection constants ;
- private final String varPrefix ;
-
public RenameAnyVars(Collection constants, String varPrefix)
{
this.constants = constants ;
- this.varPrefix = varPrefix ;
}
@Override
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/binding/BindingOutputStream.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/binding/BindingOutputStream.java
index 6ce4155ae4f..60cb1571d35 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/binding/BindingOutputStream.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/binding/BindingOutputStream.java
@@ -40,7 +40,6 @@
public class BindingOutputStream implements Sink
{
private final AWriter bw ;
- private Binding lastBinding = null ;
private List vars = null ;
private PrefixMap pmap ;
private NodeFormatter nodeFormatter ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterMinus.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterMinus.java
index fe47d898847..05411335b76 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterMinus.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterMinus.java
@@ -33,9 +33,7 @@
public class QueryIterMinus extends QueryIter2
{
private IndexTable tableRight;
- private Map varColumns ;
- private Set rightTable;
- Binding slot = null ;
+ Binding slot = null ;
public QueryIterMinus(QueryIterator left, QueryIterator right, Set commonVars, ExecutionContext qCxt)
{
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterPath.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterPath.java
index 4a4668fd490..41f81448d3e 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterPath.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterPath.java
@@ -31,10 +31,6 @@
public class QueryIterPath extends QueryIterRepeatApply
{
private TriplePath triplePath ;
- private Var varSubject = null ;
- private Var varObject = null ;
-
-
public QueryIterPath(TriplePath triplePath, QueryIterator input, ExecutionContext context)
{
super(input, context) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/optimizer/StatsMatcher.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/optimizer/StatsMatcher.java
index 7798f71130a..01d29c3b69b 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/optimizer/StatsMatcher.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/optimizer/StatsMatcher.java
@@ -64,11 +64,6 @@ public final class StatsMatcher
private static class Match
{
- double weight = NOMATCH ;
- int exactMatches = 0 ;
- int termMatches = 0 ;
- int varMatches = 0 ;
- int anyMatches = 0 ;
}
// General structure
@@ -421,13 +416,11 @@ private static boolean matchNode(Item node, Item item, Match details)
{
if ( isAny(item) )
{
- details.anyMatches ++ ;
return true ;
}
if ( isAnyVar(item) )
{
- details.varMatches ++ ;
return true ;
}
@@ -438,7 +431,6 @@ private static boolean matchNode(Item node, Item item, Match details)
{
if ( item.equals(TERM) )
{
- details.termMatches ++ ;
return true ;
}
// Does not match LITERAL, URI, BNODE and VAR/ANY were done above.
@@ -456,29 +448,24 @@ private static boolean matchNode(Item node, Item item, Match details)
{
if ( item.isNode() && item.getNode().equals(n) )
{
- details.exactMatches ++ ;
return true ;
}
if ( isAnyTerm(item) )
{
- details.termMatches ++ ;
return true ;
}
if ( isAnyURI(item) && n.isURI() )
{
- details.termMatches ++ ;
return true ;
}
if ( isAnyLiteral(item) && n.isLiteral() )
{
- details.termMatches ++ ;
return true ;
}
if ( isAnyBNode(item) && n.isBlank() )
{
- details.termMatches ++ ;
return true ;
}
}
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/ExprBuild.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/ExprBuild.java
index b9315225c69..27d0eacb9c2 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/ExprBuild.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/ExprBuild.java
@@ -25,7 +25,6 @@
public class ExprBuild extends ExprVisitorBase
{
private Context context ;
- private OpEval opExec ;
public ExprBuild(Context context)
{
this.context = context ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/ExprFunctionOp.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/ExprFunctionOp.java
index dd9e60a40f2..3370d0eb625 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/ExprFunctionOp.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/ExprFunctionOp.java
@@ -34,7 +34,6 @@
public abstract class ExprFunctionOp extends ExprFunction
{
private final Op op ;
- private Op opRun = null ;
private final Element element ;
protected ExprFunctionOp(String fName, Element el, Op op)
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/NodeValue.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/NodeValue.java
index 8cff836e570..fc04736d6c2 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/NodeValue.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/NodeValue.java
@@ -152,8 +152,6 @@ public abstract class NodeValue extends ExprNode
public static final NodeValue nvEmptyString = NodeValue.makeString("") ;
- // Use "==" for equality.
- private static final String strForUnNode = "node value nothing" ;
public static final NodeValue nvNothing = NodeValue.makeNode(org.apache.jena.graph.NodeFactory.createAnon(new AnonId("node value nothing"))) ;
public static final String xsdNamespace = XSD+"#" ;
@@ -1018,9 +1016,6 @@ private static NodeValue nodeToNodeValue(Node node)
}
- // Jena code does not have these types (yet)
- private static final String dtXSDprecisionDecimal = XSD+"#precisionDecimal" ;
-
// Returns null for unrecognized literal.
private static NodeValue _setByValue(Node node) {
if ( NodeUtils.hasLang(node) )
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AccumulatorDistinctExpr.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AccumulatorDistinctExpr.java
index e5e10ba0f0c..6bdaa3612ab 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AccumulatorDistinctExpr.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AccumulatorDistinctExpr.java
@@ -33,7 +33,6 @@ abstract class AccumulatorDistinctExpr implements Accumulator
// Better?? record a large hash.
private final Set values = new HashSet<>() ;
private long errorCount = 0 ;
- private long count = 0 ;
private final Expr expr ;
protected AccumulatorDistinctExpr(Expr expr)
@@ -50,7 +49,6 @@ final public void accumulate(Binding binding, FunctionEnv functionEnv)
return ;
values.add(nv) ;
accumulateDistinct(nv, binding, functionEnv) ;
- count++ ;
} catch (ExprEvalException ex)
{
errorCount++ ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AccumulatorExpr.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AccumulatorExpr.java
index b94c98ba3aa..035ba10d5fd 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AccumulatorExpr.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AccumulatorExpr.java
@@ -27,7 +27,6 @@
/** Accumulator that passes down every value of an expression */
abstract class AccumulatorExpr implements Accumulator
{
- private long count = 0 ;
protected long errorCount = 0 ;
private final Expr expr ;
@@ -42,7 +41,6 @@ final public void accumulate(Binding binding, FunctionEnv functionEnv)
try {
NodeValue nv = expr.eval(binding, functionEnv) ;
accumulate(nv, binding, functionEnv) ;
- count++ ;
} catch (ExprEvalException ex)
{
errorCount++ ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggCustom.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggCustom.java
index db3c0f9c791..fd9e933c4a3 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggCustom.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggCustom.java
@@ -152,13 +152,11 @@ public boolean equals(Object other)
// ---- Accumulator
private static class AccCustom implements Accumulator
{
- private int nBindings = 0 ;
-
public AccCustom() { }
@Override
public void accumulate(Binding binding, FunctionEnv functionEnv)
- { nBindings++ ; }
+ { }
@Override
public NodeValue getValue()
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggNull.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggNull.java
index df9f9593689..fd9b7d9bdb6 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggNull.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/aggregate/AggNull.java
@@ -56,13 +56,11 @@ public boolean equals(Object other)
// ---- Accumulator
private static class AccNull implements Accumulator
{
- private int nBindings = 0 ;
-
public AccNull() { }
@Override
public void accumulate(Binding binding, FunctionEnv functionEnv)
- { nBindings++ ; }
+ { }
@Override
public NodeValue getValue()
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/NodeValueOps.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/NodeValueOps.java
index 370ee7fec39..1f212585109 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/NodeValueOps.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/NodeValueOps.java
@@ -100,8 +100,6 @@ public class NodeValueOps
* As per the Java (Xerces) implementation, it just work on durations.
*/
- // Until part of Jena datatypes.
- private static final String dtXSDdateTimeStamp = XSD+"#dateTimeStamp" ;
private static final String dtXSDdayTimeDuration = XSD+"#dayTimeDuration" ;
private static final String dtXSDyearMonthDuration = XSD+"#yearMonthDuration" ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/function/FunctionEnvBase.java b/jena-arq/src/main/java/org/apache/jena/sparql/function/FunctionEnvBase.java
index c531fcedd42..6f51a76cdb3 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/function/FunctionEnvBase.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/function/FunctionEnvBase.java
@@ -31,8 +31,6 @@ public class FunctionEnvBase implements FunctionEnv
private Context context ;
private Graph activeGraph ;
private DatasetGraph dataset ;
- private ExecutionContext execContext = null ;
-
/** Create an execution environment suitable for testing functions and expressions */
public static FunctionEnv createTest()
{
@@ -46,7 +44,6 @@ public static FunctionEnv createTest()
public FunctionEnvBase(ExecutionContext execCxt)
{
this(execCxt.getContext(), execCxt.getActiveGraph(), execCxt.getDataset()) ;
- execContext = execCxt ;
}
public FunctionEnvBase(Context context, Graph activeGraph, DatasetGraph dataset)
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/pfunction/library/ListBase.java b/jena-arq/src/main/java/org/apache/jena/sparql/pfunction/library/ListBase.java
index 7d5b4bebf7c..4f135872f46 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/pfunction/library/ListBase.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/pfunction/library/ListBase.java
@@ -38,9 +38,6 @@
/** Base class for list realted operations */
public abstract class ListBase extends PropertyFunctionEval
{
- private PropFuncArgType objFuncArgType ;
-
-
public ListBase(PropFuncArgType objFuncArgType)
{
super(PropFuncArgType.PF_ARG_SINGLE, objFuncArgType) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/resultset/JSONInputIterator.java b/jena-arq/src/main/java/org/apache/jena/sparql/resultset/JSONInputIterator.java
index 782fc4f7381..7766cea6cd9 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/resultset/JSONInputIterator.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/resultset/JSONInputIterator.java
@@ -57,7 +57,7 @@ public class JSONInputIterator extends QueryIteratorBase {
private InputStream input;
- private boolean isBooleanResults = false, boolResult = false, headerSeen = false;
+ private boolean isBooleanResults = false, headerSeen = false;
private Binding binding = null;
private TokenizerJSON tokens;
private PeekIterator peekIter;
@@ -394,11 +394,9 @@ private void parseBoolean()
String keyword = t.getImage();
if (keyword.equals("true"))
{
- boolResult = true;
}
else if (keyword.equals("false"))
{
- boolResult = false;
}
else
{
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterBasePrefix.java b/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterBasePrefix.java
index 891774b26af..c6f5981e7c2 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterBasePrefix.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterBasePrefix.java
@@ -29,10 +29,7 @@
public class WriterBasePrefix
{
- private static final int NL = WriterLib.NL ;
private static final int NoNL = WriterLib.NoNL ;
- private static final int NoSP = WriterLib.NoSP ;
-
public static interface Fmt { void format() ; }
//public static Fmt fmt = new Fmt(){ public void format() {}} ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterNode.java b/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterNode.java
index 3bcb8f51f5e..f7a54f1e0a9 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterNode.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterNode.java
@@ -31,10 +31,6 @@
public class WriterNode
{
- private static final int NL = WriterLib.NL ;
- private static final int NoNL = WriterLib.NoNL ;
- private static final int NoSP = WriterLib.NoSP ;
-
public static void output(IndentedWriter out, Triple triple, SerializationContext naming)
{
WriterLib.startOneLine(out, Tags.tagTriple) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterPath.java b/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterPath.java
index 24589f662a0..a90667cc66b 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterPath.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/sse/writers/WriterPath.java
@@ -31,10 +31,7 @@
/** SSE Writer */
public class WriterPath
{
- private static final int NL = WriterLib.NL ;
private static final int NoNL = WriterLib.NoNL ;
- private static final int NoSP = WriterLib.NoSP ;
-
public static void write(Path path, Prologue prologue)
{
output(IndentedWriter.stdout, path, new SerializationContext(prologue)) ;
@@ -82,8 +79,6 @@ private static boolean oneLiner(Path path)
}
private static final boolean multiline = false ;
- private static final boolean maxBracket = false ;
-
private static void nl(IndentedWriter out)
{
nl(out, true) ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/Template.java b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/Template.java
index 61c8f964594..31e6b53a5b7 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/syntax/Template.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/syntax/Template.java
@@ -66,7 +66,6 @@ public void subst(Collection acc, Map bNodeMap, Binding b)
}
}
- private int calcHashCode = -1 ;
@Override
public int hashCode()
{
diff --git a/jena-arq/src/test/java/org/apache/jena/riot/system/TestFormatRegistration.java b/jena-arq/src/test/java/org/apache/jena/riot/system/TestFormatRegistration.java
index 5c7449401ba..f7f7a3f17d3 100644
--- a/jena-arq/src/test/java/org/apache/jena/riot/system/TestFormatRegistration.java
+++ b/jena-arq/src/test/java/org/apache/jena/riot/system/TestFormatRegistration.java
@@ -62,13 +62,11 @@ private static void add(String name, List x, RDFFormat format, boolean
x.add(new Object[] {name, format, istriples , isquads }) ;
}
- private String name ;
private RDFFormat format ;
private boolean istriples ;
private boolean isquads ;
public TestFormatRegistration(String name, RDFFormat format, boolean istriples, boolean isquads) {
- this.name = name ;
this.format = format ;
this.istriples = istriples ;
this.isquads = isquads ;
diff --git a/jena-arq/src/test/java/org/apache/jena/riot/system/TestLangRegistration.java b/jena-arq/src/test/java/org/apache/jena/riot/system/TestLangRegistration.java
index 3eb853ced22..56215f2e99c 100644
--- a/jena-arq/src/test/java/org/apache/jena/riot/system/TestLangRegistration.java
+++ b/jena-arq/src/test/java/org/apache/jena/riot/system/TestLangRegistration.java
@@ -56,13 +56,11 @@ private static void add(String name, List x, Lang lang, boolean istrip
x.add(new Object[] {name, lang, istriples , isquads }) ;
}
- private String name ;
private Lang lang ;
private boolean istriples ;
private boolean isquads ;
public TestLangRegistration(String name, Lang lang, boolean istriples, boolean isquads) {
- this.name = name ;
this.lang = lang ;
this.istriples = istriples ;
this.isquads = isquads ;
diff --git a/jena-arq/src/test/java/org/apache/jena/riot/thrift/TestStreamRDFThrift.java b/jena-arq/src/test/java/org/apache/jena/riot/thrift/TestStreamRDFThrift.java
index 192953fab89..15d9ae3f65d 100644
--- a/jena-arq/src/test/java/org/apache/jena/riot/thrift/TestStreamRDFThrift.java
+++ b/jena-arq/src/test/java/org/apache/jena/riot/thrift/TestStreamRDFThrift.java
@@ -45,8 +45,6 @@
public class TestStreamRDFThrift extends BaseTest {
- private static final String DIR = TS_RDFThrift.TestingDir ;
-
@BeforeClass public static void beforeClassInit() { RIOT.init(); }
static String gs = StrUtils.strjoinNL(
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestNodeFunctions.java b/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestNodeFunctions.java
index 2ab01eaede6..670c6f68488 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestNodeFunctions.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestNodeFunctions.java
@@ -33,9 +33,6 @@
import org.junit.Test ;
public class TestNodeFunctions extends BaseTest {
- private static final double accuracyExact = 0.0d ;
- private static final double accuracyClose = 0.000001d ;
-
@Test public void testSameTerm1() {
Node n1 = NodeFactory.createLiteral("xyz") ;
Node n2 = NodeFactory.createLiteral("xyz") ;
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestXSDFuncOp.java b/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestXSDFuncOp.java
index 3e31097aacc..ed6a9a6a4bb 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestXSDFuncOp.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/expr/TestXSDFuncOp.java
@@ -32,8 +32,7 @@ public class TestXSDFuncOp extends BaseTest
{
private static final double accuracyExact_D = 0.0d ;
private static final double accuracyExact_F = 0.0d ;
- private static final double accuracyClose_D = 0.000001d ;
- private static final double accuracyClose_F = 0.000001f ;
+
// These add tests also test that the right kind of operation was done.
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/io/InStreamASCII.java b/jena-base/src/main/java/org/apache/jena/atlas/io/InStreamASCII.java
index 049449cb3f0..394fd91af05 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/io/InStreamASCII.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/io/InStreamASCII.java
@@ -29,8 +29,6 @@
public final class InStreamASCII extends Reader implements CharStream
{
private InputStreamBuffered input ;
- private long count = 0 ;
-
public InStreamASCII(InputStream in)
{
if ( in instanceof InputStreamBuffered )
@@ -83,7 +81,6 @@ public int read() throws IOException
@Override
public int advance()
{
- count++ ;
return input.advance() ;
}
}
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/io/InputStreamBuffered.java b/jena-base/src/main/java/org/apache/jena/atlas/io/InputStreamBuffered.java
index 9b03d434ea3..9b5ae29644b 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/io/InputStreamBuffered.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/io/InputStreamBuffered.java
@@ -37,8 +37,6 @@ public final class InputStreamBuffered extends InputStream
private byte[] buffer ;
private int buffLen = 0 ;
private int idx = 0 ;
- private long count = 0 ;
-
public InputStreamBuffered(InputStream input)
{
this(input, DFT_BUFSIZE) ;
@@ -82,7 +80,6 @@ public final int advance()
byte ch = buffer[idx] ;
// Advance the lookahead character
idx++ ;
- count++ ;
return ch & 0xFF ;
}
else
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/iterator/IteratorInteger.java b/jena-base/src/main/java/org/apache/jena/atlas/iterator/IteratorInteger.java
index 6fff27c6b2b..6092c365c07 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/iterator/IteratorInteger.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/iterator/IteratorInteger.java
@@ -22,7 +22,6 @@
public class IteratorInteger implements Iterator
{
- private final long start ;
private final long finish ;
private long current ;
@@ -35,7 +34,6 @@ public static IteratorInteger range(long start, long finish)
/** [start, finish) */
public IteratorInteger(long start, long finish)
{
- this.start = start ;
this.finish = finish ;
this.current = start ;
}
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/lib/IRILib.java b/jena-base/src/main/java/org/apache/jena/atlas/lib/IRILib.java
index 38846404e15..f11d84a0af5 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/lib/IRILib.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/lib/IRILib.java
@@ -38,12 +38,7 @@ public class IRILib
/ "*" / "+" / "," / ";" / "="
*/
- private static char uri_reserved[] =
- { '!', '*', '"', '\'', '(', ')', ';', ':', '@', '&',
- '=', '+', '$', ',', '/', '?', '%', '#', '[', ']' } ;
-
- // No allowed in URIs
- private static char uri_non_chars[] = { '<', '>', '{', '}', '|', '\\', '`', '^', ' ', '\n', '\r', '\t', '£' } ;
+
// RFC 2396
//private static char uri_unwise[] = { '{' , '}', '|', '\\', '^', '[', ']', '`' } ;
diff --git a/jena-base/src/test/java/org/apache/jena/atlas/lib/TestBytes.java b/jena-base/src/test/java/org/apache/jena/atlas/lib/TestBytes.java
index a8575093db4..e29675aeddf 100644
--- a/jena-base/src/test/java/org/apache/jena/atlas/lib/TestBytes.java
+++ b/jena-base/src/test/java/org/apache/jena/atlas/lib/TestBytes.java
@@ -178,8 +178,6 @@ private static void codec(String str)
}
static private final String asciiBase = "abc" ;
- static private final String latinBase = "Àéíÿ" ;
- static private final String latinExtraBase = "ỹfifl" ; // fi-ligature, fl-ligature
static private final String greekBase = "αβγ" ;
static private final String hewbrewBase = "אבג" ;
static private final String arabicBase = "ءآأ";
diff --git a/jena-core/src/main/java/org/apache/jena/graph/impl/GraphMatcher.java b/jena-core/src/main/java/org/apache/jena/graph/impl/GraphMatcher.java
index 55c9f85461d..7237f3ab3bc 100644
--- a/jena-core/src/main/java/org/apache/jena/graph/impl/GraphMatcher.java
+++ b/jena-core/src/main/java/org/apache/jena/graph/impl/GraphMatcher.java
@@ -722,7 +722,6 @@ boolean contextualEquals(AnonResource v,AnonStatement sB,AnonResource vB) {
// algorithm is proceeding.
private class Bucket {
Set anonRes = CollectionFactory.createHashedSet();
- int hash[] = new int[MAX_HASH_DEPTH];
boolean bind(Bucket singleton) {
return bind(aMember(),singleton,singleton.aMember());
}
diff --git a/jena-core/src/main/java/org/apache/jena/ontology/impl/OntModelImpl.java b/jena-core/src/main/java/org/apache/jena/ontology/impl/OntModelImpl.java
index d83a71fce34..c0855beb64e 100644
--- a/jena-core/src/main/java/org/apache/jena/ontology/impl/OntModelImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/ontology/impl/OntModelImpl.java
@@ -76,9 +76,7 @@ public class OntModelImpl extends ModelCom implements OntModel
static private Logger s_log = LoggerFactory.getLogger( OntModelImpl.class );
- /** Found from {@link owlSyntaxCheckerClassName}, must implement
- * {@link OWLSyntaxChecker}. */
- static private Class> owlSyntaxCheckerClass;
+
// Instance variables
//////////////////////////////////
diff --git a/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/TestXMLFeatures.java b/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/TestXMLFeatures.java
index 3f6e9e76c45..60512b87a06 100644
--- a/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/TestXMLFeatures.java
+++ b/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/TestXMLFeatures.java
@@ -682,11 +682,4 @@ public void testRelative() throws Exception {
relative(i, "http://www.example.org/A/B#", rData3);
}
}
-
- private static String uris[] = { "http://www.example.org/a/b/c/d/",
- "http://www.example.org/a/b/c/d/e/f/g/",
- "http://www.example.org/a/b/C/D",
- "http://www.example.org/A/B#foo/",
- "http://www.example.org/a/b/c/d/X#bar", "http://example.com/A",
- "http://www.example.org/a/b/c/d/z?x=a", };
}
diff --git a/jena-core/src/test/java/org/apache/jena/reasoner/test/Matcher.java b/jena-core/src/test/java/org/apache/jena/reasoner/test/Matcher.java
index 7440171729b..4ec646ce7bf 100644
--- a/jena-core/src/test/java/org/apache/jena/reasoner/test/Matcher.java
+++ b/jena-core/src/test/java/org/apache/jena/reasoner/test/Matcher.java
@@ -205,7 +205,6 @@ public Node allocate()
}
private static class AllocatorAny implements Allocator {
- int counter = 0 ;
@Override
public Node allocate()
{ return Node.ANY ; }
diff --git a/jena-core/src/test/java/org/apache/jena/util/junit/TestFactoryManifest.java b/jena-core/src/test/java/org/apache/jena/util/junit/TestFactoryManifest.java
index aa39589e446..a27bb4d45ca 100644
--- a/jena-core/src/test/java/org/apache/jena/util/junit/TestFactoryManifest.java
+++ b/jena-core/src/test/java/org/apache/jena/util/junit/TestFactoryManifest.java
@@ -29,8 +29,6 @@
public abstract class TestFactoryManifest implements ManifestItemHandler
{
private TestSuite currentTestSuite = null ;
- private TestSuite testSuite = null ;
-
public TestFactoryManifest() {}
public TestSuite process(String filename)
diff --git a/jena-csv/src/main/java/org/apache/jena/propertytable/lang/LangCSV.java b/jena-csv/src/main/java/org/apache/jena/propertytable/lang/LangCSV.java
index 16fde2ed282..0862578eb18 100644
--- a/jena-csv/src/main/java/org/apache/jena/propertytable/lang/LangCSV.java
+++ b/jena-csv/src/main/java/org/apache/jena/propertytable/lang/LangCSV.java
@@ -48,7 +48,6 @@ public class LangCSV implements LangRIOT {
private InputStream input = null;
private Reader reader = null;
- private String base;
private String filename;
private StreamRDF sink;
private ParserProfile profile; // Warning - we don't use all of this.
@@ -70,7 +69,6 @@ public void setProfile(ParserProfile profile) {
public LangCSV(Reader reader, String base, String filename, ErrorHandler errorHandler, StreamRDF sink) {
this.reader = reader;
- this.base = base;
this.filename = filename;
this.sink = sink;
this.profile = RiotLib.profile(getLang(), base, errorHandler);
@@ -78,7 +76,6 @@ public LangCSV(Reader reader, String base, String filename, ErrorHandler errorHa
public LangCSV(InputStream in, String base, String filename, ErrorHandler errorHandler, StreamRDF sink) {
this.input = in;
- this.base = base;
this.filename = filename;
this.sink = sink;
this.profile = RiotLib.profile(getLang(), base, errorHandler);
diff --git a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/server/CounterName.java b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/server/CounterName.java
index 2952aa847b8..aa026fbdefa 100644
--- a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/server/CounterName.java
+++ b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/server/CounterName.java
@@ -77,7 +77,6 @@ public enum CounterName {
;
- private String name ;
- private CounterName(String name) { this.name = name ; }
+ private CounterName(String name) { }
}
diff --git a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/server/FusekiServletContextListener.java b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/server/FusekiServletContextListener.java
index f1c964275b1..234f6c2015e 100644
--- a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/server/FusekiServletContextListener.java
+++ b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/server/FusekiServletContextListener.java
@@ -22,10 +22,7 @@
import javax.servlet.ServletContextListener ;
public class FusekiServletContextListener implements ServletContextListener {
- // This could do the initialization.
- private final SPARQLServer sparqlServer ;
public FusekiServletContextListener(SPARQLServer sparqlServer) {
- this.sparqlServer = sparqlServer ;
}
@Override
diff --git a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
index 5b85a997e1e..4a9db9e30f3 100644
--- a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
+++ b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
@@ -57,8 +57,6 @@ public class HttpAction
private Transactional transactional ;
private boolean isTransactional;
private DatasetGraph activeDSG ; // Set when inside begin/end.
- private ReadWrite activeMode ; // Set when inside begin/end.
-
private boolean startTimeIsSet = false ;
private boolean finishTimeIsSet = false ;
@@ -170,7 +168,6 @@ public boolean isTransactional() {
}
public void beginRead() {
- activeMode = READ ;
transactional.begin(READ) ;
activeDSG = dsg ;
dsRef.startTxn(READ) ;
@@ -178,14 +175,12 @@ public void beginRead() {
public void endRead() {
dsRef.finishTxn(READ) ;
- activeMode = null ;
transactional.end() ;
activeDSG = null ;
}
public void beginWrite() {
transactional.begin(WRITE) ;
- activeMode = WRITE ;
activeDSG = dsg ;
dsRef.startTxn(WRITE) ;
}
@@ -209,8 +204,6 @@ public void abort() {
public void endWrite() {
dsRef.finishTxn(WRITE) ;
- activeMode = null ;
-
if ( transactional.isInTransaction() ) {
Log.warn(this, "Transaction still active in endWriter - no commit or abort seen (forced abort)") ;
try {
diff --git a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SimpleVelocityServlet.java b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SimpleVelocityServlet.java
index 8773ebae888..d9d291c9ccb 100644
--- a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SimpleVelocityServlet.java
+++ b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SimpleVelocityServlet.java
@@ -55,7 +55,6 @@ public class SimpleVelocityServlet extends HttpServlet
private String docbase ;
private VelocityEngine velocity ;
- private String functionsName = null ;
private final Map datamodel ;
public SimpleVelocityServlet(String base, Map datamodel)
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java
index e4b8793c6cb..306d4245407 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java
@@ -51,7 +51,6 @@ public static DataService serviceOnlyDataService() {
dummy.addEndpoint(OperationName.Query, DEF.ServiceQueryAlt) ;
}
- private final DataServiceDesc svcDesc ;
private DatasetGraph dataset = null ; // Only valid if active.
private ListMultimap operations = ArrayListMultimap.create() ;
@@ -66,7 +65,6 @@ public static DataService serviceOnlyDataService() {
private final AtomicBoolean acceptingRequests = new AtomicBoolean(true) ;
public DataService(DataServiceDesc desc, DatasetGraph dataset) {
- this.svcDesc = desc ;
this.dataset = dataset ;
counters.add(CounterName.Requests) ;
counters.add(CounterName.RequestsGood) ;
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/SystemState.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/SystemState.java
index e756043f114..8d01148c555 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/SystemState.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/SystemState.java
@@ -31,7 +31,6 @@
import org.apache.jena.tdb.transaction.DatasetGraphTransaction ;
public class SystemState {
- private static String SystemDatabaseLocation ;
// Testing may reset this.
public static Location location ;
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
index c60ae3d3b9e..206faaa7084 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
@@ -60,7 +60,7 @@ public class HttpAction
private Transactional transactional = null ;
private boolean isTransactional = false ;
private DatasetGraph activeDSG = null ; // Set when inside begin/end.
- private ReadWrite activeMode = null ; // Set when inside begin/end.
+
// -- Valid only for administration actions.
@@ -253,7 +253,6 @@ public boolean isTransactional() {
}
public void beginRead() {
- activeMode = READ ;
transactional.begin(READ) ;
activeDSG = dsg ;
dataService.startTxn(READ) ;
@@ -261,14 +260,12 @@ public void beginRead() {
public void endRead() {
dataService.finishTxn(READ) ;
- activeMode = null ;
transactional.end() ;
activeDSG = null ;
}
public void beginWrite() {
transactional.begin(WRITE) ;
- activeMode = WRITE ;
activeDSG = dsg ;
dataService.startTxn(WRITE) ;
}
@@ -292,8 +289,6 @@ public void abort() {
public void endWrite() {
dataService.finishTxn(WRITE) ;
- activeMode = null ;
-
if ( transactional.isInTransaction() ) {
Log.warn(this, "Transaction still active in endWriter - no commit or abort seen (forced abort)") ;
try {
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPort.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPort.java
index 3e3cb0eff48..d6abb521371 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPort.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPort.java
@@ -212,12 +212,6 @@ the source of the yytext() string */
/** the number of characters up to the start of the matched text */
private int yychar;
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- private int yycolumn;
-
/**
* zzAtBOL == true <=> the scanner is currently at the beginning of a line
*/
@@ -226,8 +220,7 @@ the source of the yytext() string */
/** zzAtEOF == true <=> the scanner is at the EOF */
private boolean zzAtEOF;
- /** denotes if the user-EOF-code has already been executed */
- private boolean zzEOFDone;
+
/* user code: */
@@ -355,10 +348,9 @@ private final void yyreset(java.io.Reader reader) {
zzReader = reader;
zzAtBOL = true;
zzAtEOF = false;
- zzEOFDone = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = 0;
- yyline = yychar = yycolumn = 0;
+ yyline = yychar = 0;
zzLexicalState = YYINITIAL;
}
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerQuery.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerQuery.java
index 18e9f865c91..09d6f340ca7 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerQuery.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerQuery.java
@@ -228,12 +228,6 @@ the source of the yytext() string */
/** the number of characters up to the start of the matched text */
private int yychar;
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- private int yycolumn;
-
/**
* zzAtBOL == true <=> the scanner is currently at the beginning of a line
*/
@@ -242,8 +236,7 @@ the source of the yytext() string */
/** zzAtEOF == true <=> the scanner is at the EOF */
private boolean zzAtEOF;
- /** denotes if the user-EOF-code has already been executed */
- private boolean zzEOFDone;
+
/* user code: */
@@ -370,10 +363,9 @@ private final void yyreset(java.io.Reader reader) {
zzReader = reader;
zzAtBOL = true;
zzAtEOF = false;
- zzEOFDone = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = 0;
- yyline = yychar = yycolumn = 0;
+ yyline = yychar = 0;
zzLexicalState = YYINITIAL;
}
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerScheme.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerScheme.java
index 690b08255aa..f8f7f34656e 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerScheme.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerScheme.java
@@ -215,12 +215,6 @@ the source of the yytext() string */
/** the number of characters up to the start of the matched text */
private int yychar;
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- private int yycolumn;
-
/**
* zzAtBOL == true <=> the scanner is currently at the beginning of a line
*/
@@ -229,8 +223,7 @@ the source of the yytext() string */
/** zzAtEOF == true <=> the scanner is at the EOF */
private boolean zzAtEOF;
- /** denotes if the user-EOF-code has already been executed */
- private boolean zzEOFDone;
+
/* user code: */
@@ -358,10 +351,9 @@ private final void yyreset(java.io.Reader reader) {
zzReader = reader;
zzAtBOL = true;
zzAtEOF = false;
- zzEOFDone = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = 0;
- yyline = yychar = yycolumn = 0;
+ yyline = yychar = 0;
zzLexicalState = YYINITIAL;
}
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerUserinfo.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerUserinfo.java
index 3979cbb2996..8e58d9d0855 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerUserinfo.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerUserinfo.java
@@ -228,12 +228,6 @@ the source of the yytext() string */
/** the number of characters up to the start of the matched text */
private int yychar;
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- private int yycolumn;
-
/**
* zzAtBOL == true <=> the scanner is currently at the beginning of a line
*/
@@ -242,8 +236,7 @@ the source of the yytext() string */
/** zzAtEOF == true <=> the scanner is at the EOF */
private boolean zzAtEOF;
- /** denotes if the user-EOF-code has already been executed */
- private boolean zzEOFDone;
+
/* user code: */
@@ -370,10 +363,9 @@ private final void yyreset(java.io.Reader reader) {
zzReader = reader;
zzAtBOL = true;
zzAtEOF = false;
- zzEOFDone = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = 0;
- yyline = yychar = yycolumn = 0;
+ yyline = yychar = 0;
zzLexicalState = YYINITIAL;
}
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerXHost.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerXHost.java
index d5cc345361e..04a52decb9c 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerXHost.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerXHost.java
@@ -228,12 +228,6 @@ the source of the yytext() string */
/** the number of characters up to the start of the matched text */
private int yychar;
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- private int yycolumn;
-
/**
* zzAtBOL == true <=> the scanner is currently at the beginning of a line
*/
@@ -242,8 +236,7 @@ the source of the yytext() string */
/** zzAtEOF == true <=> the scanner is at the EOF */
private boolean zzAtEOF;
- /** denotes if the user-EOF-code has already been executed */
- private boolean zzEOFDone;
+
/* user code: */
@@ -381,10 +374,9 @@ private final void yyreset(java.io.Reader reader) {
zzReader = reader;
zzAtBOL = true;
zzAtEOF = false;
- zzEOFDone = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = 0;
- yyline = yychar = yycolumn = 0;
+ yyline = yychar = 0;
zzLexicalState = YYINITIAL;
}
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/Specification.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/Specification.java
index 6781116b759..3de445de11c 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/Specification.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/Specification.java
@@ -33,10 +33,7 @@ public class Specification extends IRIExamples {
private final String uri;
private final String name;
- private final String title;
private final String section;
- private final String rfc;
-
private final boolean isScheme;
private final boolean isIri;
@@ -49,7 +46,6 @@ public Specification(String name,
String title,
String section, String[] bad, String[] good) {
super(bad,good);
- this.rfc = rfc;
if (type.equals("iri")) {
isScheme = false;
isIri = true;
@@ -67,7 +63,6 @@ public Specification(String name,
this.uri = uri;
this.name = name;
this.section = section.equals("")?null:section;
- this.title = title;
if (all.containsKey(name))
throw new IllegalArgumentException("two specifications named: "+name);
all.put(name,this);
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/ViolationCodeInfo.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/ViolationCodeInfo.java
index 953bc1332d7..d942bb80e7d 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/ViolationCodeInfo.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/ViolationCodeInfo.java
@@ -57,8 +57,7 @@ static abstract public class FromSpec extends InSpec {
final private int component;
final private String definition;
- final private String definitionHtml;
- @Override
+ @Override
public boolean applies(int slot, String scheme) {
if (component != -1 && component != slot)
return false;
@@ -69,10 +68,6 @@ public FromSpec(String name, int component, String uri, String defn, String def
super(name,uri);
this.component = component;
definition = defn;
- // TODO: definitions of schemes etc.
-// if (definition == null)
-// System.err.println(name);
- definitionHtml = defnHtml;
}
@Override
@@ -121,7 +116,6 @@ public FromAlso(String spec, String uri) {
final private String name;
final private int code;
final private String description;
- final private String descriptionHtml;
final private boolean unimplemented;
final private InSpec specifications[];
@@ -138,7 +132,6 @@ public ViolationCodeInfo(int code, String name,
this.name = name;
this.code = code;
this.description = desc;
- this.descriptionHtml = descHtml;
this.unimplemented = unimplemented;
// this.badExamples = badExamples;
// this.goodExamples = goodExamples;
@@ -154,7 +147,6 @@ public ViolationCodeInfo(int code, String name, String[] badExamples,
this.name = name;
this.code = code;
this.description = name;
- this.descriptionHtml = "name
";
this.unimplemented = !internal;
// this.badExamples = badExamples;
// this.goodExamples = goodExamples;
diff --git a/jena-jdbc/jena-jdbc-driver-mem/src/test/java/org/apache/jena/jdbc/mem/TestMemDriverWithLogging.java b/jena-jdbc/jena-jdbc-driver-mem/src/test/java/org/apache/jena/jdbc/mem/TestMemDriverWithLogging.java
index f9a76950026..cfc84c9a638 100644
--- a/jena-jdbc/jena-jdbc-driver-mem/src/test/java/org/apache/jena/jdbc/mem/TestMemDriverWithLogging.java
+++ b/jena-jdbc/jena-jdbc-driver-mem/src/test/java/org/apache/jena/jdbc/mem/TestMemDriverWithLogging.java
@@ -35,9 +35,6 @@
*/
public class TestMemDriverWithLogging extends AbstractJenaDriverTests {
- private static ByteArrayOutputStream output;
- private static PrintStream orig;
-
@AfterClass public static void afterClassResetLogging() {
// Unfortunately, this code "knows" how log4j was set up in testing
// Thsi is fragile.
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/StoreDesc.java b/jena-sdb/src/main/java/org/apache/jena/sdb/StoreDesc.java
index 71c2cb8744d..3c20498b3d9 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/StoreDesc.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/StoreDesc.java
@@ -41,8 +41,6 @@ public class StoreDesc
public SDBConnectionDesc connDesc = null ;
private DatabaseType dbType = null ;
private LayoutType layout = null ;
- private FeatureSet featureSet = null ;
-
/** MySQL specific */
public MySQLEngineType engineType = null ;
@@ -75,7 +73,6 @@ public StoreDesc(LayoutType layout, DatabaseType dbType, FeatureSet featureSet)
this.dbType = dbType ;
if ( featureSet == null )
featureSet = new FeatureSet() ;
- this.featureSet = featureSet ;
}
public LayoutType getLayout() { return layout ; }
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/core/ValScope.java b/jena-sdb/src/main/java/org/apache/jena/sdb/core/ValScope.java
index 3824243a139..1e2ac9a85ef 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/core/ValScope.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/core/ValScope.java
@@ -26,13 +26,7 @@
public class ValScope
{
- // Need a value for a variable in a given type.
- private Var var ;
- private ValueSpace valType ;
-
public ValScope(Var var, ValueSpace valType)
{
- this.var = var ;
- this.valType = valType ;
}
}
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/graph/PrefixMappingSDB.java b/jena-sdb/src/main/java/org/apache/jena/sdb/graph/PrefixMappingSDB.java
index 811765b6e18..0de65b00a39 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/graph/PrefixMappingSDB.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/graph/PrefixMappingSDB.java
@@ -66,12 +66,9 @@ PRIMARY KEY (prefix) ,
*/
private SDBConnection connection = null ;
- private String graphName ;
-
public PrefixMappingSDB(String graphURI, SDBConnection sdb)
{
super() ;
- graphName = graphURI ;
connection = sdb ;
readPrefixMapping() ;
}
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/QueryCompiler2.java b/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/QueryCompiler2.java
index 531577e03e8..36f58084c49 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/QueryCompiler2.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/QueryCompiler2.java
@@ -88,10 +88,8 @@ protected static Op rewriteFilters(Op op, SDBRequest request)
// Find variables that need to be returned.
private static class FilterOptimizer extends TransformCopy
{
- private final SDBRequest request ;
-
public FilterOptimizer(SDBRequest request)
- { this.request = request ; }
+ { }
@Override
public Op transform(OpFilter opFilter, Op op)
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/TableDescQuads.java b/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/TableDescQuads.java
index fd07e316300..3198101b814 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/TableDescQuads.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/TableDescQuads.java
@@ -32,8 +32,6 @@ public class TableDescQuads extends TableDesc
private final String _subjectCol;
private final String _predicateCol ;
private final String _objectCol ;
- private final String _tableName ;
-
public static String name() { return tableName ; }
public TableDescQuads()
@@ -42,7 +40,6 @@ public TableDescQuads()
protected TableDescQuads(String tName, String gCol, String sCol, String pCol, String oCol)
{
super(tName, gCol, sCol, pCol, oCol) ;
- _tableName = tName ;
_graphCol = gCol ;
_subjectCol = sCol ;
_predicateCol = pCol ;
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/hash/FmtLayout2HashHSQL.java b/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/hash/FmtLayout2HashHSQL.java
index ea6ea88f540..189703263c6 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/hash/FmtLayout2HashHSQL.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/hash/FmtLayout2HashHSQL.java
@@ -34,8 +34,6 @@
public class FmtLayout2HashHSQL extends FmtLayout2
{
static private Logger log = LoggerFactory.getLogger(FmtLayout2HashHSQL.class) ;
- private MySQLEngineType engineType ;
-
public FmtLayout2HashHSQL(SDBConnection connection)
{
super(connection) ;
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/shared/Env.java b/jena-sdb/src/main/java/org/apache/jena/sdb/shared/Env.java
index 636d51b287b..f3c3ef3498b 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/shared/Env.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/shared/Env.java
@@ -27,7 +27,6 @@
public class Env
{
private static Logger log = LoggerFactory.getLogger(Env.class) ;
- private static final String SDBROOT = "SDBROOT" ;
public static String sysBase = null ;
private static FileManager fileManager = null ;
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/store/StoreConfig.java b/jena-sdb/src/main/java/org/apache/jena/sdb/store/StoreConfig.java
index 21a91e8ae6d..5caa9228883 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/store/StoreConfig.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/store/StoreConfig.java
@@ -177,8 +177,6 @@ class TaggedString extends SDBConnectionHolder
static final String columnName = "tag" ;
static final String columnData = "data" ;
- private boolean initialized = false ;
-
TaggedString(SDBConnection sdb) { super(sdb) ; }
void reset()
diff --git a/jena-sdb/src/main/java/sdb/cmd/ModGraph.java b/jena-sdb/src/main/java/sdb/cmd/ModGraph.java
index c8fde6e20f8..bdb3d20e047 100644
--- a/jena-sdb/src/main/java/sdb/cmd/ModGraph.java
+++ b/jena-sdb/src/main/java/sdb/cmd/ModGraph.java
@@ -32,7 +32,6 @@ public class ModGraph extends ModBase
private static ArgDecl argDeclGraphName = new ArgDecl(true, "graph") ;
private static ArgDecl argDeclGraphDeafult = new ArgDecl(false, "default") ;
- private Graph graph = null ;
private String graphName = null ;
public ModGraph() {}
diff --git a/jena-sdb/src/main/java/sdb/sdbdelete.java b/jena-sdb/src/main/java/sdb/sdbdelete.java
index 0ffa3446ccd..9c6e023575f 100644
--- a/jena-sdb/src/main/java/sdb/sdbdelete.java
+++ b/jena-sdb/src/main/java/sdb/sdbdelete.java
@@ -40,8 +40,6 @@
public class sdbdelete extends CmdArgsDB
{
- private static final String usage = "sdbdelete --sdb default | ..." ;
-
private static ArgDecl argDeclConfirm = new ArgDecl(false, "confirm", "force") ;
public static void main(String... argv)
diff --git a/jena-sdb/src/main/java/sdb/sdbload.java b/jena-sdb/src/main/java/sdb/sdbload.java
index 8274cb81d49..fdb0a9f9c84 100644
--- a/jena-sdb/src/main/java/sdb/sdbload.java
+++ b/jena-sdb/src/main/java/sdb/sdbload.java
@@ -47,8 +47,6 @@
public class sdbload extends CmdArgsDB
{
- private static final String usage = "sdbload --sdb [--graph=IRI] file" ;
-
private static ModGraph modGraph = new ModGraph() ;
private static ArgDecl argDeclTruncate = new ArgDecl(false, "truncate") ;
private static ArgDecl argDeclReplace = new ArgDecl(false, "replace") ;
diff --git a/jena-sdb/src/main/java/sdb/sdbtruncate.java b/jena-sdb/src/main/java/sdb/sdbtruncate.java
index 53be4f55047..12168f72d2e 100644
--- a/jena-sdb/src/main/java/sdb/sdbtruncate.java
+++ b/jena-sdb/src/main/java/sdb/sdbtruncate.java
@@ -40,8 +40,6 @@ public static void main (String... argv)
new sdbtruncate(argv).mainRun() ;
}
- private String dbToZap = null ;
-
protected sdbtruncate(String... args)
{
super(args);
diff --git a/jena-spatial/src/main/java/org/apache/jena/query/spatial/SpatialDocProducerTriples.java b/jena-spatial/src/main/java/org/apache/jena/query/spatial/SpatialDocProducerTriples.java
index e3f0b738063..44f3e20dc81 100644
--- a/jena-spatial/src/main/java/org/apache/jena/query/spatial/SpatialDocProducerTriples.java
+++ b/jena-spatial/src/main/java/org/apache/jena/query/spatial/SpatialDocProducerTriples.java
@@ -28,8 +28,6 @@ public class SpatialDocProducerTriples implements SpatialDocProducer {
.getLogger(SpatialDocProducerTriples.class);
// private final EntityDefinition defn;
private final SpatialIndex indexer;
- private boolean started = false;
-
private SpatialIndexContext context = null;
public SpatialDocProducerTriples(SpatialIndex indexer) {
@@ -40,7 +38,6 @@ public SpatialDocProducerTriples(SpatialIndex indexer) {
@Override
public void start() {
indexer.startIndexing();
- started = true;
}
@Override
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/TDBLoader.java b/jena-tdb/src/main/java/org/apache/jena/tdb/TDBLoader.java
index a729db46cfb..9581f631d1e 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/TDBLoader.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/TDBLoader.java
@@ -146,7 +146,6 @@ public static void loadModel(Model model, List urls, boolean showProgres
private boolean showProgress = true ;
private boolean generateStats = true ;
- private Logger loaderLog = TDB.logLoader ;
private boolean checking ;
// XXX Context control block
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockMgrTracker.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockMgrTracker.java
index c61120e0280..d667ada1a1d 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockMgrTracker.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/block/BlockMgrTracker.java
@@ -61,7 +61,6 @@ private void clearInternalRW()
}
private int inRead = 0 ;
- private int inIterator = 0 ;
private boolean inUpdate = false ;
private final Logger log ;
private final String label ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/BlockAccessMapped.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/BlockAccessMapped.java
index 10d7a7461e3..e6b99fd783a 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/BlockAccessMapped.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/BlockAccessMapped.java
@@ -55,8 +55,6 @@ private enum CopyContents { Overwrite, NoCopy }
private int initialNumSegements = 1 ;
private MappedByteBuffer[] segments = new MappedByteBuffer[initialNumSegements] ;
- // Unflushed segments.
- private int segmentDirtyCount = 0 ;
private boolean[] segmentDirty = new boolean[initialNumSegements] ;
public BlockAccessMapped(String filename, int blockSize)
@@ -69,8 +67,6 @@ public BlockAccessMapped(String filename, int blockSize)
for ( int i = 0 ; i < initialNumSegements ; i++ )
// Not strictly necessary - default value is false.
segmentDirty[i] = false ;
- segmentDirtyCount = 0 ;
-
if ( getLog().isDebugEnabled() )
getLog().debug(format("Segment:%d BlockSize=%d blocksPerSegment=%d", SegmentSize, blockSize, blocksPerSegment)) ;
}
@@ -247,7 +243,6 @@ private synchronized void flushDirtySegments()
// Can we "flush" them all at once?
segments[i].force() ;
segmentDirty[i] = false ;
- segmentDirtyCount-- ;
}
}
}
@@ -261,7 +256,6 @@ protected void _close()
// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4724038
Arrays.fill(segments, null) ;
Arrays.fill(segmentDirty, false) ;
- segmentDirtyCount = 0 ;
}
@Override
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/BufferChannelMem.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/BufferChannelMem.java
index 52123740efc..deeb535549c 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/BufferChannelMem.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/BufferChannelMem.java
@@ -30,7 +30,6 @@ public class BufferChannelMem implements BufferChannel {
// The "file pointer" is the position of this buffer.
private ByteBuffer bytes ;
private String name ;
- private static int INIT_SIZE = 1024 ;
private static int INC_SIZE = 1024 ;
private final boolean TRACKING ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/MetaFile.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/MetaFile.java
index 4062f0163a0..59a55e22efb 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/MetaFile.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/file/MetaFile.java
@@ -48,8 +48,6 @@ public class MetaFile implements Sync, Closeable
private Properties properties = null ;
private String label = null ;
private boolean changed = false ;
- private boolean closed = false ;
-
/** Create a MetaFile
*
* @param label Convenience label.
@@ -349,7 +347,6 @@ public void dump(PrintStream output)
public void close()
{
flush() ;
- closed = true ;
metaFilename = null ;
properties = null ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/base/recordbuffer/RecordRangeIterator.java b/jena-tdb/src/main/java/org/apache/jena/tdb/base/recordbuffer/RecordRangeIterator.java
index cdbc3908874..b7dd45d3d7c 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/base/recordbuffer/RecordRangeIterator.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/base/recordbuffer/RecordRangeIterator.java
@@ -49,8 +49,6 @@ public static Iterator iterator(int pageId, Record fromRec, Record toRec
private final RecordBufferPageMgr pageMgr ;
private final Record maxRec ;
- private final Record minRec ;
-
private long countRecords = 0 ;
private long countBlocks = 0 ;
@@ -58,7 +56,6 @@ private RecordRangeIterator(int id, Record fromRec, Record toRec, RecordBufferPa
{
currentIdx = 0 ;
this.pageMgr = pageMgr;
- this.minRec = fromRec ;
this.maxRec = toRec ;
if ( toRec != null && fromRec != null && Record.keyLE(toRec, fromRec) )
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeNode.java b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeNode.java
index 4266bd9cefa..adeef7f2756 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeNode.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPTreeNode.java
@@ -48,8 +48,6 @@ public final class BPTreeNode extends BPTreePage
private Block block ;
private int id ;
- private short blockState = READ ;
-
int parent ;
int count ; // Number of records. Number of pointers is +1
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTreeRewriter.java b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTreeRewriter.java
index 3f29ae3f695..97ede465983 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTreeRewriter.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/index/bplustree/BPlusTreeRewriter.java
@@ -177,7 +177,6 @@ private static Iterator> writePackedDataBlocks(Iterator> iter, BPlusTree bpt)
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/lib/NodeLib.java b/jena-tdb/src/main/java/org/apache/jena/tdb/lib/NodeLib.java
index e9cf3e9a0a1..0ab1d5f92e8 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/lib/NodeLib.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/lib/NodeLib.java
@@ -52,8 +52,6 @@ public class NodeLib
// Characters in IRIs that are illegal and cause SSE problems, but we wish to keep.
final private static char MarkerChar = '_' ;
- final private static char[] invalidIRIChars = { MarkerChar , ' ' } ;
-
public static long encodeStore(Node node, ObjectFile file)
{
// Buffer pool?
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/setup/Build.java b/jena-tdb/src/main/java/org/apache/jena/tdb/setup/Build.java
index b9b852345bd..bcd8ff272b8 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/setup/Build.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/setup/Build.java
@@ -32,7 +32,6 @@
*/
public class Build
{
- private static boolean VERBOSE = true ;
private static Logger log = LoggerFactory.getLogger(Build.class) ;
private static StoreParams params = StoreParams.getDftStoreParams() ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/setup/DatasetBuilderStd.java b/jena-tdb/src/main/java/org/apache/jena/tdb/setup/DatasetBuilderStd.java
index cbc90534ef5..f259fbcd881 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/setup/DatasetBuilderStd.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/setup/DatasetBuilderStd.java
@@ -192,8 +192,6 @@ public DatasetGraphTDB build(Location location, StoreParams params) {
}
}
- private static String DB_CONFIG_FILE = "tdb.cfg" ;
-
// Main engine for building.
// Called by DatasetBuilderTxn
// XXX Rework - provide a cloning constructor (copies maps).
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageMatchTuple.java b/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageMatchTuple.java
index 0fcf9b9923a..4a3a923ed6a 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageMatchTuple.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/solver/StageMatchTuple.java
@@ -38,7 +38,6 @@ public class StageMatchTuple extends RepeatApplyIterator
private final NodeTupleTable nodeTupleTable ;
private final Tuple patternTuple ;
- private final ExecutionContext execCxt ;
private boolean anyGraphs ;
private Predicate> filter ;
@@ -51,7 +50,6 @@ public StageMatchTuple(NodeTupleTable nodeTupleTable, Iterator in
this.filter = filter ;
this.nodeTupleTable = nodeTupleTable ;
this.patternTuple = tuple ;
- this.execCxt = execCxt ;
this.anyGraphs = anyGraphs ;
}
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/BulkLoader.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/BulkLoader.java
index 04b41082066..67f3f576bf2 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/BulkLoader.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/BulkLoader.java
@@ -182,8 +182,6 @@ private static final class DestinationDSG implements BulkStreamRDF {
final private LoadMonitor monitor2 ;
final private LoaderNodeTupleTable loaderTriples ;
final private LoaderNodeTupleTable loaderQuads ;
- final private boolean showProgress ;
- private long count = 0 ;
private StatsCollector stats = null ;
private final boolean collectStats ;
@@ -195,7 +193,6 @@ private static final class DestinationDSG implements BulkStreamRDF {
loaderTriples = new LoaderNodeTupleTable(dsg.getTripleTable().getNodeTupleTable(), "triples", monitor1) ;
loaderQuads = new LoaderNodeTupleTable(dsg.getQuadTable().getNodeTupleTable(), "quads", monitor2) ;
- this.showProgress = showProgress ;
this.collectStats = collectStats ;
}
@@ -235,7 +232,6 @@ private void process(Node g, Node s, Node p, Node o) {
loaderTriples.load(s, p, o) ;
else
loaderQuads.load(g, s, p, o) ;
- count++ ;
if ( stats != null )
stats.record(g, s, p, o) ;
}
@@ -282,7 +278,6 @@ private static final class DestinationGraph implements BulkStreamRDF {
final private LoadMonitor monitor ;
final private LoaderNodeTupleTable loaderTriples ;
final private boolean startedEmpty ;
- private long count = 0 ;
private StatsCollector stats = null ;
private final boolean collectStats ;
@@ -321,7 +316,6 @@ final public void triple(Triple triple) {
loaderTriples.load(s, p, o) ;
if ( stats != null )
stats.record(null, s, p, o) ;
- count++ ;
}
@Override
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoadMonitor.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoadMonitor.java
index 1183170d508..f72a2eb79c3 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoadMonitor.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoadMonitor.java
@@ -62,8 +62,6 @@ public final class LoadMonitor
private long lastTime = 0 ;
private long currentStartTime = 0 ; // Used for each index
private long currentFinishTime = 0 ;
- private long elapsedLastTime = 0 ;
-
private String itemsName ;
public LoadMonitor(DatasetGraph dsg, Logger log, String itemsName,
@@ -110,7 +108,6 @@ public void startDataPhase()
print("-- Start %s data phase", itemsName) ;
dataStartTime = timer.readTimer() ;
currentStartTime = dataStartTime ;
- elapsedLastTime = dataStartTime ;
currentItems = 0 ;
totalDataItems = 0 ;
EventManager.send(dataset, new Event(BulkLoader.evStartDataBulkload, null)) ;
@@ -191,7 +188,6 @@ public void startIndex(String label)
indexLabel = label ;
currentItems = 0 ;
totalIndexItems = 0 ;
- elapsedLastTime = currentStartTime ;
lastTime = 0 ;
}
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/CmdNodeTableBuilder.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/CmdNodeTableBuilder.java
index 5cc0d0ec5bf..68e85a40290 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/CmdNodeTableBuilder.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/CmdNodeTableBuilder.java
@@ -185,7 +185,6 @@ protected void exec()
static class NodeTableBuilder implements BulkStreamRDF
{
- private DatasetGraphTDB dsg ;
private NodeTable nodeTable ;
private WriteRows writerTriples ;
private WriteRows writerQuads ;
@@ -194,7 +193,6 @@ static class NodeTableBuilder implements BulkStreamRDF
NodeTableBuilder(DatasetGraphTDB dsg, ProgressLogger monitor, OutputStream outputTriples, OutputStream outputQuads, boolean collectStats)
{
- this.dsg = dsg ;
this.monitor = monitor ;
NodeTupleTable ntt = dsg.getTripleTable().getNodeTupleTable() ;
this.nodeTable = ntt.getNodeTable() ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/RecordsFromInput.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/RecordsFromInput.java
index 10fa85cfcbc..a2a644d59e5 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/RecordsFromInput.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/RecordsFromInput.java
@@ -41,7 +41,6 @@ public class RecordsFromInput implements Iterator
private int len = -1 ;
private int idx ; // Where in buffer.
private final int rowLength ;
- private final int rowBlockSize ;
private final RecordFactory recordFactory ;
private final int itemsPerRow ;
private final ColumnMap colMap ;
@@ -52,7 +51,6 @@ public RecordsFromInput(InputStream input, int itemsPerRow, ColumnMap colMap, in
this.itemsPerRow = itemsPerRow ;
this.colMap = colMap ;
this.rowLength = itemsPerRow*16 + itemsPerRow ; // Length in bytes of a row.
- this.rowBlockSize = rowBlockSize ;
this.buffer = new byte[rowLength*rowBlockSize] ;
this.idx = -1 ;
this.recordFactory = new RecordFactory(itemsPerRow*SystemTDB.SizeOfNodeId, 0) ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/WriteRows.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/WriteRows.java
index 7cb12d1dcf5..5bda14183b5 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/WriteRows.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader2/WriteRows.java
@@ -29,7 +29,6 @@ public class WriteRows
{
private OutputStream output ;
boolean atStartOfRow = true ;
- private int itemsPerRow ;
private int rowBlock ;
private byte[] b ;
private int idx ;
@@ -39,7 +38,6 @@ public class WriteRows
WriteRows (OutputStream output, int itemsPerRow, int rowBlock)
{
this.output = output ;
- this.itemsPerRow = itemsPerRow ;
this.rowLength = 16*itemsPerRow + itemsPerRow ;
this.rowBlock = rowBlock ;
this.b = new byte[rowLength*rowBlock] ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/sys/DatasetControlMRSW.java b/jena-tdb/src/main/java/org/apache/jena/tdb/sys/DatasetControlMRSW.java
index 2346ff1745d..6f365f9fc0f 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/sys/DatasetControlMRSW.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/sys/DatasetControlMRSW.java
@@ -31,7 +31,6 @@
/** A policy that checks, but does not enforce, single writer or multiple writer locking policy */
public class DatasetControlMRSW implements DatasetControl
{
- private final boolean concurrencyChecking = true ;
private final AtomicLong epoch = new AtomicLong(5) ; // Update counters, used to check iterators. No need to start at 0.
private final AtomicLong readCounter = new AtomicLong(0) ;
private final AtomicLong writeCounter = new AtomicLong(0) ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/DatasetBuilderTxn.java b/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/DatasetBuilderTxn.java
index 1a052f4805a..7a6e25ffd4d 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/DatasetBuilderTxn.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/DatasetBuilderTxn.java
@@ -48,14 +48,12 @@ public class DatasetBuilderTxn
{
// Ideally, don't make a DatasetGraphTDB to pass to new DatasetGraphTxn as it rips it apart.
- // Context for the build.
- private TransactionManager txnMgr ;
private Map blockMgrs ;
private Map nodeTables ;
private Transaction txn ;
private DatasetGraphTDB dsg ;
- public DatasetBuilderTxn(TransactionManager txnMgr) { this.txnMgr = txnMgr ; }
+ public DatasetBuilderTxn(TransactionManager txnMgr) { }
public DatasetGraphTxn build(Transaction transaction, ReadWrite mode, DatasetGraphTDB dsg) {
this.blockMgrs = dsg.getConfig().blockMgrs ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/Journal.java b/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/Journal.java
index dd497033e86..4d08c2b1a11 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/Journal.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/Journal.java
@@ -249,7 +249,6 @@ private JournalEntry _read()
/** Iterator of entries from current point in Journal, going forward. Must be JournalEntry aligned at start. */
private class IteratorEntries extends IteratorSlotted
{
- JournalEntry slot = null ;
final long endPoint ;
long iterPosn ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/Transaction.java b/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/Transaction.java
index b0b656fc18f..f717172139e 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/Transaction.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/Transaction.java
@@ -48,8 +48,6 @@ public class Transaction
// How this transaction ended.
enum TxnOutcome { UNFINISHED, W_ABORTED, W_COMMITED, R_CLOSED, R_ABORTED, R_COMMITED }
- private TxnOutcome outcome ;
-
private boolean changesPending ;
public Transaction(DatasetGraphTDB dsg, ReadWrite mode, long id, String label, TransactionManager txnMgr) {
@@ -70,7 +68,6 @@ public Transaction(DatasetGraphTDB dsg, ReadWrite mode, long id, String label, T
activedsg = null ; // Don't know yet.
this.iterators = null ; //new ArrayList<>() ; // Debugging aid.
state = TxnState.ACTIVE ;
- outcome = TxnOutcome.UNFINISHED ;
changesPending = (mode == ReadWrite.WRITE) ;
}
@@ -98,8 +95,7 @@ public void commit() {
// Enacting is left to the TransactionManager.
switch(mode) {
case READ:
- outcome = TxnOutcome.R_COMMITED ;
- break ;
+ break ;
case WRITE:
if ( state != TxnState.ACTIVE )
throw new TDBTransactionException("Transaction has already committed or aborted") ;
@@ -137,8 +133,7 @@ public void commit() {
SystemTDB.errlog.warn("Exception during 'commit' : transaction status not known (but not a partial commit): ",ex) ;
throw new TDBTransactionException("Exception at commit point", ex) ;
}
- outcome = TxnOutcome.W_COMMITED ;
- break ;
+ break ;
}
state = TxnState.COMMITED ;
@@ -177,8 +172,7 @@ public void abort() {
switch (mode) {
case READ :
state = TxnState.ABORTED ;
- outcome = TxnOutcome.R_ABORTED ;
- break ;
+ break ;
case WRITE :
if ( state != TxnState.ACTIVE )
throw new TDBTransactionException("Transaction has already committed or aborted") ;
@@ -199,8 +193,7 @@ public void abort() {
throw new TDBTransactionException("Exception during abort - transaction did abort", ex) ;
}
state = TxnState.ABORTED ;
- outcome = TxnOutcome.W_ABORTED ;
- // [TxTDB:TODO]
+ // [TxTDB:TODO]
// journal.truncate to last commit
// Not need currently as the journal is only written in
// prepare.
@@ -232,7 +225,6 @@ public void close() {
case ACTIVE :
if ( mode == ReadWrite.READ ) {
commit() ;
- outcome = TxnOutcome.R_CLOSED ;
} else {
SystemTDB.errlog.warn("Transaction not commited or aborted: " + this) ;
abort() ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/TransactionManager.java b/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/TransactionManager.java
index b5770d9dd96..e164e6f3772 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/TransactionManager.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/transaction/TransactionManager.java
@@ -116,8 +116,6 @@ private void record(Transaction txn, TxnPoint state)
// Delayes enacting transactions.
private BlockingQueue queue = new LinkedBlockingDeque<>() ;
- private Thread committerThread ; // Later
-
private DatasetGraphTDB baseDataset ;
private Journal journal ;
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_TransSystemMultiDatasets.java b/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_TransSystemMultiDatasets.java
index c668a59457d..c543c6fd163 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_TransSystemMultiDatasets.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/extra/T_TransSystemMultiDatasets.java
@@ -397,7 +397,6 @@ public static void beforeClass()
@AfterClass
public static void afterClass() {}
- private StoreConnection sConn ;
private static Random random = new Random(System.currentTimeMillis()) ;
protected synchronized StoreConnection getStoreConnection()
@@ -545,8 +544,6 @@ private static void printf(String string, Object...args)
static Quad q4 = SSE.parseQuad("(_ )") ;
- private static int initCount = -1 ;
-
//static final Location LOC = Location.create(ConfigTest.getTestingDirDB()) ;
static final AtomicInteger gen = new AtomicInteger() ;
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/store/nodetable/TestCodec.java b/jena-tdb/src/test/java/org/apache/jena/tdb/store/nodetable/TestCodec.java
index d4c2dd812f1..90d2ee71615 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/store/nodetable/TestCodec.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/store/nodetable/TestCodec.java
@@ -37,7 +37,6 @@
@RunWith(Parameterized.class)
public class TestCodec extends BaseTest
{
- static private final String asciiBase = "abc" ;
static private final String latinBase = "Àéíÿ" ;
static private final String latinExtraBase = "ỹfifl" ; // fi-ligature, fl-ligature
static private final String greekBase = "αβγ" ;
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/transaction/AbstractTestTransSeq.java b/jena-tdb/src/test/java/org/apache/jena/tdb/transaction/AbstractTestTransSeq.java
index b73d1b3d75d..e3bd01a0940 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/transaction/AbstractTestTransSeq.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/transaction/AbstractTestTransSeq.java
@@ -49,8 +49,6 @@ public abstract class AbstractTestTransSeq extends BaseTest
Quad q3 = SSE.parseQuad("( '3-"+x+"')") ;
Quad q4 = SSE.parseQuad("( '4-"+x+"')") ;
- private StoreConnection sConn ;
-
protected abstract StoreConnection getStoreConnection() ;
// Basics.
From 82aade301dd764fd73f0ea9a94c9f73857f88a32 Mon Sep 17 00:00:00 2001
From: ajs6f
Date: Thu, 7 May 2015 22:56:39 -0400
Subject: [PATCH 6/7] More unused fields
---
.../org/apache/jena/atlas/web/AcceptList.java | 47 -------------------
.../apache/jena/riot/RDFParserRegistry.java | 3 --
.../apache/jena/riot/lang/LangNTriples.java | 4 --
.../org/apache/jena/riot/lang/ReaderTriX.java | 3 --
.../resultset/ResultSetReaderRegistry.java | 22 ---------
.../resultset/ResultSetWriterRegistry.java | 6 ---
.../apache/jena/riot/writer/WriterTriX.java | 3 --
.../apache/jena/sparql/algebra/OpAsQuery.java | 3 +-
.../iterator/QueryIterBlockTriples.java | 4 +-
.../optimizer/reorder/ReorderFixedAlt.java | 7 ---
.../sparql/expr/nodevalue/NodeFunctions.java | 2 -
.../jena/sparql/expr/nodevalue/XSDFuncOp.java | 1 -
.../apache/jena/sparql/mgt/ContextMBean.java | 8 ++--
.../apache/jena/sparql/mgt/SystemInfo.java | 3 +-
.../jena/sparql/path/eval/PathEngine.java | 2 -
.../jena/sparql/util/NodeFactoryExtra.java | 2 -
.../apache/jena/riot/TestJenaReaderRIOT.java | 3 --
.../org/apache/jena/riot/TestReadData.java | 3 --
.../riot/langsuite/UnitTestBadSyntax.java | 26 ----------
.../sparql/junit/ScriptTestSuiteFactory.java | 2 -
.../graph/QueryIterPropertyTable.java | 4 +-
.../jena/fuseki/server/SPARQLServer.java | 2 -
.../jena/fuseki/servlets/SPARQL_Upload.java | 5 --
.../jena/fuseki/build/FusekiConfig.java | 14 +-----
.../jena/fuseki/mgt/ActionAsyncTask.java | 3 --
.../jena/fuseki/server/DataService.java | 1 -
.../org/apache/jena/iri/impl/LexerPort.java | 7 +--
.../org/apache/jena/iri/impl/LexerQuery.java | 7 +--
.../org/apache/jena/iri/impl/LexerScheme.java | 7 +--
.../apache/jena/iri/impl/LexerUserinfo.java | 7 +--
.../org/apache/jena/iri/impl/LexerXHost.java | 7 +--
.../jena/sdb/layout1/TupleLoaderSimple.java | 7 +--
.../sdb/layout2/expr/StringExprCompiler.java | 16 -------
.../layout2/index/TupleLoaderIndexOracle.java | 4 --
jena-sdb/src/main/java/sdb/cmd/ModData.java | 7 +--
jena-sdb/src/main/java/sdb/cmd/ModGraph.java | 2 -
jena-sdb/src/main/java/sdb/sdbtuple.java | 2 -
.../jena/query/spatial/SpatialIndexSolr.java | 22 +--------
.../spatial/pfunction/library/WestPF.java | 8 ----
.../java/org/apache/jena/tdb/lib/NodeLib.java | 2 -
.../bulkloader/LoaderNodeTupleTable.java | 8 ----
.../jena/tdb/store/tupletable/TupleTable.java | 4 --
.../org/apache/jena/tdb/sys/TDBMaker.java | 25 ----------
.../index/bplustree/TestBPTreeRecords.java | 3 +-
.../assembler/TestTextIndexSolrAssembler.java | 10 ++--
45 files changed, 28 insertions(+), 310 deletions(-)
diff --git a/jena-arq/src/main/java/org/apache/jena/atlas/web/AcceptList.java b/jena-arq/src/main/java/org/apache/jena/atlas/web/AcceptList.java
index 7638a8a709d..312b9825c66 100644
--- a/jena-arq/src/main/java/org/apache/jena/atlas/web/AcceptList.java
+++ b/jena-arq/src/main/java/org/apache/jena/atlas/web/AcceptList.java
@@ -99,8 +99,6 @@ private List entries()
return Collections.unmodifiableList(ranges) ;
}
- private final static MediaRangeCompare comparator = new MediaRangeCompare() ;
-
/** Find and return a match for a specific MediaType.
* Returns the Accept header entry best matched or null.
*/
@@ -219,49 +217,4 @@ private static List stringToAcceptList(String s)
}
return ranges ;
}
-
- private static class MediaRangeCompare implements Comparator
- {
- @Override
- public int compare(MediaRange mType1, MediaRange mType2)
- {
- int r = Double.compare(mType1.get_q(), mType2.get_q()) ;
-
- if ( r == 0 )
- r = subCompare(mType1.getType(), mType2.getType()) ;
-
- if ( r == 0 )
- r = subCompare(mType1.getSubType(), mType2.getSubType()) ;
-
-// if ( r == 0 )
-// {
-// // This reverses the input order so that the rightmost elements is the
-// // greatest and hence is the first mentioned in the accept range.
-//
-// if ( mType1.posn < mType2.posn )
-// r = +1 ;
-// if ( mType1.posn > mType2.posn )
-// r = -1 ;
-// }
-
- // The most significant sorts to the first in a list.
- r = -r ;
- return r ;
- }
-
- public int subCompare(String a, String b)
- {
- if ( a == null )
- return 1 ;
- if ( b == null )
- return -1 ;
- if ( a.equals("*") && b.equals("*") )
- return 0 ;
- if ( a.equals("*") )
- return -1 ;
- if ( b.equals("*") )
- return 1 ;
- return 0 ;
- }
- }
}
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/RDFParserRegistry.java b/jena-arq/src/main/java/org/apache/jena/riot/RDFParserRegistry.java
index 9ba05c8c2de..1cd4e92c442 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/RDFParserRegistry.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/RDFParserRegistry.java
@@ -48,9 +48,6 @@
public class RDFParserRegistry
{
- /** Map Jena I/O names to language */
- private static Map mapJenaNameToLang = DS.map() ;
-
/** map language to a parser factory */
private static Map langToParserFactory = DS.map() ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTriples.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTriples.java
index 374bf07c6ad..eb654b64f90 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTriples.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/LangNTriples.java
@@ -27,8 +27,6 @@
import org.apache.jena.riot.tokens.Token ;
import org.apache.jena.riot.tokens.TokenType ;
import org.apache.jena.riot.tokens.Tokenizer ;
-import org.slf4j.Logger ;
-import org.slf4j.LoggerFactory ;
/**
* N-Triples.
@@ -37,8 +35,6 @@
*/
public final class LangNTriples extends LangNTuple
{
- private static Logger messageLog = LoggerFactory.getLogger("N-Triples") ;
-
public LangNTriples(Tokenizer tokens,
ParserProfile profile,
StreamRDF dest)
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java b/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java
index 8e1e02ff1e7..7647df9879e 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/lang/ReaderTriX.java
@@ -35,7 +35,6 @@
import org.apache.jena.atlas.web.ContentType ;
import org.apache.jena.datatypes.RDFDatatype ;
-import org.apache.jena.datatypes.xsd.XSDDatatype ;
import org.apache.jena.datatypes.xsd.impl.XMLLiteralType ;
import org.apache.jena.graph.Node ;
import org.apache.jena.graph.NodeFactory ;
@@ -48,7 +47,6 @@
import org.apache.jena.sparql.core.Quad ;
import org.apache.jena.sparql.resultset.ResultSetException ;
import org.apache.jena.sparql.util.Context ;
-import org.apache.jena.vocabulary.RDF ;
/** Read TriX.
* See {@link TriX} for details.
@@ -98,7 +96,6 @@ public void read(Reader reader, String baseURI, ContentType ct, StreamRDF output
read(xReader, baseURI, output) ;
}
- private static String nsRDF = RDF.getURI() ;
private static String nsXML0 = "http://www.w3.org/XML/1998/namespace" ;
private static String rdfXMLLiteral = XMLLiteralType.theXMLLiteralType.getURI() ;
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/resultset/ResultSetReaderRegistry.java b/jena-arq/src/main/java/org/apache/jena/riot/resultset/ResultSetReaderRegistry.java
index d2071e50ee1..559f084c22a 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/resultset/ResultSetReaderRegistry.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/resultset/ResultSetReaderRegistry.java
@@ -87,23 +87,6 @@ public ResultSetReader create(Lang lang) {
}
}
- private static class ResultSetReaderThriftFactory implements ResultSetReaderFactory {
- @Override
- public ResultSetReader create(Lang lang) {
- return new ResultSetReader() {
- @Override
- public ResultSet read(InputStream in, Context context) {
- return BinRDF.readResultSet(in) ;
- }
- @Override
- public ResultSet read(Reader in, Context context) {
- throw new NotImplemented("Reading binary data from a java.io.Reader is not possible") ;
- }} ;
- }
- }
- // These all call static methods, so have no state and so don't
- // need to be created for each read operation.
-
private static ResultSetReader readerXML = new ResultSetReader() {
@Override public ResultSet read(InputStream in, Context context) { return XMLInput.fromXML(in); }
@Override public ResultSet read(Reader in, Context context) { return XMLInput.fromXML(in); }
@@ -130,11 +113,6 @@ public ResultSet read(Reader in, Context context) {
throw new NotImplemented("Reading binary data from a java.io.Reader is not possible") ;
}
} ;
-
- private static ResultSetReader readerNo = new ResultSetReader() {
- @Override public ResultSet read(InputStream in, Context context) { return null ; }
- @Override public ResultSet read(Reader in, Context context) { return null ; }
- } ;
}
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/resultset/ResultSetWriterRegistry.java b/jena-arq/src/main/java/org/apache/jena/riot/resultset/ResultSetWriterRegistry.java
index ff9ba3cab27..8170c05fb92 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/resultset/ResultSetWriterRegistry.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/resultset/ResultSetWriterRegistry.java
@@ -130,12 +130,6 @@ public static void init() {
}
} ;
- private static ResultSetWriter writerNo = new ResultSetWriter() {
- @Override public void write(OutputStream out, ResultSet resultSet, Context context) {}
- @Override public void write(Writer out, ResultSet resultSet, Context context) {}
- @Override public void write(OutputStream out, boolean result, Context context) {}
- } ;
-
private static ResultSetWriter writerText = new ResultSetWriter() {
@Override public void write(OutputStream out, ResultSet resultSet, Context context) {
// Prefix mapp
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/writer/WriterTriX.java b/jena-arq/src/main/java/org/apache/jena/riot/writer/WriterTriX.java
index 94a4b439aed..1af4da288c1 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/writer/WriterTriX.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/writer/WriterTriX.java
@@ -22,7 +22,6 @@
import java.io.Writer ;
import org.apache.jena.atlas.io.IndentedWriter ;
-import org.apache.jena.datatypes.xsd.impl.XMLLiteralType ;
import org.apache.jena.graph.Graph ;
import org.apache.jena.riot.Lang ;
import org.apache.jena.riot.WriterDatasetRIOT ;
@@ -43,8 +42,6 @@
* @see StreamWriterTriX
*/
public class WriterTriX implements WriterDatasetRIOT, WriterGraphRIOT {
- private static String rdfXMLLiteral = XMLLiteralType.theXMLLiteralType.getURI() ;
-
// Common pattern.
@Override
public Lang getLang() {
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpAsQuery.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpAsQuery.java
index 4510a0569ae..87f1a77b3c7 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpAsQuery.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/OpAsQuery.java
@@ -66,7 +66,6 @@ public static class Converter implements OpVisitor
{
private Query query ;
private Op op ;
- private Element element = null ;
private ElementGroup currentGroup = null ;
private Deque stack = new ArrayDeque<>() ;
private Collection projectVars = allocProjectVars();
@@ -380,7 +379,7 @@ public void visit(OpFilter opFilter)
Element e = asElement(opFilter.getSubOp()) ;
if ( currentGroup() != e )
currentGroup().addElement(e) ;
- element = currentGroup() ; // Was cleared by asElement.
+ currentGroup();
ExprList exprs = opFilter.getExprs() ;
for ( Expr expr : exprs )
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterBlockTriples.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterBlockTriples.java
index a0f2a9606d6..8cc4a75abc7 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterBlockTriples.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterBlockTriples.java
@@ -21,7 +21,6 @@
import org.apache.jena.atlas.io.IndentedWriter ;
import org.apache.jena.atlas.lib.Lib ;
-import org.apache.jena.graph.Graph ;
import org.apache.jena.graph.Triple ;
import org.apache.jena.sparql.core.BasicPattern ;
import org.apache.jena.sparql.engine.ExecutionContext ;
@@ -33,7 +32,6 @@
public class QueryIterBlockTriples extends QueryIter1
{
private BasicPattern pattern ;
- private Graph graph ;
private QueryIterator output ;
public static QueryIterator create(QueryIterator input,
@@ -49,7 +47,7 @@ private QueryIterBlockTriples(QueryIterator input,
{
super(input, execContext) ;
this.pattern = pattern ;
- graph = execContext.getActiveGraph() ;
+ execContext.getActiveGraph();
// Create a chain of triple iterators.
QueryIterator chain = getInput() ;
for (Triple triple : pattern)
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/optimizer/reorder/ReorderFixedAlt.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/optimizer/reorder/ReorderFixedAlt.java
index f1fcb7c557a..80caf1408be 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/optimizer/reorder/ReorderFixedAlt.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/optimizer/reorder/ReorderFixedAlt.java
@@ -22,8 +22,6 @@
import static org.apache.jena.sparql.engine.optimizer.reorder.PatternElements.VAR ;
import org.apache.jena.sparql.engine.optimizer.Pattern ;
import org.apache.jena.sparql.engine.optimizer.StatsMatcher ;
-import org.apache.jena.sparql.graph.NodeConst ;
-import org.apache.jena.sparql.sse.Item ;
/**
* Alternative fixed reorder function. This corresponds to the algorithm prior
@@ -38,11 +36,6 @@ public class ReorderFixedAlt extends ReorderTransformationSubstitution
{
public ReorderFixedAlt() {}
- // Fixed scheme for when we have no stats.
- // It chooses a triple pattern by order of preference.
-
- private static Item type = Item.createNode(NodeConst.nodeRDFType) ;
-
/** The number of triples used for the base scale */
public static int MultiTermSampleSize = 100 ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/NodeFunctions.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/NodeFunctions.java
index 4df9aadb58b..17e85657aff 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/NodeFunctions.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/NodeFunctions.java
@@ -40,8 +40,6 @@
* Implementation of node-centric functions.
*/
public class NodeFunctions {
- private static final NodeValue xsdString = NodeValue.makeNode(XSD.xstring.asNode()) ;
-
// Helper functions
/**
* check and get a string (may be a simple literal, literal with language
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/XSDFuncOp.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/XSDFuncOp.java
index be687912ddb..5963b3f3cf2 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/XSDFuncOp.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/XSDFuncOp.java
@@ -1382,7 +1382,6 @@ private static NodeValue accessDuration(NodeValue nv, Field field) {
return NodeValue.makeInteger((BigInteger)x) ;
}
- private static Duration zeroDuration = NodeValue.xmlDatatypeFactory.newDuration(0) ;
private static Duration valueCanonicalDuration(NodeValue nv) {
// Unclear.
/* This semi-normalizes a duration value - the time part is normalized.
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/mgt/ContextMBean.java b/jena-arq/src/main/java/org/apache/jena/sparql/mgt/ContextMBean.java
index 9327daf5ad6..47b78a47a2f 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/mgt/ContextMBean.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/mgt/ContextMBean.java
@@ -36,7 +36,7 @@ public ContextMBean(Context context)
private Object getAsString(String name) { return context.getAsString(Symbol.create(name)) ; }
@Override
- public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException
+ public Object getAttribute(String attribute)
{
return getAsString(attribute) ;
}
@@ -95,15 +95,13 @@ public MBeanInfo getMBeanInfo()
}
@Override
- public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException,
- ReflectionException
+ public Object invoke(String actionName, Object[] params, String[] signature)
{
return null ;
}
@Override
- public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException,
- MBeanException, ReflectionException
+ public void setAttribute(Attribute attribute)
{
context.set(Symbol.create(attribute.getName()), attribute.getValue()) ;
}
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/mgt/SystemInfo.java b/jena-arq/src/main/java/org/apache/jena/sparql/mgt/SystemInfo.java
index 1c903292cc9..65875dcc84c 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/mgt/SystemInfo.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/mgt/SystemInfo.java
@@ -24,14 +24,13 @@
public class SystemInfo implements SystemInfoMBean {
private final String name ;
- private final Node iri ;
private final String jmxPath ;
private final String version ;
private final String buildDate ;
public SystemInfo(String name, String jmxPath, String version, String buildDate) {
this.name = name ;
- this.iri = createIRI(name) ;
+ createIRI(name);
this.jmxPath = jmxPath ;
this.version = version ;
this.buildDate = buildDate ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/path/eval/PathEngine.java b/jena-arq/src/main/java/org/apache/jena/sparql/path/eval/PathEngine.java
index 9df5c10e497..6aad6b35ce9 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/path/eval/PathEngine.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/path/eval/PathEngine.java
@@ -31,7 +31,6 @@
import org.apache.jena.sparql.engine.ExecutionContext ;
import org.apache.jena.sparql.engine.QueryIterator ;
import org.apache.jena.sparql.engine.binding.Binding ;
-import org.apache.jena.sparql.engine.binding.BindingFactory ;
import org.apache.jena.sparql.engine.iterator.QueryIterRoot ;
import org.apache.jena.sparql.path.P_NegPropSet ;
import org.apache.jena.sparql.path.Path ;
@@ -179,7 +178,6 @@ protected Iterator graphFind(Node s, Node p, Node o) {
return graphFind(graph, s, p, o, context) ;
}
- private static Binding binding = BindingFactory.binding() ;
private static Node RDFSmember = RDFS.Nodes.member ;
private static Node ListMember = ListPFunction.nListMember ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/util/NodeFactoryExtra.java b/jena-arq/src/main/java/org/apache/jena/sparql/util/NodeFactoryExtra.java
index ceef120a445..6edf692c4b9 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/util/NodeFactoryExtra.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/util/NodeFactoryExtra.java
@@ -55,8 +55,6 @@ public static Node parseNode(String nodeString)
return parseNode(nodeString, prefixMappingDefault) ;
}
- private static PrefixMap pmapEmpty = PrefixMapFactory.create() ;
-
/** Parse a string into a node.
*
* Allows surrounding white space.
diff --git a/jena-arq/src/test/java/org/apache/jena/riot/TestJenaReaderRIOT.java b/jena-arq/src/test/java/org/apache/jena/riot/TestJenaReaderRIOT.java
index fd8979270e5..633964a9d27 100644
--- a/jena-arq/src/test/java/org/apache/jena/riot/TestJenaReaderRIOT.java
+++ b/jena-arq/src/test/java/org/apache/jena/riot/TestJenaReaderRIOT.java
@@ -29,7 +29,6 @@
import org.apache.jena.rdf.model.ModelFactory ;
import org.apache.jena.rdf.model.Resource ;
import org.apache.jena.riot.adapters.RDFReaderFactoryRIOT ;
-import org.apache.jena.sparql.util.Context ;
import org.apache.jena.util.FileUtils ;
import org.junit.AfterClass ;
import org.junit.BeforeClass ;
@@ -41,8 +40,6 @@ public class TestJenaReaderRIOT extends BaseTest
{
private static final String directory = "testing/RIOT/Reader" ;
- private static Context context = new Context() ;
-
@BeforeClass static public void beforeClass()
{
RIOT.init() ;
diff --git a/jena-arq/src/test/java/org/apache/jena/riot/TestReadData.java b/jena-arq/src/test/java/org/apache/jena/riot/TestReadData.java
index 343dfe7ae98..932af9fc793 100644
--- a/jena-arq/src/test/java/org/apache/jena/riot/TestReadData.java
+++ b/jena-arq/src/test/java/org/apache/jena/riot/TestReadData.java
@@ -29,7 +29,6 @@
import org.apache.jena.riot.system.ErrorHandler ;
import org.apache.jena.riot.system.ErrorHandlerFactory ;
import org.apache.jena.sparql.core.DatasetGraph ;
-import org.apache.jena.sparql.util.Context ;
import org.junit.AfterClass ;
import org.junit.BeforeClass ;
import org.junit.Test ;
@@ -41,8 +40,6 @@ public class TestReadData extends BaseTest
{
private static final String directory = "testing/RIOT/Reader" ;
- private static Context context = new Context() ;
-
@BeforeClass static public void beforeClass()
{
RIOT.init() ;
diff --git a/jena-arq/src/test/java/org/apache/jena/riot/langsuite/UnitTestBadSyntax.java b/jena-arq/src/test/java/org/apache/jena/riot/langsuite/UnitTestBadSyntax.java
index adeab4e150e..04cdbd2e8ca 100644
--- a/jena-arq/src/test/java/org/apache/jena/riot/langsuite/UnitTestBadSyntax.java
+++ b/jena-arq/src/test/java/org/apache/jena/riot/langsuite/UnitTestBadSyntax.java
@@ -18,7 +18,6 @@
package org.apache.jena.riot.langsuite;
-import static org.apache.jena.riot.SysRIOT.fmtMessage ;
import org.apache.jena.atlas.legacy.BaseTest2 ;
import org.apache.jena.query.Dataset ;
import org.apache.jena.query.DatasetFactory ;
@@ -28,7 +27,6 @@
import org.apache.jena.riot.RDFDataMgr ;
import org.apache.jena.riot.RDFLanguages ;
import org.apache.jena.riot.RiotException ;
-import org.apache.jena.riot.system.ErrorHandler ;
import org.apache.jena.riot.system.ErrorHandlerFactory ;
import org.apache.jena.sparql.junit.EarlReport ;
@@ -44,30 +42,6 @@ protected UnitTestBadSyntax(String name, String testURI, String uri, Lang lang,
this.lang = lang ;
}
- /** An error handler that throw exceptions on warnings and errors */
- private static ErrorHandler errorHandlerTestStrict = new ErrorHandler()
- {
- /** report a warning - do not carry on */
- @Override
- public void warning(String message, long line, long col)
- {
- throw new RiotException(fmtMessage(message, line, col)) ;
- }
-
- /** report an error - do not carry on */
- @Override
- public void error(String message, long line, long col)
- {
- throw new RiotException(fmtMessage(message, line, col)) ;
- }
-
- @Override
- public void fatal(String message, long line, long col)
- {
- throw new RiotException(fmtMessage(message, line, col)) ;
- }
- } ;
-
@Override
protected void _setUp() { BaseTest2.setTestLogging(ErrorHandlerFactory.errorHandlerStrictNoLogging) ; }
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/junit/ScriptTestSuiteFactory.java b/jena-arq/src/test/java/org/apache/jena/sparql/junit/ScriptTestSuiteFactory.java
index a054fb75ddf..bbc4e2af805 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/junit/ScriptTestSuiteFactory.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/junit/ScriptTestSuiteFactory.java
@@ -28,14 +28,12 @@
import org.apache.jena.sparql.vocabulary.TestManifestUpdate_11 ;
import org.apache.jena.sparql.vocabulary.TestManifestX ;
import org.apache.jena.sparql.vocabulary.TestManifest_11 ;
-import org.apache.jena.util.FileManager ;
import org.apache.jena.util.junit.TestFactoryManifest ;
import org.apache.jena.util.junit.TestUtils ;
public class ScriptTestSuiteFactory extends TestFactoryManifest
{
- private FileManager fileManager = FileManager.get() ;
// Set (and retrieve) externally.
public static EarlReport results = null ;
diff --git a/jena-csv/src/main/java/org/apache/jena/propertytable/graph/QueryIterPropertyTable.java b/jena-csv/src/main/java/org/apache/jena/propertytable/graph/QueryIterPropertyTable.java
index 8ebfa726ca2..fac84b55beb 100644
--- a/jena-csv/src/main/java/org/apache/jena/propertytable/graph/QueryIterPropertyTable.java
+++ b/jena-csv/src/main/java/org/apache/jena/propertytable/graph/QueryIterPropertyTable.java
@@ -25,7 +25,6 @@
import org.apache.jena.atlas.io.IndentedWriter ;
import org.apache.jena.atlas.lib.Lib ;
-import org.apache.jena.graph.Graph ;
import org.apache.jena.graph.Node ;
import org.apache.jena.graph.Triple ;
import org.apache.jena.sparql.core.BasicPattern ;
@@ -43,7 +42,6 @@
public class QueryIterPropertyTable extends QueryIter1 {
private BasicPattern pattern;
- private Graph graph;
private QueryIterator output;
public static QueryIterator create(QueryIterator input,
@@ -55,7 +53,7 @@ private QueryIterPropertyTable(QueryIterator input, BasicPattern pattern,
ExecutionContext execContext) {
super(input, execContext);
this.pattern = pattern;
- graph = execContext.getActiveGraph();
+ execContext.getActiveGraph();
// Create a chain of triple iterators.
QueryIterator chain = getInput();
Collection patterns = sort(pattern);
diff --git a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java
index 07b10d06175..f6f3d9cc022 100644
--- a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java
+++ b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java
@@ -290,8 +290,6 @@ private ServletContextHandler buildServer(String jettyConfig, boolean enableComp
*/
public static boolean überServlet = false ;
- private static List ListOfEmptyString = Arrays.asList("") ;
-
private void configureOneDataset(ServletContextHandler context, DatasetRef dsDesc, boolean enableCompression) {
String datasetPath = dsDesc.name ;
if ( datasetPath.equals("/") )
diff --git a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Upload.java b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Upload.java
index 3c7913d2341..fa6c3bf0394 100644
--- a/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Upload.java
+++ b/jena-fuseki1/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Upload.java
@@ -20,12 +20,10 @@
import static java.lang.String.format ;
-import java.io.IOException ;
import java.io.InputStream ;
import java.io.PrintWriter ;
import java.util.zip.GZIPInputStream ;
-import javax.servlet.ServletException ;
import javax.servlet.http.HttpServletRequest ;
import javax.servlet.http.HttpServletResponse ;
@@ -51,8 +49,6 @@
public class SPARQL_Upload extends SPARQL_ServletBase
{
- private static ErrorHandler errorHandler = ErrorHandlerFactory.errorHandlerStd(log) ;
-
public SPARQL_Upload() {
super() ;
}
@@ -60,7 +56,6 @@ public SPARQL_Upload() {
// Methods to respond to.
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException
{
doCommon(request, response) ;
}
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java
index e7cf42b3548..999f2b14a6b 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/FusekiConfig.java
@@ -19,7 +19,6 @@
package org.apache.jena.fuseki.build ;
import java.io.File ;
-import java.io.FilenameFilter ;
import java.io.IOException ;
import java.lang.reflect.Method ;
import java.nio.file.DirectoryStream ;
@@ -58,17 +57,6 @@ public class FusekiConfig {
private static Logger log = Fuseki.configLog ;
- private static FilenameFilter visibleFiles =
- new FilenameFilter() {
- @Override
- public boolean accept(File dir, String name) {
- if ( name.startsWith(".") )
- return false ;
- File f = new File(dir, name) ;
- return f.isFile() ;
- }
- } ;
-
/** Has side effects in server setup */
public static List readConfigFile(String filename) {
// Old-style config file.
@@ -210,7 +198,7 @@ public static List readConfigurationDirectory(String dir) {
// Files that are not hidden.
DirectoryStream.Filter filter = new DirectoryStream.Filter() {
@Override
- public boolean accept(Path entry) throws IOException {
+ public boolean accept(Path entry) {
File f = entry.toFile() ;
return ! f.isHidden() && f.isFile() ;
}
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionAsyncTask.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionAsyncTask.java
index 8d8a080eba6..e06b99a08ed 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionAsyncTask.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionAsyncTask.java
@@ -31,9 +31,6 @@
/** Base helper class for creating async tasks on "items", based on POST */
public abstract class ActionAsyncTask extends ActionItem
{
- // ?? Better as a library (mixin) so can be used outside ActionItem
- private static AsyncPool asyncPool = AsyncPool.get() ;
-
public ActionAsyncTask() { super() ; }
@Override
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java
index 306d4245407..57b8fdb3805 100644
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java
+++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/server/DataService.java
@@ -60,7 +60,6 @@ public static DataService serviceOnlyDataService() {
// DataService-level counters.
private final CounterSet counters = new CounterSet() ;
- private final AtomicLong requestCounter = new AtomicLong(0) ;
private final AtomicBoolean offlineInProgress = new AtomicBoolean(false) ;
private final AtomicBoolean acceptingRequests = new AtomicBoolean(true) ;
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPort.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPort.java
index d6abb521371..3c4f05b0066 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPort.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerPort.java
@@ -26,7 +26,7 @@
* on 04/03/12 16:02 from the specification file
* src/main/jflex/org/apache/jena/iri/impl/port.jflex
*/
-class LexerPort extends AbsLexer implements org.apache.jena.iri.ViolationCodes, org.apache.jena.iri.IRIComponents, Lexer {
+class LexerPort extends AbsLexer implements org.apache.jena.iri.IRIComponents, Lexer {
/** This character denotes the end of file */
private static final int YYEOF = -1;
@@ -206,9 +206,6 @@ the source of the yytext() string */
from input */
private int zzEndRead;
- /** number of newlines encountered up to the start of the matched text */
- private int yyline;
-
/** the number of characters up to the start of the matched text */
private int yychar;
@@ -350,7 +347,7 @@ private final void yyreset(java.io.Reader reader) {
zzAtEOF = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = 0;
- yyline = yychar = 0;
+ yychar = 0;
zzLexicalState = YYINITIAL;
}
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerQuery.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerQuery.java
index 09d6f340ca7..90200f3586d 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerQuery.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerQuery.java
@@ -26,7 +26,7 @@
* on 04/03/12 16:02 from the specification file
* tmp.jflex
*/
-class LexerQuery extends AbsLexer implements org.apache.jena.iri.ViolationCodes, org.apache.jena.iri.IRIComponents, Lexer {
+class LexerQuery extends AbsLexer implements org.apache.jena.iri.IRIComponents, Lexer {
/** This character denotes the end of file */
private static final int YYEOF = -1;
@@ -222,9 +222,6 @@ the source of the yytext() string */
from input */
private int zzEndRead;
- /** number of newlines encountered up to the start of the matched text */
- private int yyline;
-
/** the number of characters up to the start of the matched text */
private int yychar;
@@ -365,7 +362,7 @@ private final void yyreset(java.io.Reader reader) {
zzAtEOF = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = 0;
- yyline = yychar = 0;
+ yychar = 0;
zzLexicalState = YYINITIAL;
}
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerScheme.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerScheme.java
index f8f7f34656e..62f00c4307f 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerScheme.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerScheme.java
@@ -26,7 +26,7 @@
* on 04/03/12 16:02 from the specification file
* src/main/jflex/org/apache/jena/iri/impl/scheme.jflex
*/
-class LexerScheme extends AbsLexer implements org.apache.jena.iri.ViolationCodes, org.apache.jena.iri.IRIComponents, Lexer {
+class LexerScheme extends AbsLexer implements org.apache.jena.iri.IRIComponents, Lexer {
/** This character denotes the end of file */
private static final int YYEOF = -1;
@@ -209,9 +209,6 @@ the source of the yytext() string */
from input */
private int zzEndRead;
- /** number of newlines encountered up to the start of the matched text */
- private int yyline;
-
/** the number of characters up to the start of the matched text */
private int yychar;
@@ -353,7 +350,7 @@ private final void yyreset(java.io.Reader reader) {
zzAtEOF = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = 0;
- yyline = yychar = 0;
+ yychar = 0;
zzLexicalState = YYINITIAL;
}
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerUserinfo.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerUserinfo.java
index 8e58d9d0855..4daa2dde363 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerUserinfo.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerUserinfo.java
@@ -26,7 +26,7 @@
* on 04/03/12 16:02 from the specification file
* tmp.jflex
*/
-class LexerUserinfo extends AbsLexer implements org.apache.jena.iri.ViolationCodes, org.apache.jena.iri.IRIComponents, Lexer {
+class LexerUserinfo extends AbsLexer implements org.apache.jena.iri.IRIComponents, Lexer {
/** This character denotes the end of file */
private static final int YYEOF = -1;
@@ -222,9 +222,6 @@ the source of the yytext() string */
from input */
private int zzEndRead;
- /** number of newlines encountered up to the start of the matched text */
- private int yyline;
-
/** the number of characters up to the start of the matched text */
private int yychar;
@@ -365,7 +362,7 @@ private final void yyreset(java.io.Reader reader) {
zzAtEOF = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = 0;
- yyline = yychar = 0;
+ yychar = 0;
zzLexicalState = YYINITIAL;
}
diff --git a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerXHost.java b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerXHost.java
index 04a52decb9c..6a5dc6017f1 100644
--- a/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerXHost.java
+++ b/jena-iri/src/main/java/org/apache/jena/iri/impl/LexerXHost.java
@@ -26,7 +26,7 @@
* on 04/03/12 16:02 from the specification file
* tmp.jflex
*/
-class LexerXHost extends AbsLexer implements org.apache.jena.iri.ViolationCodes, org.apache.jena.iri.IRIComponents, Lexer {
+class LexerXHost extends AbsLexer implements org.apache.jena.iri.IRIComponents, Lexer {
/** This character denotes the end of file */
private static final int YYEOF = -1;
@@ -222,9 +222,6 @@ the source of the yytext() string */
from input */
private int zzEndRead;
- /** number of newlines encountered up to the start of the matched text */
- private int yyline;
-
/** the number of characters up to the start of the matched text */
private int yychar;
@@ -376,7 +373,7 @@ private final void yyreset(java.io.Reader reader) {
zzAtEOF = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = 0;
- yyline = yychar = 0;
+ yychar = 0;
zzLexicalState = YYINITIAL;
}
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/TupleLoaderSimple.java b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/TupleLoaderSimple.java
index bf3947e96c4..868e85d7f7d 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/TupleLoaderSimple.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/layout1/TupleLoaderSimple.java
@@ -25,12 +25,9 @@
import org.apache.jena.sdb.sql.SDBConnection ;
import org.apache.jena.sdb.store.TableDesc ;
import org.apache.jena.sdb.store.TupleLoaderOne ;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
public class TupleLoaderSimple extends TupleLoaderOne
{
- private static Logger log = LoggerFactory.getLogger(TupleLoaderSimple.class);
private EncoderDecoder codec ;
public TupleLoaderSimple(SDBConnection connection, TableDesc tableDesc, EncoderDecoder codec)
@@ -40,13 +37,13 @@ public TupleLoaderSimple(SDBConnection connection, TableDesc tableDesc, EncoderD
}
@Override
- public SqlConstant getRefForNode(Node node) throws SQLException
+ public SqlConstant getRefForNode(Node node)
{
return new SqlConstant(codec.encode(node)) ;
}
@Override
- public SqlConstant insertNode(Node node) throws SQLException
+ public SqlConstant insertNode(Node node)
{
return new SqlConstant(codec.encode(node)) ;
}
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/expr/StringExprCompiler.java b/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/expr/StringExprCompiler.java
index 10b6cd7dd6b..9cfd0070059 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/expr/StringExprCompiler.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/expr/StringExprCompiler.java
@@ -40,22 +40,6 @@ public class StringExprCompiler implements ConditionCompiler
new Var[]{ Var.alloc("a1") , Var.alloc("a2") },
new ActionMatch[]{ new ActionMatchVar() ,
new ActionMatchString()}) ;
- // As equalsString1 but reverse the arguments.
- private static ExprPattern equalsString2 = new ExprPattern("?a2 = ?a1",
- new Var[]{ Var.alloc("a1") , Var.alloc("a2") },
- new ActionMatch[]{ new ActionMatchVar() ,
- new ActionMatchString()}) ;
-// private static ExprPattern equalsString3 = new ExprPattern("str(?a1) = ?a2",
-// new Var[]{ Var.alloc("a1") , Var.alloc("a2") },
-// new Action[]{ new ActionMatchVar() ,
-// new ActionMatchString()}) ;
-//// As equalsString3 but reverse the arguments.
-// private static ExprPattern equalsString4 = new ExprPattern("?a1 = str(?a2)",
-// new Var[]{ Var.alloc("a1") , Var.alloc("a2") },
-// new Action[]{ new ActionMatchString() ,
-// new ActionMatchVar() }) ;
-
-
@Override
public SDBConstraint recognize(Expr expr)
{
diff --git a/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/index/TupleLoaderIndexOracle.java b/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/index/TupleLoaderIndexOracle.java
index 3d48844b595..cef412a7c2f 100644
--- a/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/index/TupleLoaderIndexOracle.java
+++ b/jena-sdb/src/main/java/org/apache/jena/sdb/layout2/index/TupleLoaderIndexOracle.java
@@ -21,13 +21,9 @@
import org.apache.jena.sdb.layout2.TableDescNodes ;
import org.apache.jena.sdb.sql.SDBConnection ;
import org.apache.jena.sdb.store.TableDesc ;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
public class TupleLoaderIndexOracle extends TupleLoaderIndexBase {
- private static Logger log = LoggerFactory.getLogger(TupleLoaderIndexOracle.class);
-
public TupleLoaderIndexOracle(SDBConnection connection, TableDesc tableDesc,
int chunkSize) {
super(connection, tableDesc, chunkSize);
diff --git a/jena-sdb/src/main/java/sdb/cmd/ModData.java b/jena-sdb/src/main/java/sdb/cmd/ModData.java
index a671212408c..add9b1cdf56 100644
--- a/jena-sdb/src/main/java/sdb/cmd/ModData.java
+++ b/jena-sdb/src/main/java/sdb/cmd/ModData.java
@@ -18,9 +18,6 @@
package sdb.cmd;
-import java.util.ArrayList;
-import java.util.List;
-
import arq.cmd.ArgDecl ;
import arq.cmd.CmdArgModule ;
import arq.cmdline.CmdGeneral ;
@@ -29,8 +26,6 @@
public class ModData extends ModBase
{
private ArgDecl argDeclLoad = new ArgDecl(ArgDecl.HasValue, "data", "load") ;
- private List filesToLoad = new ArrayList() ;
-
public ModData() {}
@Override
@@ -44,6 +39,6 @@ public void registerWith(CmdGeneral cmdLine)
@Override
public void processArgs(CmdArgModule cmdLine)
{
- filesToLoad = cmdLine.getValues(argDeclLoad) ;
+ cmdLine.getValues(argDeclLoad);
}
}
diff --git a/jena-sdb/src/main/java/sdb/cmd/ModGraph.java b/jena-sdb/src/main/java/sdb/cmd/ModGraph.java
index bdb3d20e047..880fd365036 100644
--- a/jena-sdb/src/main/java/sdb/cmd/ModGraph.java
+++ b/jena-sdb/src/main/java/sdb/cmd/ModGraph.java
@@ -30,8 +30,6 @@
public class ModGraph extends ModBase
{
private static ArgDecl argDeclGraphName = new ArgDecl(true, "graph") ;
- private static ArgDecl argDeclGraphDeafult = new ArgDecl(false, "default") ;
-
private String graphName = null ;
public ModGraph() {}
diff --git a/jena-sdb/src/main/java/sdb/sdbtuple.java b/jena-sdb/src/main/java/sdb/sdbtuple.java
index d3f11cc15b6..d88c5c74891 100644
--- a/jena-sdb/src/main/java/sdb/sdbtuple.java
+++ b/jena-sdb/src/main/java/sdb/sdbtuple.java
@@ -48,8 +48,6 @@ public void processArgs(CmdArgModule cmdLine)
}
- private static ModTuple modTuple = new ModTuple() ;
-
// Commands
private static ArgDecl argDeclCmdPrint = new ArgDecl(false, "print") ;
private static ArgDecl argDeclCmdLoad = new ArgDecl(true, "load") ;
diff --git a/jena-spatial/src/main/java/org/apache/jena/query/spatial/SpatialIndexSolr.java b/jena-spatial/src/main/java/org/apache/jena/query/spatial/SpatialIndexSolr.java
index b807edb61e8..69b727b56b3 100644
--- a/jena-spatial/src/main/java/org/apache/jena/query/spatial/SpatialIndexSolr.java
+++ b/jena-spatial/src/main/java/org/apache/jena/query/spatial/SpatialIndexSolr.java
@@ -22,10 +22,7 @@
import java.util.List ;
import org.apache.jena.graph.Node ;
-import org.apache.lucene.spatial.SpatialStrategy ;
-import org.apache.lucene.spatial.prefix.RecursivePrefixTreeStrategy ;
import org.apache.lucene.spatial.prefix.tree.GeohashPrefixTree ;
-import org.apache.lucene.spatial.prefix.tree.SpatialPrefixTree ;
import org.apache.lucene.spatial.query.SpatialOperation ;
import org.apache.solr.client.solrj.SolrQuery ;
import org.apache.solr.client.solrj.SolrServer ;
@@ -43,28 +40,13 @@ public class SpatialIndexSolr implements SpatialIndex {
private static Logger log = LoggerFactory.getLogger(SpatialIndexSolr.class);
private final SolrServer solrServer;
private EntityDefinition docDef;
- private SpatialPrefixTree grid;
-
- /**
- * The Lucene spatial {@link SpatialStrategy} encapsulates an approach to
- * indexing and searching shapes, and providing distance values for them.
- * It's a simple API to unify different approaches. You might use more than
- * one strategy for a shape as each strategy has its strengths and
- * weaknesses.
- *
- * Note that these are initialized with a field name.
- */
- private SpatialStrategy strategy;
-
+
public SpatialIndexSolr(SolrServer server, EntityDefinition def) {
this.solrServer = server;
this.docDef = def;
int maxLevels = 11;// results in sub-meter precision for geohash
- // This can also be constructed from SpatialPrefixTreeFactory
- grid = new GeohashPrefixTree(SpatialQuery.ctx, maxLevels);
-
- this.strategy = new RecursivePrefixTreeStrategy(grid, def.getGeoField());
+ new GeohashPrefixTree(SpatialQuery.ctx, maxLevels);
}
@Override
diff --git a/jena-spatial/src/main/java/org/apache/jena/query/spatial/pfunction/library/WestPF.java b/jena-spatial/src/main/java/org/apache/jena/query/spatial/pfunction/library/WestPF.java
index 5b3f5684dc2..c2e00292b55 100644
--- a/jena-spatial/src/main/java/org/apache/jena/query/spatial/pfunction/library/WestPF.java
+++ b/jena-spatial/src/main/java/org/apache/jena/query/spatial/pfunction/library/WestPF.java
@@ -21,17 +21,9 @@
import org.apache.jena.query.spatial.SpatialQuery;
import org.apache.jena.query.spatial.pfunction.DirectionWithPointPFBase;
import org.apache.jena.query.spatial.pfunction.SpatialMatch;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
public class WestPF extends DirectionWithPointPFBase {
- private static Logger log = LoggerFactory.getLogger(WestPF.class);
-
- public WestPF() {
- // TODO Auto-generated constructor stub
- }
-
/** Deconstruct the node or list object argument and make a SpatialMatch */
@Override
protected SpatialMatch getSpatialMatch(Double latitude, Double longitude, int limit) {
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/lib/NodeLib.java b/jena-tdb/src/main/java/org/apache/jena/tdb/lib/NodeLib.java
index 0ab1d5f92e8..954620d7614 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/lib/NodeLib.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/lib/NodeLib.java
@@ -50,8 +50,6 @@ public class NodeLib
{
private static Nodec nodec = new NodecSSE() ;
- // Characters in IRIs that are illegal and cause SSE problems, but we wish to keep.
- final private static char MarkerChar = '_' ;
public static long encodeStore(Node node, ObjectFile file)
{
// Buffer pool?
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java
index d3ff3b1ef8c..06f7a74db00 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/bulkloader/LoaderNodeTupleTable.java
@@ -28,8 +28,6 @@
import org.apache.jena.tdb.store.NodeId ;
import org.apache.jena.tdb.store.nodetupletable.NodeTupleTable ;
import org.apache.jena.tdb.store.tupletable.TupleIndex ;
-import org.slf4j.Logger ;
-import org.slf4j.LoggerFactory ;
/**
* Load into one NodeTupleTable (triples, quads, other)
@@ -51,8 +49,6 @@ public class LoaderNodeTupleTable implements Closeable, Sync
private long count = 0 ;
private String itemsName ;
- static private Logger logLoad = LoggerFactory.getLogger("org.apache.jena.tdb.loader") ;
-
public LoaderNodeTupleTable(NodeTupleTable nodeTupleTable, String itemsName, LoadMonitor monitor)
{
this.nodeTupleTable = nodeTupleTable ;
@@ -176,15 +172,11 @@ private void createSecondaryIndexes()
}
- private static Object lock = new Object() ;
-
static void copyIndex(Iterator> srcIter, TupleIndex[] destIndexes, String label, LoadMonitor monitor)
{
monitor.startIndex(label) ;
- long counter = 0 ;
for ( ; srcIter.hasNext() ; )
{
- counter++ ;
Tuple tuple = srcIter.next();
monitor.indexItem() ;
for ( TupleIndex destIdx : destIndexes )
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleTable.java b/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleTable.java
index 2f7e3723198..20ea936307e 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleTable.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/store/tupletable/TupleTable.java
@@ -29,14 +29,10 @@
import org.apache.jena.tdb.TDBException ;
import org.apache.jena.tdb.store.NodeId ;
import org.apache.jena.tdb.sys.SystemTDB ;
-import org.slf4j.Logger ;
-import org.slf4j.LoggerFactory ;
/** A TupleTable is a set of TupleIndexes. The first TupleIndex is the "primary" index and must exist */
public class TupleTable implements Sync, Closeable
{
- private static Logger log = LoggerFactory.getLogger(TupleTable.class) ;
-
private final TupleIndex[] indexes ;
private final TupleIndex scanAllIndex ; // Use this index if a complete scan is needed.
private final int tupleLen ;
diff --git a/jena-tdb/src/main/java/org/apache/jena/tdb/sys/TDBMaker.java b/jena-tdb/src/main/java/org/apache/jena/tdb/sys/TDBMaker.java
index d3c7c75ab7b..0b8bf44ee79 100644
--- a/jena-tdb/src/main/java/org/apache/jena/tdb/sys/TDBMaker.java
+++ b/jena-tdb/src/main/java/org/apache/jena/tdb/sys/TDBMaker.java
@@ -18,9 +18,7 @@
package org.apache.jena.tdb.sys;
-import org.apache.jena.sparql.core.DatasetGraph ;
import org.apache.jena.tdb.StoreConnection ;
-import org.apache.jena.tdb.TDBFactory ;
import org.apache.jena.tdb.base.file.Location ;
import org.apache.jena.tdb.setup.DatasetBuilderStd ;
import org.apache.jena.tdb.setup.StoreParams ;
@@ -93,27 +91,4 @@ public DatasetGraphTDB createDatasetGraph(Location location, StoreParams params)
}
}
- /** Make by creating the normal, transactional one and finding the base */
- private static class _BuilderBase implements DatasetGraphMakerTDB
- {
- @Override
- public DatasetGraphTDB createDatasetGraph(Location location, StoreParams params)
- {
- if ( params != null )
- System.err.println("StoreParams != null : ignored at the moment") ;
- DatasetGraph dsg = TDBFactory.createDatasetGraph(location) ; // , params) ;
- return TDBInternal.getBaseDatasetGraphTDB(dsg) ;
- }
- }
-
- /** The StoreConnection-cached base DatasetGraphTDB.*/
- private static class BuilderStoreConnectionBase implements DatasetGraphMakerTDB
- {
- @Override
- public DatasetGraphTDB createDatasetGraph(Location location, StoreParams params)
- {
- return StoreConnection.make(location, params).getBaseDataset() ;
- }
- }
-
}
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/index/bplustree/TestBPTreeRecords.java b/jena-tdb/src/test/java/org/apache/jena/tdb/index/bplustree/TestBPTreeRecords.java
index 03704baba0c..b169512fc03 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/index/bplustree/TestBPTreeRecords.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/index/bplustree/TestBPTreeRecords.java
@@ -47,7 +47,6 @@ public class TestBPTreeRecords extends BaseTest
static private int blockSize ;
static private RecordFactory recordFactory ;
- static private int bufSizeRecord ;
static private BlockMgr blkMgrRecords ;
static private RecordBufferPageMgr recordBufferPageMgr ;
static private BPlusTree bPlusTree ;
@@ -66,7 +65,7 @@ public class TestBPTreeRecords extends BaseTest
blockSize = 4*8 ; // Which is 6 int records
recordFactory = new RecordFactory(4, 0) ;
- bufSizeRecord = RecordBufferPage.calcRecordSize(recordFactory, blockSize) ;
+ RecordBufferPage.calcRecordSize(recordFactory, blockSize);
blkMgrRecords = BlockMgrFactory.createMem("BPTreeRecords", blockSize) ;
recordBufferPageMgr = new RecordBufferPageMgr(recordFactory, blkMgrRecords) ;
diff --git a/jena-text/src/test/java/org/apache/jena/query/text/assembler/TestTextIndexSolrAssembler.java b/jena-text/src/test/java/org/apache/jena/query/text/assembler/TestTextIndexSolrAssembler.java
index 3e2cb689107..763f06b11fa 100644
--- a/jena-text/src/test/java/org/apache/jena/query/text/assembler/TestTextIndexSolrAssembler.java
+++ b/jena-text/src/test/java/org/apache/jena/query/text/assembler/TestTextIndexSolrAssembler.java
@@ -31,7 +31,6 @@
public class TestTextIndexSolrAssembler extends AbstractTestTextAssembler {
private static final String TESTBASE = "http://example.org/solrAssembler/";
- private static final Resource EMBEDDED_SOLR_INDEX_SPEC;
private static final Resource HTTP_SOLR_INDEX_SPEC;
// @Test public void testIndexUsesEmbeddedServer() throws IOException {
@@ -54,11 +53,10 @@ public class TestTextIndexSolrAssembler extends AbstractTestTextAssembler {
static {
TextAssembler.init();
- EMBEDDED_SOLR_INDEX_SPEC =
- model.createResource(TESTBASE + "embeddedSolrIndexSpec")
- .addProperty(RDF.type, TextVocab.textIndexSolr)
- .addProperty(TextVocab.pServer, model.createResource("embedded:solr"))
- .addProperty(TextVocab.pEntityMap, SIMPLE_ENTITY_MAP_SPEC);
+ model.createResource(TESTBASE + "embeddedSolrIndexSpec")
+ .addProperty(RDF.type, TextVocab.textIndexSolr)
+ .addProperty(TextVocab.pServer, model.createResource("embedded:solr"))
+ .addProperty(TextVocab.pEntityMap, SIMPLE_ENTITY_MAP_SPEC);
HTTP_SOLR_INDEX_SPEC =
model.createResource(TESTBASE + "httpSolrIndexSpec")
.addProperty(RDF.type, TextVocab.textIndexSolr)
From 7a468e7d529cb94603de948dc34b26704d249e05 Mon Sep 17 00:00:00 2001
From: ajs6f
Date: Fri, 8 May 2015 09:41:42 -0400
Subject: [PATCH 7/7] Removing unthrown checked exceptions
---
.../atlas/json/io/parser/TokenizerJSON.java | 5 +-
.../apache/jena/riot/out/JenaRDF2JSONLD.java | 3 +-
.../apache/jena/riot/system/IRIResolver.java | 4 +-
.../optimize/ExprTransformConstantFold.java | 1 -
.../engine/iterator/QueryIterMinus.java | 2 -
.../sparql/engine/iterator/QueryIterPath.java | 1 -
.../apache/jena/sparql/expr/ExprBuild.java | 1 -
.../jena/sparql/resultset/XMLInputSAX.java | 20 +-
.../jena/web/DatasetGraphAccessorHTTP.java | 3 +-
jena-arq/src/main/java/riotcmd/utf8.java | 5 -
.../jena/riot/lang/TestPipedRDFIterators.java | 6 +-
.../jena/riot/system/TestIO_JenaReaders.java | 4 +-
.../jena/riot/system/TestIO_JenaWriters.java | 4 +-
.../sparql/core/TestDatasetGraphWithLock.java | 4 +-
.../sparql/engine/index/TestIndexTable.java | 4 +-
.../jena/sparql/junit/EarlTestCase.java | 8 +-
.../apache/jena/sparql/junit/QueryTest.java | 10 +-
.../jena/sparql/junit/SurpressedTest.java | 2 +-
.../apache/jena/sparql/junit/SyntaxTest.java | 2 +-
.../jena/sparql/junit/SyntaxUpdateTest.java | 2 +-
.../jena/sparql/junit/TestSerialization.java | 2 +-
.../apache/jena/sparql/junit/UpdateTest.java | 6 +-
.../apache/jena/sparql/util/TestFmtUtils.java | 6 +-
.../apache/jena/atlas/io/BufferingWriter.java | 10 +-
.../jena/atlas/io/CharStreamReader.java | 7 +-
.../apache/jena/atlas/io/InStreamASCII.java | 4 +-
.../apache/jena/atlas/io/InStreamUTF8.java | 4 +-
.../jena/atlas/io/InputStreamBuffered.java | 2 +-
.../apache/jena/atlas/io/PeekInputStream.java | 10 +-
.../org/apache/jena/atlas/io/PeekReader.java | 6 +-
.../jena/atlas/lib/TestDateTimeUtils.java | 10 +-
.../apache/jena/rdfxml/xmlinput/StAX2SAX.java | 14 +-
.../xmlinput/impl/ARPDatatypeLiteral.java | 2 +-
.../xmlinput/impl/ARPSaxErrorHandler.java | 7 +-
.../xmlinput/impl/DefaultErrorHandler.java | 4 +-
.../xmlinput/impl/LexicalHandlerImpl.java | 17 +-
.../rdfxml/xmlinput/impl/SAX2RDFImpl.java | 13 +-
.../jena/rdfxml/xmlinput/impl/XMLHandler.java | 3 +-
.../jena/graph/test/TestTypedLiterals.java | 4 +-
.../jena/ontology/impl/TestAllDifferent.java | 2 +-
.../ontology/impl/TestClassExpression.java | 112 +++----
.../jena/ontology/impl/TestIndividual.java | 42 +--
.../jena/ontology/impl/TestOntTools.java | 3 +-
.../jena/ontology/impl/TestOntology.java | 8 +-
.../jena/ontology/impl/TestProperty.java | 54 ++--
.../jena/ontology/impl/TestResource.java | 36 +--
.../model/test/AbstractContainerMethods.java | 2 +-
.../rdf/model/test/AbstractModelTestBase.java | 4 +-
.../jena/rdf/model/test/IsomorphicTests.java | 4 +-
.../rdf/model/test/TestAddAndContains.java | 4 +-
.../jena/rdf/model/test/TestAddModel.java | 4 +-
.../jena/rdf/model/test/TestConcurrency.java | 4 +-
.../model/test/TestConcurrencyNesting.java | 2 +-
.../model/test/TestConcurrencyParallel.java | 2 +-
.../rdf/model/test/TestCopyInOutOfModel.java | 2 +-
.../apache/jena/rdf/model/test/TestGet.java | 4 +-
.../jena/rdf/model/test/TestIterators.java | 2 +-
.../rdf/model/test/TestListStatements.java | 4 +-
.../jena/rdf/model/test/TestListSubjects.java | 2 +-
.../rdf/model/test/TestLiteralsInModel.java | 2 +-
.../jena/rdf/model/test/TestModelEvents.java | 2 +-
.../model/test/TestModelSetOperations.java | 4 +-
.../model/test/TestObjectOfProperties.java | 2 +-
.../jena/rdf/model/test/TestObjects.java | 4 +-
.../rdf/model/test/TestReifiedStatements.java | 2 +-
.../rdf/model/test/TestResourceMethods.java | 2 +-
.../jena/rdf/model/test/TestSelectorUse.java | 2 +-
.../jena/rdf/model/test/TestSeqMethods.java | 2 +-
.../model/test/TestSimpleListStatements.java | 2 +-
.../rdf/model/test/TestSimpleSelector.java | 2 +-
.../rdf/model/test/TestStatementCreation.java | 4 +-
.../rdf/model/test/TestStatementMethods.java | 2 +-
.../jena/rdfxml/xmlinput/MemoryLeakTest.java | 3 +-
.../jena/rdfxml/xmlinput/MoreTests.java | 4 +-
.../rdfxml/xmlinput/NTripleTestSuite.java | 6 +-
.../jena/rdfxml/xmlinput/WGTestSuite.java | 8 +-
.../rdfxml/xmloutput/PrettyWriterTest.java | 2 +-
.../rdfxml/xmloutput/TestLiteralEncoding.java | 6 +-
.../rdfxml/xmloutput/TestXMLFeatures.java | 4 +-
.../jena/reasoner/test/TestCurrentRDFWG.java | 18 +-
.../jena/reasoner/test/TestRDFSReasoners.java | 4 +-
.../jena/reasoner/test/WGReasonerTester.java | 36 +--
.../propertytable/graph/GraphCSVTest.java | 4 +-
.../hadoop/rdf/io/input/QuadsInputFormat.java | 5 +-
.../rdf/io/input/TriplesInputFormat.java | 5 +-
.../io/input/TriplesOrQuadsInputFormat.java | 5 +-
.../input/jsonld/JsonLDQuadInputFormat.java | 5 +-
.../input/jsonld/JsonLDTripleInputFormat.java | 5 +-
.../nquads/BlockedNQuadsInputFormat.java | 5 +-
.../io/input/nquads/NQuadsInputFormat.java | 5 +-
.../nquads/WholeFileNQuadsInputFormat.java | 5 +-
.../ntriples/BlockedNTriplesInputFormat.java | 5 +-
.../input/ntriples/NTriplesInputFormat.java | 5 +-
.../WholeFileNTriplesInputFormat.java | 5 +-
.../io/input/rdfjson/RdfJsonInputFormat.java | 5 +-
.../io/input/rdfxml/RdfXmlInputFormat.java | 5 +-
.../AbstractBlockBasedNodeTupleReader.java | 10 +-
.../AbstractWholeFileNodeTupleReader.java | 10 +-
.../input/thrift/ThriftQuadInputFormat.java | 5 +-
.../input/thrift/ThriftTripleInputFormat.java | 5 +-
.../rdf/io/input/trig/TriGInputFormat.java | 5 +-
.../rdf/io/input/trix/TriXInputFormat.java | 5 +-
.../io/input/turtle/TurtleInputFormat.java | 5 +-
.../AbstractBatchedNodeTupleWriter.java | 4 +-
.../AbstractLineBasedNodeTupleWriter.java | 5 +-
.../io/output/writers/AbstractNodeWriter.java | 5 +-
.../AbstractStreamRdfNodeTupleWriter.java | 6 +-
.../AbstractWholeFileNodeTupleWriter.java | 4 +-
.../registry/readers/JsonLDReaderFactory.java | 6 +-
.../registry/readers/NQuadsReaderFactory.java | 4 +-
.../readers/NTriplesReaderFactory.java | 3 +-
.../readers/RdfJsonReaderFactory.java | 4 +-
.../registry/readers/RdfXmlReaderFactory.java | 4 +-
.../registry/readers/ThriftReaderFactory.java | 6 +-
.../registry/readers/TriGReaderFactory.java | 4 +-
.../registry/readers/TriXReaderFactory.java | 4 +-
.../registry/readers/TurtleReaderFactory.java | 4 +-
.../registry/writers/JsonLDWriterFactory.java | 7 +-
.../registry/writers/NQuadsWriterFactory.java | 4 +-
.../writers/NTriplesWriterFactory.java | 4 +-
.../writers/RdfJsonWriterFactory.java | 4 +-
.../registry/writers/RdfXmlWriterFactory.java | 4 +-
.../registry/writers/ThriftWriterFactory.java | 7 +-
.../registry/writers/TriGWriterFactory.java | 4 +-
.../registry/writers/TriXWriterFactory.java | 4 +-
.../registry/writers/TurtleWriterFactory.java | 4 +-
.../AbstractNodeTupleInputFormatTests.java | 33 +-
...AbstractWholeFileQuadInputFormatTests.java | 2 +-
...mpressedWholeFileQuadInputFormatTests.java | 2 +-
.../jena/hadoop/rdf/stats/RdfStats.java | 5 +-
.../apache/jena/fuseki/mgt/ActionBackup.java | 2 +-
.../jena/fuseki/servlets/HttpAction.java | 1 -
.../jena/fuseki/servlets/SPARQL_REST.java | 4 +-
.../fuseki/servlets/SPARQL_ServletBase.java | 4 +-
.../jena/fuseki/servlets/SPARQL_Update.java | 4 +-
.../servlets/SimpleVelocityServlet.java | 2 +-
.../jena/fuseki/authz/LocalhostFilter.java | 2 +-
.../jena/fuseki/mgt/ActionDatasets.java | 3 +-
.../jena/fuseki/servlets/ActionREST.java | 4 +-
.../jena/fuseki/servlets/FusekiFilter.java | 2 +-
.../jena/fuseki/servlets/HttpAction.java | 1 -
.../jena/fuseki/servlets/SPARQL_Update.java | 6 +-
.../jena/fuseki/servlets/SPARQL_Upload.java | 3 -
.../apache/jena/fuseki/TestDatasetOps.java | 3 +-
.../org/apache/jena/iri/TestIRIFactory.java | 2 +-
.../java/org/apache/jena/jdbc/JenaDriver.java | 4 +-
.../jdbc/connections/DatasetConnection.java | 6 +-
.../jena/jdbc/connections/JenaConnection.java | 23 +-
.../jena/jdbc/metadata/DatasetMetadata.java | 4 +-
.../jena/jdbc/metadata/JenaMetadata.java | 294 +++++++++---------
.../jdbc/metadata/results/MetaResultSet.java | 40 +--
.../apache/jena/jdbc/results/AskResults.java | 16 +-
.../jena/jdbc/results/JenaResultSet.java | 20 +-
.../jdbc/results/MaterializedResults.java | 8 +-
.../results/MaterializedSelectResults.java | 12 +-
.../jdbc/results/QueryExecutionResults.java | 2 +-
.../jena/jdbc/results/SelectResults.java | 4 +-
.../jena/jdbc/results/StreamedResults.java | 8 +-
.../jdbc/results/TripleIteratorResults.java | 4 +-
.../jena/jdbc/results/TripleListResults.java | 12 +-
.../metadata/AbstractResultsMetadata.java | 9 +-
.../statements/DatasetPreparedStatement.java | 2 +-
.../jdbc/statements/DatasetStatement.java | 2 +-
.../statements/JenaPreparedStatement.java | 2 +-
.../jena/jdbc/statements/JenaStatement.java | 46 +--
.../metadata/JenaParameterMetadata.java | 2 +-
.../AbstractJenaConnectionTests.java | 6 +-
.../jena/jdbc/postprocessing/ResultsEcho.java | 3 +-
.../apache/jena/jdbc/preprocessing/Echo.java | 7 +-
.../AbstractJenaStatementTests.java | 15 +-
.../jdbc/mem/connections/MemConnection.java | 2 +-
.../jdbc/mem/metadata/MemDatasetMetadata.java | 18 +-
.../jdbc/mem/TestMemDriverWithLogging.java | 2 -
.../jena/jdbc/mem/results/TestResultSets.java | 4 +-
.../connections/RemoteEndpointConnection.java | 14 +-
.../metadata/RemoteEndpointMetadata.java | 22 +-
.../RemoteEndpointPreparedStatement.java | 2 +-
.../statements/RemoteEndpointStatement.java | 2 +-
...RemoteEndpointConnectionWithGraphUris.java | 2 +-
.../results/TestRemoteEndpointResults.java | 6 +-
.../TestRemoteEndpointResultsWithAuth.java | 6 +-
...estRemoteEndpointResultsWithGraphUris.java | 6 +-
...moteEndpointResultsWithResultSetTypes.java | 6 +-
.../jdbc/tdb/connections/TDBConnection.java | 2 +-
.../jdbc/tdb/metadata/TDBDatasetMetadata.java | 24 +-
.../tdb/results/TestTdbDiskResultSets.java | 4 +-
.../tdb/results/TestTdbMemResultSets.java | 4 +-
.../jena/tools/schemagen/SchemagenMojo.java | 3 +-
.../tools/schemagen/SchemagenOptionsTest.java | 28 --
.../tools/schemagen/SourceParameterTest.java | 14 -
.../jena/tools/schemagen/SourceTest.java | 27 --
.../permissions/SecuredAssemblerTest.java | 8 +-
.../contract/model/SecTestPackage.java | 6 +-
.../jena/permissions/graph/MemGraphTest.java | 2 +-
.../graph/SecuredPrefixMappingTest.java | 39 +--
.../permissions/model/SecuredModelTest.java | 73 ++---
.../jena/sdb/assembler/SDBModelAssembler.java | 1 -
.../jena/sdb/layout1/TupleLoaderSimple.java | 2 -
.../sdb/layout2/hash/FmtLayout2HashHSQL.java | 1 -
.../sdb/layout2/hash/TupleLoaderOneHash.java | 2 +-
.../apache/jena/sdb/sql/DataSourceSDB.java | 14 +-
.../java/org/apache/jena/tdb/TDBLoader.java | 1 -
.../apache/jena/tdb/junit/QueryTestTDB.java | 2 +-
203 files changed, 792 insertions(+), 1054 deletions(-)
diff --git a/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/TokenizerJSON.java b/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/TokenizerJSON.java
index dfb64b4e713..80c8d46d70b 100644
--- a/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/TokenizerJSON.java
+++ b/jena-arq/src/main/java/org/apache/jena/atlas/json/io/parser/TokenizerJSON.java
@@ -20,10 +20,8 @@
import static org.apache.jena.atlas.lib.Chars.* ;
-import java.io.IOException ;
import java.util.NoSuchElementException ;
-import org.apache.jena.atlas.io.IO ;
import org.apache.jena.atlas.io.PeekReader ;
import org.apache.jena.atlas.json.JsonParseException ;
import org.apache.jena.riot.tokens.Token ;
@@ -558,8 +556,7 @@ public long getLine()
@Override
public void close()
{
- try { reader.close() ; }
- catch (IOException ex) { IO.exception(ex) ; }
+ reader.close() ;
}
private static boolean isWhitespace(int ch)
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/out/JenaRDF2JSONLD.java b/jena-arq/src/main/java/org/apache/jena/riot/out/JenaRDF2JSONLD.java
index d0f16aa039d..2be1b59bd36 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/out/JenaRDF2JSONLD.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/out/JenaRDF2JSONLD.java
@@ -28,7 +28,6 @@
import org.apache.jena.sparql.core.DatasetGraph ;
import org.apache.jena.sparql.core.Quad ;
-import com.github.jsonldjava.core.JsonLdError ;
import com.github.jsonldjava.core.RDFDataset ;
/** Convert from JSON-LD syntax to JSON-LD internal representation of a dataset, using Jena Quads/Nodes etc */
@@ -36,7 +35,7 @@ class JenaRDF2JSONLD implements com.github.jsonldjava.core.RDFParser {
NodeToLabel labels = SyntaxLabels.createNodeToLabel() ;
@Override
- public RDFDataset parse(Object object) throws JsonLdError {
+ public RDFDataset parse(Object object) {
RDFDataset result = new RDFDataset() ;
if ( object instanceof DatasetGraph )
{
diff --git a/jena-arq/src/main/java/org/apache/jena/riot/system/IRIResolver.java b/jena-arq/src/main/java/org/apache/jena/riot/system/IRIResolver.java
index a4a14339d81..fece2947b78 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/system/IRIResolver.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/system/IRIResolver.java
@@ -343,7 +343,7 @@ public IRI resolveSilent(final String uriStr) {
return iriFactory.create(uriStr) ;
Callable filler = new Callable() {
@Override
- public IRI call() throws Exception {
+ public IRI call() {
return iriFactory.create(uriStr) ;
}
} ;
@@ -434,7 +434,7 @@ public IRI resolveSilent(final String relURI) {
return iriFactory.create(relURI) ;
Callable filler = new Callable() {
@Override
- public IRI call() throws Exception {
+ public IRI call() {
return base.create(relURI) ;
}
} ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/ExprTransformConstantFold.java b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/ExprTransformConstantFold.java
index 3d87df6e8f1..7884bc3880d 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/ExprTransformConstantFold.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/algebra/optimize/ExprTransformConstantFold.java
@@ -24,7 +24,6 @@
import org.apache.jena.sparql.algebra.Op ;
import org.apache.jena.sparql.algebra.TransformCopy ;
import org.apache.jena.sparql.algebra.Transformer ;
-import org.apache.jena.sparql.engine.binding.Binding ;
import org.apache.jena.sparql.expr.* ;
/**
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterMinus.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterMinus.java
index 05411335b76..90ecfe80e7f 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterMinus.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterMinus.java
@@ -18,10 +18,8 @@
package org.apache.jena.sparql.engine.iterator;
-import java.util.Map;
import java.util.Set ;
-import org.apache.jena.graph.Node ;
import org.apache.jena.sparql.core.Var ;
import org.apache.jena.sparql.engine.ExecutionContext ;
import org.apache.jena.sparql.engine.QueryIterator ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterPath.java b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterPath.java
index 41f81448d3e..4b19af513b9 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterPath.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/engine/iterator/QueryIterPath.java
@@ -21,7 +21,6 @@
import org.apache.jena.atlas.io.IndentedWriter ;
import org.apache.jena.atlas.lib.Lib ;
import org.apache.jena.sparql.core.TriplePath ;
-import org.apache.jena.sparql.core.Var ;
import org.apache.jena.sparql.engine.ExecutionContext ;
import org.apache.jena.sparql.engine.QueryIterator ;
import org.apache.jena.sparql.engine.binding.Binding ;
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/expr/ExprBuild.java b/jena-arq/src/main/java/org/apache/jena/sparql/expr/ExprBuild.java
index 27d0eacb9c2..23177b66566 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/expr/ExprBuild.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/expr/ExprBuild.java
@@ -18,7 +18,6 @@
package org.apache.jena.sparql.expr;
-import org.apache.jena.sparql.engine.OpEval ;
import org.apache.jena.sparql.util.Context ;
/** Visitor class to run over expressions and initialise them */
diff --git a/jena-arq/src/main/java/org/apache/jena/sparql/resultset/XMLInputSAX.java b/jena-arq/src/main/java/org/apache/jena/sparql/resultset/XMLInputSAX.java
index cb3d160decc..150280cf5ea 100644
--- a/jena-arq/src/main/java/org/apache/jena/sparql/resultset/XMLInputSAX.java
+++ b/jena-arq/src/main/java/org/apache/jena/sparql/resultset/XMLInputSAX.java
@@ -129,22 +129,22 @@ static class ResultSetXMLHandler2 implements ContentHandler {
public void setDocumentLocator(Locator locator) {}
@Override
- public void startDocument() throws SAXException {}
+ public void startDocument() {}
@Override
- public void endDocument() throws SAXException {}
+ public void endDocument() {}
@Override
- public void startPrefixMapping(String prefix, String uri) throws SAXException {
+ public void startPrefixMapping(String prefix, String uri) {
if ( uri.equals(RDF.getURI()) )
rdfPrefix = prefix ;
}
@Override
- public void endPrefixMapping(String prefix) throws SAXException {}
+ public void endPrefixMapping(String prefix) {}
@Override
- public void startElement(String ns, String localName, String qName, Attributes attrs) throws SAXException {
+ public void startElement(String ns, String localName, String qName, Attributes attrs) {
if ( !ns.equals(namespace) ) {
// Wrong namespace
return ;
@@ -208,7 +208,7 @@ public void startElement(String ns, String localName, String qName, Attributes a
}
@Override
- public void endElement(String ns, String localName, String qName) throws SAXException {
+ public void endElement(String ns, String localName, String qName) {
if ( !ns.equals(namespace) ) {
// Wrong namespace
return ;
@@ -357,7 +357,7 @@ private void endAccumulate() {
}
@Override
- public void characters(char[] chars, int start, int finish) throws SAXException {
+ public void characters(char[] chars, int start, int finish) {
if ( accumulate ) {
if ( buff == null )
buff = new StringBuffer() ;
@@ -366,12 +366,12 @@ public void characters(char[] chars, int start, int finish) throws SAXException
}
@Override
- public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {}
+ public void ignorableWhitespace(char[] ch, int start, int length) {}
@Override
- public void processingInstruction(String target, String data) throws SAXException {}
+ public void processingInstruction(String target, String data) {}
@Override
- public void skippedEntity(String name) throws SAXException {}
+ public void skippedEntity(String name) {}
}
}
diff --git a/jena-arq/src/main/java/org/apache/jena/web/DatasetGraphAccessorHTTP.java b/jena-arq/src/main/java/org/apache/jena/web/DatasetGraphAccessorHTTP.java
index b2781b9d891..568d8321a4c 100644
--- a/jena-arq/src/main/java/org/apache/jena/web/DatasetGraphAccessorHTTP.java
+++ b/jena-arq/src/main/java/org/apache/jena/web/DatasetGraphAccessorHTTP.java
@@ -18,7 +18,6 @@
package org.apache.jena.web ;
-import java.io.IOException ;
import java.io.OutputStream ;
import org.apache.http.HttpEntity ;
@@ -239,7 +238,7 @@ protected HttpEntity graphToHttpEntity(final Graph graph) {
final RDFFormat syntax = getOutboundSyntax() ;
ContentProducer producer = new ContentProducer() {
@Override
- public void writeTo(OutputStream out) throws IOException {
+ public void writeTo(OutputStream out) {
RDFDataMgr.write(out, graph, syntax) ;
}
} ;
diff --git a/jena-arq/src/main/java/riotcmd/utf8.java b/jena-arq/src/main/java/riotcmd/utf8.java
index 2b6698516ca..52044f6ab17 100644
--- a/jena-arq/src/main/java/riotcmd/utf8.java
+++ b/jena-arq/src/main/java/riotcmd/utf8.java
@@ -18,7 +18,6 @@
package riotcmd;
-import java.io.IOException ;
import java.io.InputStream ;
import org.apache.jena.atlas.AtlasException ;
@@ -73,10 +72,6 @@ public static void main(String[] args)
{
System.out.printf(label+"[line=%d, col=%d] %s\n", lineNum, colNum, ex.getMessage()) ;
}
- catch (IOException ex)
- {
- ex.printStackTrace(System.err) ;
- }
finally { IO.close(utf8) ; }
}
}
diff --git a/jena-arq/src/test/java/org/apache/jena/riot/lang/TestPipedRDFIterators.java b/jena-arq/src/test/java/org/apache/jena/riot/lang/TestPipedRDFIterators.java
index aaff63ddb06..9a37f8ba537 100644
--- a/jena-arq/src/test/java/org/apache/jena/riot/lang/TestPipedRDFIterators.java
+++ b/jena-arq/src/test/java/org/apache/jena/riot/lang/TestPipedRDFIterators.java
@@ -93,7 +93,7 @@ public void run() {
Callable consumeTriples = new Callable() {
@Override
- public Integer call() throws Exception {
+ public Integer call() {
int count = 0;
while (it.hasNext()) {
it.next();
@@ -238,7 +238,7 @@ public void run() {
Callable consumeQuads = new Callable() {
@Override
- public Integer call() throws Exception {
+ public Integer call() {
int count = 0;
while (it.hasNext()) {
it.next();
@@ -408,7 +408,7 @@ public void run() {
Callable consumeTriples = new Callable() {
@Override
- public Integer call() throws Exception {
+ public Integer call() {
int count = 0;
while (it.hasNext()) {
it.next();
diff --git a/jena-arq/src/test/java/org/apache/jena/riot/system/TestIO_JenaReaders.java b/jena-arq/src/test/java/org/apache/jena/riot/system/TestIO_JenaReaders.java
index 4bb3a4b39d6..d3424b9f17f 100644
--- a/jena-arq/src/test/java/org/apache/jena/riot/system/TestIO_JenaReaders.java
+++ b/jena-arq/src/test/java/org/apache/jena/riot/system/TestIO_JenaReaders.java
@@ -54,7 +54,7 @@ public Properties getLangToClassName() {
}
@Test
- public void wireIntoJena() throws Exception {
+ public void wireIntoJena() {
IO_JenaReaders.wireIntoJena();
RDFReaderFImpl readerF = new RDFReaderFImpl();
assertEquals(RDFReaderRIOT_Web.class, readerF.getReader().getClass());
@@ -74,7 +74,7 @@ public void wireIntoJena() throws Exception {
}
@Test
- public void resetJena() throws Exception {
+ public void resetJena() {
IO_JenaReaders.wireIntoJena();
IO_JenaReaders.resetJena();
RDFReaderFImplExposingProtected readerF = new RDFReaderFImplExposingProtected();
diff --git a/jena-arq/src/test/java/org/apache/jena/riot/system/TestIO_JenaWriters.java b/jena-arq/src/test/java/org/apache/jena/riot/system/TestIO_JenaWriters.java
index af643ef329e..b7c71a3b371 100644
--- a/jena-arq/src/test/java/org/apache/jena/riot/system/TestIO_JenaWriters.java
+++ b/jena-arq/src/test/java/org/apache/jena/riot/system/TestIO_JenaWriters.java
@@ -62,7 +62,7 @@ public Properties getLangToClassName() {
}
@Test
- public void testWireIntoJena() throws Exception {
+ public void testWireIntoJena() {
IO_JenaWriters.wireIntoJena();
RDFWriterFImpl writerF = new RDFWriterFImpl();
assertEquals(Basic.class, writerF.getWriter().getClass());
@@ -88,7 +88,7 @@ public void testWireIntoJena() throws Exception {
}
@Test
- public void testResetJena() throws Exception {
+ public void testResetJena() {
IO_JenaWriters.wireIntoJena();
IO_JenaWriters.resetJena();
RDFWriterFImplExposingProtected writerF = new RDFWriterFImplExposingProtected();
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/core/TestDatasetGraphWithLock.java b/jena-arq/src/test/java/org/apache/jena/sparql/core/TestDatasetGraphWithLock.java
index 7cb3a6dcf27..e2f678fd99e 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/core/TestDatasetGraphWithLock.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/core/TestDatasetGraphWithLock.java
@@ -53,7 +53,7 @@ public synchronized void dsg_with_lock_concurrency_01() throws InterruptedExcept
Callable callable = new Callable() {
@Override
- public Boolean call() throws Exception {
+ public Boolean call() {
dsg.begin(ReadWrite.READ);
// Hold the lock for a few seconds
@@ -89,7 +89,7 @@ public synchronized void dsg_with_lock_concurrency_02() throws InterruptedExcept
Callable callable = new Callable() {
@Override
- public Boolean call() throws Exception {
+ public Boolean call() {
dsg.begin(ReadWrite.READ);
// Hold the lock for a few seconds
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/engine/index/TestIndexTable.java b/jena-arq/src/test/java/org/apache/jena/sparql/engine/index/TestIndexTable.java
index aecdae3bea2..50c1409b0e4 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/engine/index/TestIndexTable.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/engine/index/TestIndexTable.java
@@ -142,7 +142,7 @@ public void testHashIndexTableData() throws Exception
}
@Test
- public void testLinearIndexTableData() throws Exception
+ public void testLinearIndexTableData()
{
// test twice with different internal mappings
testTableData(IndexFactory.createIndex(order1, partData())) ;
@@ -160,7 +160,7 @@ public void testLinearIndexTableData() throws Exception
testTableData(new LinearIndex(order2, partData(), emptyKeys, emptyMapping)) ;
}
- private void testTableData(IndexTable index) throws Exception
+ private void testTableData(IndexTable index)
{
// positive test for matching
for ( Binding b: fData )
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/junit/EarlTestCase.java b/jena-arq/src/test/java/org/apache/jena/sparql/junit/EarlTestCase.java
index 9e0195929f8..27d0519f80f 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/junit/EarlTestCase.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/junit/EarlTestCase.java
@@ -100,18 +100,18 @@ final protected void runTest() throws Throwable
// Increase visibility.
@Override
- protected void setUp() throws Exception {
+ protected void setUp() {
setUpTest() ;
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() {
tearDownTest() ;
}
// Decouple from JUnit3.
- public void setUpTest() throws Exception {}
- public void tearDownTest() throws Exception {}
+ public void setUpTest() {}
+ public void tearDownTest() {}
protected void success()
{
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/junit/QueryTest.java b/jena-arq/src/test/java/org/apache/jena/sparql/junit/QueryTest.java
index 958f6318369..bd84c3a91e9 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/junit/QueryTest.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/junit/QueryTest.java
@@ -67,7 +67,7 @@ public QueryTest(String testName, EarlReport earl, TestItem t)
private boolean oldPlainGraphFlag ;
@Override
- public void setUpTest() throws Exception
+ public void setUpTest()
{
super.setUpTest() ;
// SPARQL and ARQ tests are done with no value matching (for query execution and results testing)
@@ -82,7 +82,7 @@ public void setUpTest() throws Exception
}
@Override
- public void tearDownTest() throws Exception
+ public void tearDownTest()
{
SystemARQ.UsePlainGraph = oldPlainGraphFlag ;
CheckerLiterals.WarnOnBadLiterals = oldWarningFlag ;
@@ -184,7 +184,7 @@ else if ( query.isAskType() )
}
}
- void runTestSelect(Query query, QueryExecution qe) throws Exception
+ void runTestSelect(Query query, QueryExecution qe)
{
// Do the query!
ResultSetRewindable resultsActual = ResultSetFactory.makeRewindable(qe.execSelect()) ;
@@ -310,7 +310,7 @@ public static boolean resultSetEquivalent(Query query, ResultSetRewindable resul
}
}
- void runTestConstruct(Query query, QueryExecution qe) throws Exception
+ void runTestConstruct(Query query, QueryExecution qe)
{
// Do the query!
Model resultsActual = qe.execConstruct() ;
@@ -339,7 +339,7 @@ private void compareGraphResults(Model resultsActual, Query query)
}
}
- void runTestDescribe(Query query, QueryExecution qe) throws Exception
+ void runTestDescribe(Query query, QueryExecution qe)
{
Model resultsActual = qe.execDescribe() ;
compareGraphResults(resultsActual, query) ;
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/junit/SurpressedTest.java b/jena-arq/src/test/java/org/apache/jena/sparql/junit/SurpressedTest.java
index 3280ea03583..4a4d0a81c60 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/junit/SurpressedTest.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/junit/SurpressedTest.java
@@ -31,7 +31,7 @@ public SurpressedTest(String testName, EarlReport report, TestItem testItem)
}
@Override
- protected void runTestForReal() throws Throwable
+ protected void runTestForReal()
{
super.notTested() ;
if ( verbose )
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/junit/SyntaxTest.java b/jena-arq/src/test/java/org/apache/jena/sparql/junit/SyntaxTest.java
index 94ed6ffd4ce..84a2e4a5ad9 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/junit/SyntaxTest.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/junit/SyntaxTest.java
@@ -57,7 +57,7 @@ private void setTest(String testName, String _queryString, boolean positiveTest)
@Override
- protected void runTestForReal() throws Throwable
+ protected void runTestForReal()
{
try {
if ( queryString == null )
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/junit/SyntaxUpdateTest.java b/jena-arq/src/test/java/org/apache/jena/sparql/junit/SyntaxUpdateTest.java
index 5e84475d5c7..eec627da213 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/junit/SyntaxUpdateTest.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/junit/SyntaxUpdateTest.java
@@ -55,7 +55,7 @@ private void setTest(String testName, String _queryString, boolean positiveTest)
@Override
- protected void runTestForReal() throws Throwable
+ protected void runTestForReal()
{
try {
if ( updateString == null )
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/junit/TestSerialization.java b/jena-arq/src/test/java/org/apache/jena/sparql/junit/TestSerialization.java
index 0031bec931a..ad3b8ea0266 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/junit/TestSerialization.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/junit/TestSerialization.java
@@ -57,7 +57,7 @@ public TestSerialization(String testName, EarlReport earl, TestItem t)
// Are they equal?
@Override
- protected void runTestForReal() throws Throwable
+ protected void runTestForReal()
{
Query query = null ;
if ( queryString == null )
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/junit/UpdateTest.java b/jena-arq/src/test/java/org/apache/jena/sparql/junit/UpdateTest.java
index da84ff80354..20dffe7aebf 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/junit/UpdateTest.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/junit/UpdateTest.java
@@ -81,7 +81,7 @@ private UpdateTest(String testName, EarlReport earl, Resource entry, Resource ac
private boolean oldWarningFlag ;
@Override
- public void setUpTest() throws Exception
+ public void setUpTest()
{
super.setUpTest() ;
// Turn parser warnings off for the test data.
@@ -92,7 +92,7 @@ public void setUpTest() throws Exception
}
@Override
- public void tearDownTest() throws Exception
+ public void tearDownTest()
{
// if ( resetNeeded )
// ARQ.setFalse(ARQ.strictGraph) ;
@@ -103,7 +103,7 @@ public void tearDownTest() throws Exception
}
@Override
- protected void runTestForReal() throws Throwable
+ protected void runTestForReal()
{
try {
UpdateRequest request = UpdateFactory.read(updateFile, Syntax.syntaxSPARQL_11) ;
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/util/TestFmtUtils.java b/jena-arq/src/test/java/org/apache/jena/sparql/util/TestFmtUtils.java
index 1e5b0333b6a..1ff802eb84b 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/util/TestFmtUtils.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/util/TestFmtUtils.java
@@ -87,7 +87,7 @@ public void formatPattern_2_triples() {
}
@Test
- public void stringForObject_misc_versions() throws Exception {
+ public void stringForObject_misc_versions() {
assertEquals("<>", FmtUtils.stringForObject(null)) ;
assertEquals("", FmtUtils.stringForObject(new LiteralImpl(aNode(), null))) ;
assertEquals("", FmtUtils.stringForObject(new ResourceImpl(NodeFactory.createURI("nzz1"), null))) ;
@@ -130,7 +130,7 @@ public void booleanLiteral() throws Exception {
}
@Test
- public void stringForRDFNode_resource() throws Exception {
+ public void stringForRDFNode_resource() {
final ResourceImpl rdfNod = new ResourceImpl(aUriRemappableNode(), null) ;
assertEquals("zz:abs", stringForRDFNode(rdfNod, getContext())) ;
}
@@ -160,7 +160,7 @@ public void anyNode() {
}
@Test
- public void testStringForURI() throws Exception {
+ public void testStringForURI() {
final String s = FmtUtils.stringForURI("zz:ü_fe-zz") ;
assertEquals("", s) ;
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/io/BufferingWriter.java b/jena-base/src/main/java/org/apache/jena/atlas/io/BufferingWriter.java
index b17e9305f61..214a48a95d2 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/io/BufferingWriter.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/io/BufferingWriter.java
@@ -154,27 +154,27 @@ public void flush() {
}
@Override
- public void write(char[] cbuf, int off, int len) throws IOException {
+ public void write(char[] cbuf, int off, int len) {
output(cbuf, off, len) ;
}
@Override
- public void write(char[] cbuf) throws IOException {
+ public void write(char[] cbuf) {
write(cbuf, 0, cbuf.length) ;
}
@Override
- public void write(String string, int off, int len) throws IOException {
+ public void write(String string, int off, int len) {
output(string, off, len) ;
}
@Override
- public void write(String string) throws IOException {
+ public void write(String string) {
output(string, 0, string.length()) ;
}
@Override
- public void write(int ch) throws IOException {
+ public void write(int ch) {
output((char)ch) ;
}
}
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/io/CharStreamReader.java b/jena-base/src/main/java/org/apache/jena/atlas/io/CharStreamReader.java
index d7dce1160f7..f1d54b11b89 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/io/CharStreamReader.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/io/CharStreamReader.java
@@ -18,14 +18,13 @@
package org.apache.jena.atlas.io;
-import java.io.IOException ;
import java.io.Reader ;
/** Machinary to add Reader functionality to a CharStream */
public abstract class CharStreamReader extends Reader implements CharStream
{
@Override
- public int read(char[] cbuf, int off, int len) throws IOException
+ public int read(char[] cbuf, int off, int len)
{
for ( int i = 0 ; i < len ; i++ )
{
@@ -38,14 +37,14 @@ public int read(char[] cbuf, int off, int len) throws IOException
}
@Override
- public int read() throws IOException
+ public int read()
{
return advance() ;
}
@Override
- public void close() throws IOException
+ public void close()
{ closeStream() ; }
@Override
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/io/InStreamASCII.java b/jena-base/src/main/java/org/apache/jena/atlas/io/InStreamASCII.java
index 394fd91af05..617fbdfcce6 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/io/InStreamASCII.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/io/InStreamASCII.java
@@ -56,7 +56,7 @@ public void closeStream()
{ IO.close(input) ; }
@Override
- public int read(char[] cbuf, int off, int len) throws IOException
+ public int read(char[] cbuf, int off, int len)
{
for ( int i = off ; i < off+len ; i++ )
{
@@ -75,7 +75,7 @@ public int read(char[] cbuf, int off, int len) throws IOException
}
@Override
- public int read() throws IOException
+ public int read()
{ return advance() ; }
@Override
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/io/InStreamUTF8.java b/jena-base/src/main/java/org/apache/jena/atlas/io/InStreamUTF8.java
index 17b6883b518..a1d42c15d61 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/io/InStreamUTF8.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/io/InStreamUTF8.java
@@ -113,7 +113,7 @@ public void closeStream()
{ IO.close(input) ; }
@Override
- public int read(char[] cbuf, int off, int len) throws IOException
+ public int read(char[] cbuf, int off, int len)
{
// Doing this on a block of bytes may be faster.
for ( int i = off ; i < off+len ; i++ )
@@ -131,7 +131,7 @@ public int read(char[] cbuf, int off, int len) throws IOException
}
@Override
- public final int read() throws IOException
+ public final int read()
{
int ch = advance(input) ;
//if ( ! Character.isDefined(ch) ) throw new AtlasException(String.format("Undefined codepoint: 0x%04X", ch)) ;
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/io/InputStreamBuffered.java b/jena-base/src/main/java/org/apache/jena/atlas/io/InputStreamBuffered.java
index 9b5ae29644b..2fac9b46f97 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/io/InputStreamBuffered.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/io/InputStreamBuffered.java
@@ -57,7 +57,7 @@ public InputStreamBuffered(InputStream input, int bufsize)
// }
@Override
- public int read() throws IOException
+ public int read()
{
return advance() ;
}
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/io/PeekInputStream.java b/jena-base/src/main/java/org/apache/jena/atlas/io/PeekInputStream.java
index 4a6403ce728..a1c7c7a7030 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/io/PeekInputStream.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/io/PeekInputStream.java
@@ -134,7 +134,7 @@ public final void close() throws IOException
}
@Override
- public final int read() throws IOException
+ public final int read()
{
if ( eof() )
return EOF ;
@@ -143,7 +143,7 @@ public final int read() throws IOException
}
@Override
- public final int read(byte[] buf, int off, int len) throws IOException
+ public final int read(byte[] buf, int off, int len)
{
if ( eof() )
return EOF ;
@@ -192,10 +192,8 @@ private final void init()
private final void advanceAndSet()
{
- try {
- int ch = source.read() ;
- setCurrByte(ch) ;
- } catch (IOException ex) { IO.exception(ex) ; }
+ int ch = source.read() ;
+ setCurrByte(ch) ;
}
diff --git a/jena-base/src/main/java/org/apache/jena/atlas/io/PeekReader.java b/jena-base/src/main/java/org/apache/jena/atlas/io/PeekReader.java
index 79e0d8c9939..cbb0cb671ea 100644
--- a/jena-base/src/main/java/org/apache/jena/atlas/io/PeekReader.java
+++ b/jena-base/src/main/java/org/apache/jena/atlas/io/PeekReader.java
@@ -165,12 +165,12 @@ public final void pushbackChar(int ch) {
// Reader operations
@Override
- public final void close() throws IOException {
+ public final void close() {
source.closeStream() ;
}
@Override
- public final int read() throws IOException {
+ public final int read() {
if ( eof() )
return EOF ;
int x = readChar() ;
@@ -178,7 +178,7 @@ public final int read() throws IOException {
}
@Override
- public final int read(char[] cbuf, int off, int len) throws IOException {
+ public final int read(char[] cbuf, int off, int len) {
if ( eof() )
return EOF ;
// Note - we need to preserve line count
diff --git a/jena-base/src/test/java/org/apache/jena/atlas/lib/TestDateTimeUtils.java b/jena-base/src/test/java/org/apache/jena/atlas/lib/TestDateTimeUtils.java
index 8aae32b160d..193b0a5355e 100644
--- a/jena-base/src/test/java/org/apache/jena/atlas/lib/TestDateTimeUtils.java
+++ b/jena-base/src/test/java/org/apache/jena/atlas/lib/TestDateTimeUtils.java
@@ -29,7 +29,7 @@
public class TestDateTimeUtils {
@Test
- public void testCalendarToXSDDateTimeString_1() throws Exception {
+ public void testCalendarToXSDDateTimeString_1() {
Calendar cal = createCalendar(1984, Calendar.MARCH, 22, 14, 32, 1, 0, "Z") ;
assertEquals("1984-03-22T14:32:01+00:00", DateTimeUtils.calendarToXSDDateTimeString(cal));
cal.setTimeZone(TimeZone.getTimeZone("MST"));
@@ -37,7 +37,7 @@ public void testCalendarToXSDDateTimeString_1() throws Exception {
}
@Test
- public void testCalendarToXSDDateTimeString_2() throws Exception {
+ public void testCalendarToXSDDateTimeString_2() {
Calendar cal = createCalendar(1984, Calendar.MARCH, 22, 14, 32, 1, 50, "Z") ;
assertEquals("1984-03-22T14:32:01.050+00:00", DateTimeUtils.calendarToXSDDateTimeString(cal));
cal.setTimeZone(TimeZone.getTimeZone("MST"));
@@ -46,7 +46,7 @@ public void testCalendarToXSDDateTimeString_2() throws Exception {
@Test
- public void testCalendarToXSDDateString() throws Exception {
+ public void testCalendarToXSDDateString() {
Calendar cal = createCalendar(1984, Calendar.MARCH, 22, 23, 59, 1, 0, "Z");
cal.setTimeZone(TimeZone.getTimeZone("Z")) ;
assertEquals("1984-03-22+00:00", DateTimeUtils.calendarToXSDDateString(cal));
@@ -55,7 +55,7 @@ public void testCalendarToXSDDateString() throws Exception {
}
@Test
- public void testCalendarToXSDTimeString_1() throws Exception {
+ public void testCalendarToXSDTimeString_1() {
Calendar cal = createCalendar(1984, Calendar.MARCH, 22, 14, 32, 1, 0, "GMT+01:00");
assertEquals("14:32:01+01:00", DateTimeUtils.calendarToXSDTimeString(cal));
// Different timezone - moves the cal point-in-time.
@@ -64,7 +64,7 @@ public void testCalendarToXSDTimeString_1() throws Exception {
}
@Test
- public void testCalendarToXSDTimeString_2() throws Exception {
+ public void testCalendarToXSDTimeString_2() {
Calendar cal = createCalendar(1984, Calendar.MARCH, 22, 14, 32, 1, 500, "GMT+01:00");
assertEquals("14:32:01.500+01:00", DateTimeUtils.calendarToXSDTimeString(cal));
// Different timezone - moves the cal point-in-time.
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/StAX2SAX.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/StAX2SAX.java
index a4e0c3cb6b9..aea43c2486c 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/StAX2SAX.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/StAX2SAX.java
@@ -185,18 +185,18 @@ static class LocatorConv implements Locator {
final static LexicalHandler NO_LEXICAL_HANDLER = new LexicalHandler() {
@Override
- public void startDTD(String string, String string1, String string2) throws SAXException {}
+ public void startDTD(String string, String string1, String string2) {}
@Override
- public void endDTD() throws SAXException {}
+ public void endDTD() {}
@Override
- public void startEntity(String string) throws SAXException {}
+ public void startEntity(String string) {}
@Override
- public void endEntity(String string) throws SAXException {}
+ public void endEntity(String string) {}
@Override
- public void startCDATA() throws SAXException {}
+ public void startCDATA() {}
@Override
- public void endCDATA() throws SAXException {}
+ public void endCDATA() {}
@Override
- public void comment(char[] chars, int i, int i1) throws SAXException {}
+ public void comment(char[] chars, int i, int i1) {}
};
}
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/ARPDatatypeLiteral.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/ARPDatatypeLiteral.java
index 19af900b690..f62521c199a 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/ARPDatatypeLiteral.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/ARPDatatypeLiteral.java
@@ -27,7 +27,7 @@ public class ARPDatatypeLiteral extends TaintImpl implements ALiteral {
final private String datatype;
final private String lexForm;
- public ARPDatatypeLiteral(Frame f, String lexf,URIReference dt) throws SAXParseException{
+ public ARPDatatypeLiteral(Frame f, String lexf,URIReference dt) throws SAXParseException {
f.checkString(this,lexf);
datatype = dt.getURI();
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/ARPSaxErrorHandler.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/ARPSaxErrorHandler.java
index cf8d887ce2e..d760c9ab80b 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/ARPSaxErrorHandler.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/ARPSaxErrorHandler.java
@@ -19,7 +19,6 @@
package org.apache.jena.rdfxml.xmlinput.impl;
import org.apache.jena.rdf.model.RDFErrorHandler ;
-import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
/**
* This class is not part of the API.
@@ -33,17 +32,17 @@ public ARPSaxErrorHandler(RDFErrorHandler errorHandler) {
}
@Override
- public void error(SAXParseException e) throws SAXException {
+ public void error(SAXParseException e) {
errorHandler.error(e);
}
@Override
- public void warning(SAXParseException e) throws SAXException {
+ public void warning(SAXParseException e) {
errorHandler.warning(e);
}
@Override
- public void fatalError(SAXParseException e) throws SAXException {
+ public void fatalError(SAXParseException e) {
errorHandler.fatalError(e);
}
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/DefaultErrorHandler.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/DefaultErrorHandler.java
index f0680f00823..dd68037ebab 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/DefaultErrorHandler.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/DefaultErrorHandler.java
@@ -36,7 +36,7 @@ public DefaultErrorHandler() {
}
@Override
- public void error(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException {
+ public void error(org.xml.sax.SAXParseException e) {
System.err.println("Error: " + ParseException.formatMessage(e));
}
@@ -47,7 +47,7 @@ public void fatalError(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXEx
}
@Override
- public void warning(org.xml.sax.SAXParseException e) throws org.xml.sax.SAXException {
+ public void warning(org.xml.sax.SAXParseException e) {
System.err.println("Warning: " + ParseException.formatMessage(e));
// e.printStackTrace();
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/LexicalHandlerImpl.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/LexicalHandlerImpl.java
index edfd6fab327..9428298c150 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/LexicalHandlerImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/LexicalHandlerImpl.java
@@ -18,7 +18,7 @@
package org.apache.jena.rdfxml.xmlinput.impl;
-import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
import org.xml.sax.ext.LexicalHandler;
import org.xml.sax.helpers.DefaultHandler;
@@ -31,50 +31,49 @@ class LexicalHandlerImpl extends DefaultHandler implements LexicalHandler {
* @see org.xml.sax.ext.LexicalHandler#endCDATA()
*/
@Override
- public void endCDATA() throws SAXException {
+ public void endCDATA() {
}
/* (non-Javadoc)
* @see org.xml.sax.ext.LexicalHandler#endDTD()
*/
@Override
- public void endDTD() throws SAXException {
+ public void endDTD() {
}
/* (non-Javadoc)
* @see org.xml.sax.ext.LexicalHandler#startCDATA()
*/
@Override
- public void startCDATA() throws SAXException {
+ public void startCDATA() {
}
/* (non-Javadoc)
* @see org.xml.sax.ext.LexicalHandler#comment(char[], int, int)
*/
@Override
- public void comment(char[] ch, int start, int length) throws SAXException {
+ public void comment(char[] ch, int start, int length) throws SAXParseException {
}
/* (non-Javadoc)
* @see org.xml.sax.ext.LexicalHandler#endEntity(java.lang.String)
*/
@Override
- public void endEntity(String name) throws SAXException {
+ public void endEntity(String name) {
}
/* (non-Javadoc)
* @see org.xml.sax.ext.LexicalHandler#startEntity(java.lang.String)
*/
@Override
- public void startEntity(String name) throws SAXException {
+ public void startEntity(String name) {
}
/* (non-Javadoc)
* @see org.xml.sax.ext.LexicalHandler#startDTD(java.lang.String, java.lang.String, java.lang.String)
*/
@Override
- public void startDTD(String name, String publicId, String systemId)
- throws SAXException {
+ public void startDTD(String name, String publicId, String systemId) {
}
}
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/SAX2RDFImpl.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/SAX2RDFImpl.java
index 05ad68fa9fd..3b5b55724ee 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/SAX2RDFImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/SAX2RDFImpl.java
@@ -47,7 +47,7 @@ protected void initParse(String b) throws SAXParseException {
* @see org.xml.sax.ext.LexicalHandler#endCDATA()
*/
@Override
- public void endCDATA() throws SAXException {
+ public void endCDATA() {
if (depth > 0)
super.endCDATA();
@@ -59,7 +59,7 @@ public void endCDATA() throws SAXException {
* @see org.xml.sax.ext.LexicalHandler#endDTD()
*/
@Override
- public void endDTD() throws SAXException {
+ public void endDTD() {
if (depth > 0)
super.endDTD();
@@ -71,7 +71,7 @@ public void endDTD() throws SAXException {
* @see org.xml.sax.ext.LexicalHandler#startCDATA()
*/
@Override
- public void startCDATA() throws SAXException {
+ public void startCDATA() {
if (depth > 0)
super.startCDATA();
@@ -95,7 +95,7 @@ public void comment(char[] ch, int start, int length) throws SAXParseException {
* @see org.xml.sax.ext.LexicalHandler#endEntity(java.lang.String)
*/
@Override
- public void endEntity(String name) throws SAXException {
+ public void endEntity(String name) {
if (depth > 0)
super.endEntity(name);
@@ -107,7 +107,7 @@ public void endEntity(String name) throws SAXException {
* @see org.xml.sax.ext.LexicalHandler#startEntity(java.lang.String)
*/
@Override
- public void startEntity(String name) throws SAXException {
+ public void startEntity(String name) {
if (depth > 0)
super.startEntity(name);
@@ -120,8 +120,7 @@ public void startEntity(String name) throws SAXException {
* java.lang.String, java.lang.String)
*/
@Override
- public void startDTD(String name, String publicId, String systemId)
- throws SAXException {
+ public void startDTD(String name, String publicId, String systemId) {
if (depth > 0)
super.startDTD(name, publicId, systemId);
diff --git a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/XMLHandler.java b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/XMLHandler.java
index 5975a0ea24b..5ba86e97b55 100644
--- a/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/XMLHandler.java
+++ b/jena-core/src/main/java/org/apache/jena/rdfxml/xmlinput/impl/XMLHandler.java
@@ -152,8 +152,7 @@ Object getUserData(String nodeId) {
}
@Override
- public void comment(char[] ch, int start, int length)
- throws SAXParseException {
+ public void comment(char[] ch, int start, int length) throws SAXParseException {
frame.comment(ch, start, length);
}
diff --git a/jena-core/src/test/java/org/apache/jena/graph/test/TestTypedLiterals.java b/jena-core/src/test/java/org/apache/jena/graph/test/TestTypedLiterals.java
index 7f5b6744e96..9b3c8e27dfe 100644
--- a/jena-core/src/test/java/org/apache/jena/graph/test/TestTypedLiterals.java
+++ b/jena-core/src/test/java/org/apache/jena/graph/test/TestTypedLiterals.java
@@ -1018,11 +1018,11 @@ public void testDateTimeBug() {
checkSerialization("---12", XSDDatatype.XSDgDay);
}
- private static Date getDateFromPattern(String ts, String format, String timezoneid) throws Exception {
+ private static Date getDateFromPattern(String ts, String format, String timezoneid) {
return getDateFromPattern(ts, new String[]{format}, TimeZone.getTimeZone(timezoneid));
}
- private static Date getDateFromPattern(String ts, String[] formats, TimeZone tz) throws Exception {
+ private static Date getDateFromPattern(String ts, String[] formats, TimeZone tz) {
java.util.Date date = null;
java.text.DateFormat sdf = java.text.DateFormat.getInstance();
{
diff --git a/jena-core/src/test/java/org/apache/jena/ontology/impl/TestAllDifferent.java b/jena-core/src/test/java/org/apache/jena/ontology/impl/TestAllDifferent.java
index 6ac2fd025c8..133ab0ad5eb 100644
--- a/jena-core/src/test/java/org/apache/jena/ontology/impl/TestAllDifferent.java
+++ b/jena-core/src/test/java/org/apache/jena/ontology/impl/TestAllDifferent.java
@@ -66,7 +66,7 @@ public OntTestCase[] getTests() {
return new OntTestCase[] {
new OntTestCase( "AllDifferent.distinctMembers", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
AllDifferent a = m.createAllDifferent();
OntResource b = m.getResource( NS + "b" ).as( OntResource.class );
diff --git a/jena-core/src/test/java/org/apache/jena/ontology/impl/TestClassExpression.java b/jena-core/src/test/java/org/apache/jena/ontology/impl/TestClassExpression.java
index a3e035cf57d..5a7923e6713 100644
--- a/jena-core/src/test/java/org/apache/jena/ontology/impl/TestClassExpression.java
+++ b/jena-core/src/test/java/org/apache/jena/ontology/impl/TestClassExpression.java
@@ -69,7 +69,7 @@ public OntTestCase[] getTests() {
return new OntTestCase[] {
new OntTestCase( "OntClass.super-class", true, true, true ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
OntClass A = m.createClass( NS + "A" );
OntClass B = m.createClass( NS + "B" );
@@ -96,7 +96,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "OntClass.sub-class", true, true, true ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
OntClass A = m.createClass( NS + "A" );
OntClass B = m.createClass( NS + "B" );
@@ -123,7 +123,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "OntClass.equivalentClass", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
OntClass A = m.createClass( NS + "A" );
OntClass B = m.createClass( NS + "B" );
@@ -150,7 +150,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "OntClass.disjointWith", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
OntClass A = m.createClass( NS + "A" );
OntClass B = m.createClass( NS + "B" );
@@ -177,7 +177,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "EnumeratedClass.oneOf", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
EnumeratedClass A = m.createEnumeratedClass( NS + "A", null );
OntResource a = m.getResource( NS + "a" ).as( OntResource.class );
@@ -207,7 +207,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "IntersectionClass.intersectionOf", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
IntersectionClass A = m.createIntersectionClass( NS + "A", null );
OntClass B = m.createClass( NS + "B" );
@@ -241,7 +241,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "UnionClass.unionOf", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
UnionClass A = m.createUnionClass( NS + "A", null );
OntClass B = m.createClass( NS + "B" );
@@ -275,7 +275,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "ComplementClass.complementOf", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
ComplementClass A = m.createComplementClass( NS + "A", null );
OntClass B = m.createClass( NS + "B" );
@@ -311,7 +311,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "Restriction.onProperty", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
OntProperty p = m.createObjectProperty( NS + "p" );
OntProperty q = m.createObjectProperty( NS + "q" );
@@ -339,7 +339,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "AllValuesFromRestriction.allValuesFrom", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
OntProperty p = m.createObjectProperty( NS + "p" );
OntClass B = m.createClass( NS + "B" );
@@ -367,7 +367,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "AllValuesFromRestriction.allValuesFrom.datatype", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
OntProperty p = m.createObjectProperty( NS + "p" );
@@ -393,7 +393,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "AllValuesFromRestriction.allValuesFrom.literal", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
OntProperty p = m.createObjectProperty( NS + "p" );
@@ -407,7 +407,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "AllValuesFromRestriction.allValuesFrom.datarange", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
Literal x = m.createTypedLiteral( 1 );
Literal y = m.createTypedLiteral( 2 );
@@ -430,7 +430,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "HasValueRestriction.hasValue", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
OntProperty p = m.createObjectProperty( NS + "p" );
OntClass B = m.createClass( NS + "B" );
@@ -462,7 +462,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "SomeValuesFromRestriction.someValuesFrom", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
OntProperty p = m.createObjectProperty( NS + "p" );
OntClass B = m.createClass( NS + "B" );
@@ -490,7 +490,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "SomeValuesFromRestriction.SomeValuesFrom.datatype", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
OntProperty p = m.createObjectProperty( NS + "p" );
@@ -516,7 +516,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "SomeValuesFromRestriction.SomeValuesFrom.literal", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
OntProperty p = m.createObjectProperty( NS + "p" );
@@ -530,7 +530,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "SomeValuesFromRestriction.SomeValuesFrom.datarange", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
Literal x = m.createTypedLiteral( 1 );
Literal y = m.createTypedLiteral( 2 );
@@ -553,7 +553,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "CardinalityRestriction.cardinality", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
OntProperty p = m.createObjectProperty( NS + "p" );
@@ -580,7 +580,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "MinCardinalityRestriction.minCardinality", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
OntProperty p = m.createObjectProperty( NS + "p" );
@@ -607,7 +607,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "MaxCardinalityRestriction.maxCardinality", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
OntProperty p = m.createObjectProperty( NS + "p" );
@@ -634,7 +634,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "QualifiedRestriction.hasClassQ", false, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntProperty p = m.createObjectProperty( NS + "p" );
OntClass c = m.createClass( NS + "C" );
OntClass d = m.createClass( NS + "D" );
@@ -659,7 +659,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "CardinalityQRestriction.cardinality", false, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntProperty p = m.createObjectProperty( NS + "p" );
OntClass c = m.createClass( NS + "C" );
@@ -682,7 +682,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "MinCardinalityQRestriction.minCardinality", false, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntProperty p = m.createObjectProperty( NS + "p" );
OntClass c = m.createClass( NS + "C" );
@@ -705,7 +705,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "MaxCardinalityQRestriction.maxCardinality", false, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntProperty p = m.createObjectProperty( NS + "p" );
OntClass c = m.createClass( NS + "C" );
@@ -730,7 +730,7 @@ public void ontTest( OntModel m ) throws Exception {
// from file
new OntTestCase( "OntClass.subclass.fromFile", true, true, true ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
String lang = m_owlLang ? "owl" : "rdfs" ;
String fileName = "file:testing/ontology/" + lang + "/ClassExpression/test.rdf";
m.read( fileName );
@@ -744,7 +744,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "OntClass.equivalentClass.fromFile", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
String lang = m_owlLang ? "owl" : "rdfs" ;
String fileName = "file:testing/ontology/" + lang + "/ClassExpression/test.rdf";
m.read( fileName );
@@ -757,7 +757,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "OntClass.disjoint.fromFile", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
String lang = m_owlLang ? "owl" : "rdfs" ;
String fileName = "file:testing/ontology/" + lang + "/ClassExpression/test.rdf";
m.read( fileName );
@@ -772,7 +772,7 @@ public void ontTest( OntModel m ) throws Exception {
// type testing
new OntTestCase( "OntClass.isEnumeratedClass", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntClass b = m.createClass( NS + "B" );
Individual x = m.createIndividual( NS + "x", b );
Individual y = m.createIndividual( NS + "y", b );
@@ -787,7 +787,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "OntClass.isIntersectionClass", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntClass b = m.createClass( NS + "B" );
OntClass c = m.createClass( NS + "C" );
OntClass a = m.createIntersectionClass( NS + "A", m.createList( new RDFNode[] {b,c} ) );
@@ -801,7 +801,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "OntClass.isUnionClass", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntClass b = m.createClass( NS + "B" );
OntClass c = m.createClass( NS + "C" );
OntClass a = m.createUnionClass( NS + "A", m.createList( new RDFNode[] {b,c} ) );
@@ -815,7 +815,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "OntClass.isComplementClass", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntClass b = m.createClass( NS + "B" );
OntClass a = m.createComplementClass( NS + "A", b );
@@ -828,7 +828,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "OntClass.isRestriction", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntClass a = m.createRestriction( null );
assertTrue( "enumerated class test not correct", m_owlLiteLang || !a.isEnumeratedClass() );
@@ -842,7 +842,7 @@ public void ontTest( OntModel m ) throws Exception {
// conversion
new OntTestCase( "OntClass.toEnumeratedClass", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntClass a = m.createClass( NS + "A" );
assertTrue( "enumerated class test not correct", !a.isEnumeratedClass() );
@@ -865,7 +865,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "OntClass.toIntersectionClass", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntClass a = m.createClass( NS + "A" );
assertTrue( "enumerated class test not correct", m_owlLiteLang || !a.isEnumeratedClass() );
@@ -887,7 +887,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "OntClass.toUnionClass", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntClass a = m.createClass( NS + "A" );
assertTrue( "enumerated class test not correct", !a.isEnumeratedClass() );
@@ -909,7 +909,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "OntClass.toComplementClass", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntClass a = m.createClass( NS + "A" );
assertTrue( "enumerated class test not correct", !a.isEnumeratedClass() );
@@ -930,7 +930,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "OntClass.toRestriction", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntClass a = m.createClass( NS + "A" );
assertTrue( "enumerated class test not correct", m_owlLiteLang || !a.isEnumeratedClass() );
@@ -954,7 +954,7 @@ public void ontTest( OntModel m ) throws Exception {
// restriction type testing
new OntTestCase( "Restriction.isAllValuesFrom", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntClass b = m.createClass( NS + "B" );
ObjectProperty p = m.createObjectProperty( NS + "p" );
Restriction a = m.createAllValuesFromRestriction( null, p, b );
@@ -969,7 +969,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "Restriction.isSomeValuesFrom", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntClass b = m.createClass( NS + "B" );
ObjectProperty p = m.createObjectProperty( NS + "p" );
Restriction a = m.createSomeValuesFromRestriction( null, p, b );
@@ -984,7 +984,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "Restriction.isHasValue", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntClass b = m.createClass( NS + "B" );
Individual x = m.createIndividual( b );
ObjectProperty p = m.createObjectProperty( NS + "p" );
@@ -1000,7 +1000,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "Restriction.isCardinality", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
ObjectProperty p = m.createObjectProperty( NS + "p" );
Restriction a = m.createCardinalityRestriction( null, p, 3 );
@@ -1014,7 +1014,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "Restriction.isMinCardinality", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
ObjectProperty p = m.createObjectProperty( NS + "p" );
Restriction a = m.createMinCardinalityRestriction( null, p, 1 );
@@ -1028,7 +1028,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "Restriction.isMaxCardinality", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
ObjectProperty p = m.createObjectProperty( NS + "p" );
Restriction a = m.createMaxCardinalityRestriction( null, p, 5 );
@@ -1044,7 +1044,7 @@ public void ontTest( OntModel m ) throws Exception {
// restriction conversions
new OntTestCase( "Restriction.convertToAllValuesFrom", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
ObjectProperty p = m.createObjectProperty( NS + "p" );
Restriction a = m.createRestriction( p );
@@ -1068,7 +1068,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "Restriction.convertToSomeValuesFrom", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
ObjectProperty p = m.createObjectProperty( NS + "p" );
Restriction a = m.createRestriction( p );
@@ -1092,7 +1092,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "Restriction.convertToHasValue", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
ObjectProperty p = m.createObjectProperty( NS + "p" );
Restriction a = m.createRestriction( p );
@@ -1117,7 +1117,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "Restriction.convertCardinality", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
ObjectProperty p = m.createObjectProperty( NS + "p" );
Restriction a = m.createRestriction( p );
@@ -1140,7 +1140,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "Restriction.convertMinCardinality", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
ObjectProperty p = m.createObjectProperty( NS + "p" );
Restriction a = m.createRestriction( p );
@@ -1163,7 +1163,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "Restriction.convertMaxCardinality", true, true, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
ObjectProperty p = m.createObjectProperty( NS + "p" );
Restriction a = m.createRestriction( p );
@@ -1186,7 +1186,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "OntClass.listInstances", true, true, true ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntClass A = m.createClass( NS + "A" );
OntClass B = m.createClass( NS + "B" );
@@ -1201,7 +1201,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "OntClass.listDefinedProperties", true, true, true ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntClass A = m.createClass( NS + "A" );
//OntClass B = m.createClass( NS + "B" );
OntClass C = m.createClass( NS + "C" );
@@ -1232,7 +1232,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "OntClass.listDefinedProperties.notAll", true, true, true ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
OntClass A = m.createClass( NS + "A" );
OntClass C = m.createClass( NS + "C" );
C.addSuperClass(A);
@@ -1254,7 +1254,7 @@ public void ontTest( OntModel m ) throws Exception {
},
new OntTestCase( "DataRange.oneOf", true, false, false ) {
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Literal x = m.createTypedLiteral( 42 );
Literal y = m.createTypedLiteral( true );
Literal z = m.createTypedLiteral( "life" );
@@ -1289,7 +1289,7 @@ public void ontTest( OntModel m ) throws Exception {
new OntTestCase( "Remove intersection", true, true, false ) {
@Override
- protected void ontTest(OntModel m) throws Exception {
+ protected void ontTest(OntModel m) {
String ns = "http://example.com/foo#";
OntClass a = m.createClass(ns + "A");
OntClass b = m.createClass(ns + "B");
@@ -1305,7 +1305,7 @@ protected void ontTest(OntModel m) throws Exception {
},
new OntTestCase( "Remove union", true, false, false ) {
@Override
- protected void ontTest(OntModel m) throws Exception {
+ protected void ontTest(OntModel m) {
String ns = "http://example.com/foo#";
OntClass a = m.createClass(ns + "A");
OntClass b = m.createClass(ns + "B");
diff --git a/jena-core/src/test/java/org/apache/jena/ontology/impl/TestIndividual.java b/jena-core/src/test/java/org/apache/jena/ontology/impl/TestIndividual.java
index 97c7c3de114..1374aea6676 100644
--- a/jena-core/src/test/java/org/apache/jena/ontology/impl/TestIndividual.java
+++ b/jena-core/src/test/java/org/apache/jena/ontology/impl/TestIndividual.java
@@ -72,7 +72,7 @@ public OntTestCase[] getTests() {
new OntTestCase( "Individual.sameAs", true, false, false ) {
/** Note: 6/Nov/2003 - updated to use sameAs not sameIndividualAs, following changes to OWL spec */
@Override
- public void ontTest( OntModel m ) throws Exception {
+ public void ontTest( OntModel m ) {
Profile prof = m.getProfile();
OntClass A = m.createClass( NS + "A" );
Individual x = m.createIndividual( A );
@@ -101,7 +101,7 @@ public void ontTest( OntModel m ) throws Exception {
new OntTestCase( "Individual.hasOntClass", true, true, true ) {
@Override
- protected void ontTest( OntModel m ) throws Exception {
+ protected void ontTest( OntModel m ) {
OntClass A = m.createClass( NS + "A" );
OntClass B = m.createClass( NS + "B" );
Individual x = m.createIndividual( A );
@@ -113,7 +113,7 @@ protected void ontTest( OntModel m ) throws Exception {
new OntTestCase( "Individual.hasOntClass direct", true, true, true ) {
@Override
- protected void ontTest( OntModel m ) throws Exception {
+ protected void ontTest( OntModel m ) {
OntClass A = m.createClass( NS + "A" );
OntClass B = m.createClass( NS + "B" );
A.addSubClass( B );
@@ -132,7 +132,7 @@ protected void ontTest( OntModel m ) throws Exception {
new OntTestCase( "Individual.hasOntClass string", true, true, true ) {
@Override
- protected void ontTest( OntModel m ) throws Exception {
+ protected void ontTest( OntModel m ) {
OntClass A = m.createClass( NS + "A" );
Individual x = m.createIndividual( A );
@@ -143,7 +143,7 @@ protected void ontTest( OntModel m ) throws Exception {
new OntTestCase( "Individual.getOntClass", true, true, true ) {
@Override
- protected void ontTest( OntModel m ) throws Exception {
+ protected void ontTest( OntModel m ) {
OntClass A = m.createClass( NS + "A" );
Individual x = m.createIndividual( A );
@@ -153,7 +153,7 @@ protected void ontTest( OntModel m ) throws Exception {
new OntTestCase( "Individual.getOntClass direct", true, true, true ) {
@Override
- protected void ontTest( OntModel m ) throws Exception {
+ protected void ontTest( OntModel m ) {
OntClass A = m.createClass( NS + "A" );
OntClass B = m.createClass( NS + "B" );
A.addSubClass( B );
@@ -168,7 +168,7 @@ protected void ontTest( OntModel m ) throws Exception {
new OntTestCase( "Individual.listOntClasses", true, true, true ) {
@Override
- protected void ontTest( OntModel m ) throws Exception {
+ protected void ontTest( OntModel m ) {
OntClass A = m.createClass( NS + "A" );
OntClass B = m.createClass( NS + "B" );
A.addSubClass( B );
@@ -187,7 +187,7 @@ protected void ontTest( OntModel m ) throws Exception {
new OntTestCase( "Individual.listOntClasses direct", true, true, true ) {
@Override
- protected void ontTest( OntModel m ) throws Exception {
+ protected void ontTest( OntModel m ) {
OntClass A = m.createClass( NS + "A" );
OntClass B = m.createClass( NS + "B" );
A.addSubClass( B );
@@ -206,7 +206,7 @@ protected void ontTest( OntModel m ) throws Exception {
new OntTestCase( "Individual.addOntClass", true, true, true ) {
@Override
- protected void ontTest( OntModel m ) throws Exception {
+ protected void ontTest( OntModel m ) {
OntClass A = m.createClass( NS + "A" );
OntClass B = m.createClass( NS + "B" );
A.addSubClass( B );
@@ -228,7 +228,7 @@ protected void ontTest( OntModel m ) throws Exception {
new OntTestCase( "Individual.setOntClass", true, true, true ) {
@Override
- protected void ontTest( OntModel m ) throws Exception {
+ protected void ontTest( OntModel m ) {
OntClass A = m.createClass( NS + "A" );
OntClass B = m.createClass( NS + "B" );
A.addSubClass( B );
@@ -250,7 +250,7 @@ protected void ontTest( OntModel m ) throws Exception {
new OntTestCase( "Individual.removeOntClass", true, true, true ) {
@Override
- protected void ontTest( OntModel m ) throws Exception {
+ protected void ontTest( OntModel m ) {
OntClass A = m.createClass( NS + "A" );
OntClass B = m.createClass( NS + "B" );
@@ -272,7 +272,7 @@ protected void ontTest( OntModel m ) throws Exception {
new OntTestCase( "Individual.canAs", true, true, false ) {
@Override
- protected void ontTest( OntModel m ) throws Exception {
+ protected void ontTest( OntModel m ) {
OntClass A = m.createClass( NS + "A" );
Resource r = m.createResource( NS + "r" );
Resource s = m.createResource( NS + "s" );
@@ -290,7 +290,7 @@ protected void ontTest( OntModel m ) throws Exception {
/** Test case for SF bug 945436 - a xml:lang='' in the dataset causes string index exception in getLabel() */
new OntTestCase( "Individual.canAs", true, true, true ) {
@Override
- protected void ontTest( OntModel m ) throws Exception {
+ protected void ontTest( OntModel m ) {
String SOURCE=
"" +
" wanted,
}
@Override
- public void setUp() throws Exception
+ public void setUp()
{
super.setUp();
SL = new RecordingModelListener();
diff --git a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestModelSetOperations.java b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestModelSetOperations.java
index 58b81f8c73e..997dca8f31b 100644
--- a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestModelSetOperations.java
+++ b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestModelSetOperations.java
@@ -39,14 +39,14 @@ public TestModelSetOperations( final TestingModelFactory modelFactory,
}
@Override
- public void setUp() throws Exception
+ public void setUp()
{
super.setUp();
model2 = createModel();
}
@Override
- public void tearDown() throws Exception
+ public void tearDown()
{
super.tearDown();
model2.close();
diff --git a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestObjectOfProperties.java b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestObjectOfProperties.java
index 2e07a44ce1e..a6794f8bc1d 100644
--- a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestObjectOfProperties.java
+++ b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestObjectOfProperties.java
@@ -120,7 +120,7 @@ private void processIterator( final ResIterator rIter, final boolean[] subjf )
}
@Override
- public void setUp() throws Exception
+ public void setUp()
{
super.setUp();
// tvLitObj = { model.createTypedLiteral(new LitTestObjF()),
diff --git a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestObjects.java b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestObjects.java
index ea149a2f570..eb0a65d9931 100644
--- a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestObjects.java
+++ b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestObjects.java
@@ -105,7 +105,7 @@ protected Set predicateSet( final int limit )
}
@Override
- public void setUp() throws Exception
+ public void setUp()
{
super.setUp();
S = model.createResource("http://nowhere.man/subject");
@@ -123,7 +123,7 @@ protected Set subjectSet( final int limit )
}
@Override
- public void tearDown() throws Exception
+ public void tearDown()
{
S = null;
P = null;
diff --git a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestReifiedStatements.java b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestReifiedStatements.java
index 25ce20dbab7..86c88153507 100644
--- a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestReifiedStatements.java
+++ b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestReifiedStatements.java
@@ -61,7 +61,7 @@ public Set getSetRS( final Model m, final Statement st )
}
@Override
- public void setUp() throws Exception
+ public void setUp()
{
model = createModel();
final Resource S2 = model.createResource(TestReifiedStatements.anchor
diff --git a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestResourceMethods.java b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestResourceMethods.java
index 4c83473c70c..6b6210521c9 100644
--- a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestResourceMethods.java
+++ b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestResourceMethods.java
@@ -46,7 +46,7 @@ public TestResourceMethods( final TestingModelFactory modelFactory,
}
@Override
- public void setUp() throws Exception
+ public void setUp()
{
super.setUp();
tvLiteral = model.createLiteral("test 12 string 2");
diff --git a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestSelectorUse.java b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestSelectorUse.java
index 9767379049f..6de93fd61ad 100644
--- a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestSelectorUse.java
+++ b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestSelectorUse.java
@@ -53,7 +53,7 @@ public TestSelectorUse( final TestingModelFactory modelFactory,
}
@Override
- public void setUp() throws Exception
+ public void setUp()
{
super.setUp();
final Literal tvLitObjs[] = {
diff --git a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestSeqMethods.java b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestSeqMethods.java
index a4fbcd42f45..4a7c6b41a61 100644
--- a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestSeqMethods.java
+++ b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestSeqMethods.java
@@ -84,7 +84,7 @@ protected Resource getContainerType()
}
@Override
- public void setUp() throws Exception
+ public void setUp()
{
super.setUp();
aLitTestObj = new LitTestObj(12345);
diff --git a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestSimpleListStatements.java b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestSimpleListStatements.java
index e7ad1f57df2..d4ecf8d5fd6 100644
--- a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestSimpleListStatements.java
+++ b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestSimpleListStatements.java
@@ -65,7 +65,7 @@ public Model modelWithStatements( final StmtIterator it )
}
@Override
- public void setUp() throws Exception
+ public void setUp()
{
super.setUp();
diff --git a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestSimpleSelector.java b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestSimpleSelector.java
index 5d7246ca141..7a2c53dbee8 100644
--- a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestSimpleSelector.java
+++ b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestSimpleSelector.java
@@ -34,7 +34,7 @@ public TestSimpleSelector( final TestingModelFactory modelFactory,
}
@Override
- public void setUp() throws Exception
+ public void setUp()
{
super.setUp();
model.createResource().addProperty(RDF.type, RDFS.Resource)
diff --git a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestStatementCreation.java b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestStatementCreation.java
index 619bd85640d..24af753e72c 100644
--- a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestStatementCreation.java
+++ b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestStatementCreation.java
@@ -41,7 +41,7 @@ public TestStatementCreation( final TestingModelFactory modelFactory,
}
@Override
- public void setUp() throws Exception
+ public void setUp()
{
super.setUp();
r = model.createResource(TestStatementCreation.subjURI);
@@ -49,7 +49,7 @@ public void setUp() throws Exception
}
@Override
- public void tearDown() throws Exception
+ public void tearDown()
{
r = null;
p = null;
diff --git a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestStatementMethods.java b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestStatementMethods.java
index 9a7c1429691..12f57ba0e38 100644
--- a/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestStatementMethods.java
+++ b/jena-core/src/test/java/org/apache/jena/rdf/model/test/TestStatementMethods.java
@@ -58,7 +58,7 @@ protected Statement loadInitialStatement()
}
@Override
- public void setUp() throws Exception
+ public void setUp()
{
super.setUp();
r = model.createResource();
diff --git a/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/MemoryLeakTest.java b/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/MemoryLeakTest.java
index 4d27cfdcc76..eef6c4c8e78 100644
--- a/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/MemoryLeakTest.java
+++ b/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/MemoryLeakTest.java
@@ -18,7 +18,6 @@
package org.apache.jena.rdfxml.xmlinput;
-import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
@@ -63,7 +62,7 @@ static void loadFile(String fileName) {
PrintStream oldOut = System.out;
try ( PrintStream out = new PrintStream(new OutputStream() {
@Override
- public void write(int b) throws IOException {
+ public void write(int b) {
}
});) {
NTriple.mainEh(new String[] { "-b", "http://eg.org/", "-t", fileName }, null, null);
diff --git a/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/MoreTests.java b/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/MoreTests.java
index 4ace50c95f2..83bfbd929b1 100644
--- a/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/MoreTests.java
+++ b/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/MoreTests.java
@@ -453,7 +453,7 @@ public void statement(AResource subj, AResource pred, ALiteral lit) {
});
a.getHandlers().setErrorHandler(new ErrorHandler(){
@Override
- public void error(SAXParseException exception) throws SAXException {
+ public void error(SAXParseException exception) {
throw new RuntimeException("Unexpected error", exception);
}
@Override
@@ -461,7 +461,7 @@ public void fatalError(SAXParseException exception) throws SAXException {
throw exception;
}
@Override
- public void warning(SAXParseException exception) throws SAXException {
+ public void warning(SAXParseException exception) {
throw new RuntimeException("Unexpected warning", exception);
}});
try {
diff --git a/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/NTripleTestSuite.java b/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/NTripleTestSuite.java
index 27cd1d32c1a..2b8f59fb53e 100644
--- a/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/NTripleTestSuite.java
+++ b/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/NTripleTestSuite.java
@@ -33,7 +33,6 @@
import org.apache.jena.rdfxml.xmlinput.impl.ARPSaxErrorHandler ;
import org.apache.jena.shared.wg.TestInputStreamFactory ;
import org.junit.Assert ;
-import org.xml.sax.SAXException ;
import org.xml.sax.SAXParseException ;
/**
@@ -213,7 +212,7 @@ public void atEndOfFile() {
* @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException)
*/
@Override
- public void error(SAXParseException exception) throws SAXException {
+ public void error(SAXParseException exception) {
hasErrors = true;
super.error(exception);
@@ -223,8 +222,7 @@ public void error(SAXParseException exception) throws SAXException {
* @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
*/
@Override
- public void fatalError(SAXParseException exception)
- throws SAXException {
+ public void fatalError(SAXParseException exception) {
hasErrors = true;
super.fatalError(exception);
diff --git a/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/WGTestSuite.java b/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/WGTestSuite.java
index 7984a32a8c0..e7132337d47 100644
--- a/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/WGTestSuite.java
+++ b/jena-core/src/test/java/org/apache/jena/rdfxml/xmlinput/WGTestSuite.java
@@ -381,7 +381,7 @@ class ReasoningTest extends Test {
super(r);
}
@Override
- protected void runTest() throws IOException {
+ protected void runTest() {
int rslt = WGReasonerTester.FAIL;
try {
JenaParameters.enableWhitespaceCheckingOfTypedLiterals = true;
@@ -449,7 +449,7 @@ Model read(Property p) throws IOException {
new InFactoryX(){
@Override
- public InputStream open() throws IOException {
+ public InputStream open() {
return factory.open(uri);
}
}
@@ -460,7 +460,7 @@ public InputStream open() throws IOException {
return null;
}
@Override
- protected void runTest() throws IOException {
+ protected void runTest() {
int rslt = WGReasonerTester.FAIL;
try {
reallyRunTest();
@@ -738,7 +738,7 @@ Model read(String file, boolean type) throws IOException {
new InFactoryX(){
@Override
- public InputStream open() throws IOException {
+ public InputStream open() {
return factory.open(uri);
}
}
diff --git a/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/PrettyWriterTest.java b/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/PrettyWriterTest.java
index 7967d3e3c69..97d890d1469 100644
--- a/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/PrettyWriterTest.java
+++ b/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/PrettyWriterTest.java
@@ -159,7 +159,7 @@ public void test803804() {
try {
m0.write(new OutputStream() {
@Override
- public void write(int b) throws IOException {
+ public void write(int b) {
}
}, "RDF/XML-ABBREV");
diff --git a/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/TestLiteralEncoding.java b/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/TestLiteralEncoding.java
index 3802ce16684..1f4747b1b61 100644
--- a/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/TestLiteralEncoding.java
+++ b/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/TestLiteralEncoding.java
@@ -101,11 +101,11 @@ private void testThrowsBadCharacterException( char badChar, String lang )
m.createResource().addProperty(RDF.value, badString);
Writer w = new Writer(){
@Override
- public void close() throws IOException {}
+ public void close() {}
@Override
- public void flush() throws IOException {}
+ public void flush() {}
@Override
- public void write(char[] arg0, int arg1, int arg2) throws IOException {}
+ public void write(char[] arg0, int arg1, int arg2) {}
};
try
{
diff --git a/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/TestXMLFeatures.java b/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/TestXMLFeatures.java
index 60512b87a06..f31a73d6ae5 100644
--- a/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/TestXMLFeatures.java
+++ b/jena-core/src/test/java/org/apache/jena/rdfxml/xmloutput/TestXMLFeatures.java
@@ -64,7 +64,7 @@ public void SUPPRESSEDtestRelativeURI() {
m.createResource("foo").addProperty(RDF.value, "bar");
m.write(new OutputStream() {
@Override
- public void write(int b) throws IOException {
+ public void write(int b) {
}
}, lang);
}
@@ -81,7 +81,7 @@ public void SUPPRESStestNoStripes() throws IOException {
* j.0 defined (eg it was read in from a model we wrote out earlier) wants
* to allocate a new j.* prefix and picked j.0, BOOM.
*/
- public void SUPPRESSEDtestBrokenPrefixing() throws Exception {
+ public void SUPPRESSEDtestBrokenPrefixing() {
Model m = ModelFactory.createDefaultModel();
m.add(ModelTestBase.statement(m, "a http://bingle.bongle/booty#PP b"));
m.add(ModelTestBase.statement(m, "c http://dingle.dongle/dooty#PP d"));
diff --git a/jena-core/src/test/java/org/apache/jena/reasoner/test/TestCurrentRDFWG.java b/jena-core/src/test/java/org/apache/jena/reasoner/test/TestCurrentRDFWG.java
index 8fa7804333f..0b5840ae57f 100644
--- a/jena-core/src/test/java/org/apache/jena/reasoner/test/TestCurrentRDFWG.java
+++ b/jena-core/src/test/java/org/apache/jena/reasoner/test/TestCurrentRDFWG.java
@@ -18,8 +18,6 @@
package org.apache.jena.reasoner.test;
-import java.io.IOException ;
-
import junit.framework.TestCase ;
import junit.framework.TestSuite ;
import org.apache.jena.rdf.model.Model ;
@@ -85,22 +83,16 @@ public void initResults() {
*/
public static TestSuite suite() {
TestSuite suite = new TestSuite();
- try {
- Resource config = newResource()
- .addProperty(ReasonerVocabulary.PROPsetRDFSLevel, "full");
- constructRDFWGtests(suite, RDFSRuleReasonerFactory.theInstance(), config);
-
- } catch (IOException e) {
- // failed to even built the test harness
- logger.error("Failed to construct RDF WG test harness", e);
- }
+ Resource config = newResource()
+ .addProperty(ReasonerVocabulary.PROPsetRDFSLevel, "full");
+ constructRDFWGtests(suite, RDFSRuleReasonerFactory.theInstance(), config);
return suite;
}
/**
* Build the working group tests for the given reasoner.
*/
- private static void constructRDFWGtests(TestSuite suite, ReasonerFactory rf, Resource config) throws IOException {
+ private static void constructRDFWGtests(TestSuite suite, ReasonerFactory rf, Resource config) {
JenaParameters.enableWhitespaceCheckingOfTypedLiterals = true;
WGReasonerTester tester = new WGReasonerTester("Manifest.rdf", TEST_DIR);
for ( String test : tester.listTests() )
@@ -141,7 +133,7 @@ static class TestReasonerWG extends TestCase {
* The test runner
*/
@Override
- public void runTest() throws IOException {
+ public void runTest() {
boolean success = tester.runTest(test, reasonerFactory, this, config);
// Resource resultType = null;
// if (test.hasProperty(RDF.type, OWLTest.NegativeEntailmentTest)
diff --git a/jena-core/src/test/java/org/apache/jena/reasoner/test/TestRDFSReasoners.java b/jena-core/src/test/java/org/apache/jena/reasoner/test/TestRDFSReasoners.java
index d29bc8a2212..382bfbcaef7 100644
--- a/jena-core/src/test/java/org/apache/jena/reasoner/test/TestRDFSReasoners.java
+++ b/jena-core/src/test/java/org/apache/jena/reasoner/test/TestRDFSReasoners.java
@@ -107,7 +107,7 @@ private static void constructQuerytests(TestSuite suite, String manifest, Reason
/**
* Build the working group tests for the given reasoner.
*/
- private static void constructRDFWGtests(TestSuite suite, ReasonerFactory rf, Resource config) throws IOException {
+ private static void constructRDFWGtests(TestSuite suite, ReasonerFactory rf, Resource config) {
WGReasonerTester tester = new WGReasonerTester("Manifest.rdf");
for ( String test : tester.listTests() )
{
@@ -193,7 +193,7 @@ static class TestReasonerWG extends TestCase {
* The test runner
*/
@Override
- public void runTest() throws IOException {
+ public void runTest() {
tester.runTest(test, reasonerFactory, this, config);
}
diff --git a/jena-core/src/test/java/org/apache/jena/reasoner/test/WGReasonerTester.java b/jena-core/src/test/java/org/apache/jena/reasoner/test/WGReasonerTester.java
index b27924e4e6e..a297c3a5520 100644
--- a/jena-core/src/test/java/org/apache/jena/reasoner/test/WGReasonerTester.java
+++ b/jena-core/src/test/java/org/apache/jena/reasoner/test/WGReasonerTester.java
@@ -27,6 +27,8 @@
import java.util.List ;
import junit.framework.TestCase ;
+
+import org.apache.jena.atlas.RuntimeIOException;
import org.apache.jena.graph.Graph ;
import org.apache.jena.rdf.model.* ;
import org.apache.jena.rdf.model.impl.PropertyImpl ;
@@ -131,7 +133,7 @@ public class WGReasonerTester {
* tests - relative to baseDir
* @param baseDir override default base directory for the tests and manifest
*/
- public WGReasonerTester(String manifest, String baseDir) throws IOException {
+ public WGReasonerTester(String manifest, String baseDir) {
this.baseDir = baseDir;
testManifest = loadFile(manifest);
}
@@ -141,7 +143,7 @@ public WGReasonerTester(String manifest, String baseDir) throws IOException {
* @param manifest the name of the manifest file defining these
* tests - relative to baseDir
*/
- public WGReasonerTester(String manifest) throws IOException {
+ public WGReasonerTester(String manifest) {
this(manifest, DEFAULT_BASE_DIR);
}
@@ -151,7 +153,7 @@ public WGReasonerTester(String manifest) throws IOException {
* @param file the file name, relative to baseDir
* @return the loaded Model
*/
- public Model loadFile(String file) throws IOException {
+ public Model loadFile(String file) {
String langType = "RDF/XML";
if (file.endsWith(".nt")) {
langType = "N-TRIPLE";
@@ -168,17 +170,15 @@ public Model loadFile(String file) throws IOException {
* Now use InputStream instead of Reader (general hygine).
* Also treat http:.... as URL not local file.
*/
- InputStream in;
- if ( baseDir.startsWith("http:")) {
- in = new URL(baseDir+fname).openStream();
- } else {
- in = new FileInputStream(baseDir + fname);
- }
- in = new BufferedInputStream(in);
-
-
- result.read(in, BASE_URI + fname, langType);
- return result;
+ try {
+ InputStream in = baseDir.startsWith("http:") ? new URL(baseDir + fname).openStream()
+ : new FileInputStream(baseDir + fname);
+ in = new BufferedInputStream(in);
+ result.read(in, BASE_URI + fname, langType);
+ return result;
+ } catch (final IOException e) {
+ throw new RuntimeIOException(e);
+ }
}
/**
@@ -187,10 +187,9 @@ public Model loadFile(String file) throws IOException {
* @param testcase the JUnit test case which is requesting this test
* @param configuration optional configuration information
* @return true if all the tests pass
- * @throws IOException if one of the test files can't be found
* @throws JenaException if the test can't be found or fails internally
*/
- public boolean runTests(ReasonerFactory reasonerF, TestCase testcase, Resource configuration) throws IOException {
+ public boolean runTests(ReasonerFactory reasonerF, TestCase testcase, Resource configuration) {
for ( String test : listTests() )
{
if ( !runTest( test, reasonerF, testcase, configuration ) )
@@ -232,10 +231,9 @@ public Resource getTypeOfLastTest() {
* @param testcase the JUnit test case which is requesting this test
* @param configuration optional configuration information
* @return true if the test passes
- * @throws IOException if one of the test files can't be found
* @throws JenaException if the test can't be found or fails internally
*/
- public boolean runTest(String uri, ReasonerFactory reasonerF, TestCase testcase, Resource configuration) throws IOException {
+ public boolean runTest(String uri, ReasonerFactory reasonerF, TestCase testcase, Resource configuration) {
return runTestDetailedResponse(uri,reasonerF,testcase,configuration) != FAIL;
}
static final public int FAIL = -1;
@@ -255,7 +253,7 @@ public boolean runTest(String uri, ReasonerFactory reasonerF, TestCase testcase,
*/
- public int runTestDetailedResponse(String uri, ReasonerFactory reasonerF, TestCase testcase, Resource configuration) throws IOException {
+ public int runTestDetailedResponse(String uri, ReasonerFactory reasonerF, TestCase testcase, Resource configuration) {
// Find the specification for the named test
Resource test = testManifest.getResource(uri);
diff --git a/jena-csv/src/test/java/org/apache/jena/propertytable/graph/GraphCSVTest.java b/jena-csv/src/test/java/org/apache/jena/propertytable/graph/GraphCSVTest.java
index a4bed3a347b..b81f37feb88 100644
--- a/jena-csv/src/test/java/org/apache/jena/propertytable/graph/GraphCSVTest.java
+++ b/jena-csv/src/test/java/org/apache/jena/propertytable/graph/GraphCSVTest.java
@@ -40,7 +40,7 @@ public static void init(){
}
@Test
- public void testGraphCSV() throws Exception {
+ public void testGraphCSV() {
//String file = "src/test/resources/HEFCE_organogram_senior_data_31032011.csv";test.csv
String file = "src/test/resources/test.csv";
@@ -62,7 +62,7 @@ public void testGraphCSV() throws Exception {
}
@Test
- public void stageGeneratorTest() throws Exception{
+ public void stageGeneratorTest(){
wireIntoExecution();
testGraphCSV();
}
diff --git a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/QuadsInputFormat.java b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/QuadsInputFormat.java
index b8fdbd5205c..71364728d3a 100644
--- a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/QuadsInputFormat.java
+++ b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/QuadsInputFormat.java
@@ -18,8 +18,6 @@
package org.apache.jena.hadoop.rdf.io.input;
-import java.io.IOException;
-
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.RecordReader;
@@ -38,8 +36,7 @@
public class QuadsInputFormat extends AbstractWholeFileInputFormat {
@Override
- public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context)
- throws IOException, InterruptedException {
+ public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context) {
return new QuadsReader();
}
diff --git a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/TriplesInputFormat.java b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/TriplesInputFormat.java
index 03f394a8ee1..62144f32240 100644
--- a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/TriplesInputFormat.java
+++ b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/TriplesInputFormat.java
@@ -18,8 +18,6 @@
package org.apache.jena.hadoop.rdf.io.input;
-import java.io.IOException;
-
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.RecordReader;
@@ -34,8 +32,7 @@
public class TriplesInputFormat extends AbstractWholeFileInputFormat {
@Override
- public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context)
- throws IOException, InterruptedException {
+ public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context) {
return new TriplesReader();
}
diff --git a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/TriplesOrQuadsInputFormat.java b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/TriplesOrQuadsInputFormat.java
index bfd643e7b75..50da74024be 100644
--- a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/TriplesOrQuadsInputFormat.java
+++ b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/TriplesOrQuadsInputFormat.java
@@ -18,8 +18,6 @@
package org.apache.jena.hadoop.rdf.io.input;
-import java.io.IOException;
-
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.RecordReader;
@@ -39,8 +37,7 @@
public class TriplesOrQuadsInputFormat extends AbstractWholeFileInputFormat {
@Override
- public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context)
- throws IOException, InterruptedException {
+ public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context) {
return new TriplesOrQuadsReader();
}
diff --git a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/jsonld/JsonLDQuadInputFormat.java b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/jsonld/JsonLDQuadInputFormat.java
index 2464946c4c9..b4f788ce7a8 100644
--- a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/jsonld/JsonLDQuadInputFormat.java
+++ b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/jsonld/JsonLDQuadInputFormat.java
@@ -18,8 +18,6 @@
package org.apache.jena.hadoop.rdf.io.input.jsonld;
-import java.io.IOException;
-
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.RecordReader;
@@ -31,8 +29,7 @@
public class JsonLDQuadInputFormat extends AbstractWholeFileInputFormat {
@Override
- public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context)
- throws IOException, InterruptedException {
+ public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context) {
return new JsonLDQuadReader();
}
diff --git a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/jsonld/JsonLDTripleInputFormat.java b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/jsonld/JsonLDTripleInputFormat.java
index 0e08a4b476d..0166d015b76 100644
--- a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/jsonld/JsonLDTripleInputFormat.java
+++ b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/jsonld/JsonLDTripleInputFormat.java
@@ -18,8 +18,6 @@
package org.apache.jena.hadoop.rdf.io.input.jsonld;
-import java.io.IOException;
-
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.RecordReader;
@@ -31,8 +29,7 @@
public class JsonLDTripleInputFormat extends AbstractWholeFileInputFormat {
@Override
- public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context)
- throws IOException, InterruptedException {
+ public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context) {
return new JsonLDTripleReader();
}
diff --git a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/nquads/BlockedNQuadsInputFormat.java b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/nquads/BlockedNQuadsInputFormat.java
index 6829c4d9a09..801f7627064 100644
--- a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/nquads/BlockedNQuadsInputFormat.java
+++ b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/nquads/BlockedNQuadsInputFormat.java
@@ -18,8 +18,6 @@
package org.apache.jena.hadoop.rdf.io.input.nquads;
-import java.io.IOException;
-
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.RecordReader;
@@ -45,8 +43,7 @@
public class BlockedNQuadsInputFormat extends AbstractNLineFileInputFormat {
@Override
- public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context)
- throws IOException, InterruptedException {
+ public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context) {
return new BlockedNQuadsReader();
}
diff --git a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/nquads/NQuadsInputFormat.java b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/nquads/NQuadsInputFormat.java
index 802fbea267a..e1110b6428b 100644
--- a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/nquads/NQuadsInputFormat.java
+++ b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/nquads/NQuadsInputFormat.java
@@ -18,8 +18,6 @@
package org.apache.jena.hadoop.rdf.io.input.nquads;
-import java.io.IOException;
-
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.RecordReader;
@@ -38,8 +36,7 @@
public class NQuadsInputFormat extends AbstractNLineFileInputFormat {
@Override
- public RecordReader createRecordReader(InputSplit arg0, TaskAttemptContext arg1)
- throws IOException, InterruptedException {
+ public RecordReader createRecordReader(InputSplit arg0, TaskAttemptContext arg1) {
return new NQuadsReader();
}
diff --git a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/nquads/WholeFileNQuadsInputFormat.java b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/nquads/WholeFileNQuadsInputFormat.java
index 128d079d4c4..9d5966f3495 100644
--- a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/nquads/WholeFileNQuadsInputFormat.java
+++ b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/nquads/WholeFileNQuadsInputFormat.java
@@ -18,8 +18,6 @@
package org.apache.jena.hadoop.rdf.io.input.nquads;
-import java.io.IOException;
-
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.RecordReader;
@@ -43,8 +41,7 @@
public class WholeFileNQuadsInputFormat extends AbstractWholeFileInputFormat {
@Override
- public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context)
- throws IOException, InterruptedException {
+ public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context) {
return new WholeFileNQuadsReader();
}
diff --git a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/ntriples/BlockedNTriplesInputFormat.java b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/ntriples/BlockedNTriplesInputFormat.java
index 292167bf75d..3536f5d70c4 100644
--- a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/ntriples/BlockedNTriplesInputFormat.java
+++ b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/ntriples/BlockedNTriplesInputFormat.java
@@ -18,8 +18,6 @@
package org.apache.jena.hadoop.rdf.io.input.ntriples;
-import java.io.IOException;
-
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.RecordReader;
@@ -45,8 +43,7 @@
public class BlockedNTriplesInputFormat extends AbstractNLineFileInputFormat {
@Override
- public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context)
- throws IOException, InterruptedException {
+ public RecordReader createRecordReader(InputSplit split, TaskAttemptContext context) {
return new BlockedNTriplesReader();
}
diff --git a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/ntriples/NTriplesInputFormat.java b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/ntriples/NTriplesInputFormat.java
index 1694c87eddb..bbe4c9abffa 100644
--- a/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/ntriples/NTriplesInputFormat.java
+++ b/jena-elephas/jena-elephas-io/src/main/java/org/apache/jena/hadoop/rdf/io/input/ntriples/NTriplesInputFormat.java
@@ -18,8 +18,6 @@
package org.apache.jena.hadoop.rdf.io.input.ntriples;
-import java.io.IOException;
-
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.RecordReader;
@@ -38,8 +36,7 @@
public class NTriplesInputFormat extends AbstractNLineFileInputFormat