This is an automated email from the ASF dual-hosted git repository.

andy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/jena.git

commit f7beb33142d7edc1ed8511bd6da980ebf2962f82
Author: Andy Seaborne <[email protected]>
AuthorDate: Wed Dec 10 15:30:20 2025 +0000

    Move enum inside EltStreamRDF
---
 .../org/apache/jena/riot/system/EltStreamRDF.java  | 35 ++++++++++++++--------
 .../apache/jena/riot/system/EltStreamRDFType.java  | 29 ------------------
 2 files changed, 22 insertions(+), 42 deletions(-)

diff --git 
a/jena-arq/src/main/java/org/apache/jena/riot/system/EltStreamRDF.java 
b/jena-arq/src/main/java/org/apache/jena/riot/system/EltStreamRDF.java
index 895d2286d1..f6660d00fe 100644
--- a/jena-arq/src/main/java/org/apache/jena/riot/system/EltStreamRDF.java
+++ b/jena-arq/src/main/java/org/apache/jena/riot/system/EltStreamRDF.java
@@ -31,7 +31,16 @@ public class EltStreamRDF
 {
     private static final long serialVersionUID = 1L;
 
-    private final EltStreamRDFType type;
+    public enum EltType {
+        UNKNOWN,
+        TRIPLE,
+        QUAD,
+        PREFIX,
+        BASE,
+        EXCEPTION
+    }
+
+    private final EltType type;
     private final Triple triple;
     private final Quad quad;
     private final String prefix; // Null implies "base".
@@ -40,13 +49,13 @@ public class EltStreamRDF
 
     /* Prefer static constructors in EltStreamRDF */
 
-    EltStreamRDF(Triple triple) { this(EltStreamRDFType.TRIPLE, triple, null, 
null, null, null); }
-    EltStreamRDF(Quad quad) { this(EltStreamRDFType.QUAD, null, quad, null, 
null, null); }
-    EltStreamRDF(String prefix, String iri) { this(EltStreamRDFType.PREFIX, 
null, null, prefix, iri, null); }
-    EltStreamRDF(String iri) { this(EltStreamRDFType.BASE, null, null, null, 
iri, null); }
-    EltStreamRDF(Throwable exception) { this(EltStreamRDFType.EXCEPTION, null, 
null, null, null, exception); }
+    EltStreamRDF(Triple triple)             { this(EltType.TRIPLE, triple, 
null, null, null, null); }
+    EltStreamRDF(Quad quad)                 { this(EltType.QUAD, null, quad, 
null, null, null); }
+    EltStreamRDF(String prefix, String iri) { this(EltType.PREFIX, null, null, 
prefix, iri, null); }
+    EltStreamRDF(String iri)                { this(EltType.BASE, null, null, 
null, iri, null); }
+    EltStreamRDF(Throwable exception)       { this(EltType.EXCEPTION, null, 
null, null, null, exception); }
 
-    EltStreamRDF(EltStreamRDFType eltType, Triple triple, Quad quad, String 
prefix, String iri, Throwable exception) {
+    EltStreamRDF(EltType eltType, Triple triple, Quad quad, String prefix, 
String iri, Throwable exception) {
         this.type = eltType;
         this.triple = triple;
         this.quad = quad;
@@ -55,18 +64,18 @@ public class EltStreamRDF
         this.exception = exception;
     }
 
-    public boolean   isTriple()    { return 
EltStreamRDFType.TRIPLE.equals(type); }
+    public boolean   isTriple()    { return EltType.TRIPLE.equals(type); }
     public Triple    triple()      { return triple; }
-    public boolean   isQuad()      { return 
EltStreamRDFType.QUAD.equals(type); }
+    public boolean   isQuad()      { return EltType.QUAD.equals(type); }
     public Quad      quad()        { return quad; }
-    public boolean   isPrefix()    { return 
EltStreamRDFType.PREFIX.equals(type); }
+    public boolean   isPrefix()    { return EltType.PREFIX.equals(type); }
     public String    prefix()      { return prefix; }
-    public boolean   isBase()      { return 
EltStreamRDFType.BASE.equals(type); }
+    public boolean   isBase()      { return EltType.BASE.equals(type); }
     public String    iri()         { return iri; }
-    public boolean   isException() { return 
EltStreamRDFType.EXCEPTION.equals(type); }
+    public boolean   isException() { return EltType.EXCEPTION.equals(type); }
     public Throwable exception()   { return exception; }
 
-    public EltStreamRDFType getType() {
+    public EltType getType() {
         return type;
     }
 
diff --git 
a/jena-arq/src/main/java/org/apache/jena/riot/system/EltStreamRDFType.java 
b/jena-arq/src/main/java/org/apache/jena/riot/system/EltStreamRDFType.java
deleted file mode 100644
index a60570f846..0000000000
--- a/jena-arq/src/main/java/org/apache/jena/riot/system/EltStreamRDFType.java
+++ /dev/null
@@ -1,29 +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.riot.system;
-
-/** Payload types of {@link EltStreamRDF} elements */
-public enum EltStreamRDFType {
-    UNKNOWN,
-    TRIPLE,
-    QUAD,
-    PREFIX,
-    BASE,
-    EXCEPTION
-}

Reply via email to