tuxji commented on code in PR #1112:
URL: https://github.com/apache/daffodil/pull/1112#discussion_r1392700059
##########
daffodil-core/src/test/scala/org/apache/daffodil/core/infoset/TestInfoset.scala:
##########
@@ -183,16 +191,18 @@ class TestInfoset1 {
val (infoset: DIComplex, _, tunable) = testInfoset(testSchema, xmlInfoset)
val Seq(w_erd) = infoset.erd.childERDs
infoset.getChildArray(w_erd, tunable) match {
- case arr: DIArray => {
+ case arr: InfosetArray => {
assertEquals(2, arr.length)
- var a = arr(1).asInstanceOf[InfosetSimpleElement]
- assertEquals(w_erd, a.runtimeData)
+ var a = arr(1).asInstanceOf[InfosetSimpleElement] // 1-based
+ assertEquals(w_erd, a.metadata)
- assertEquals(4, a.dataValue.getAnyRef)
- assertEquals(infoset, a.parent)
+ assertEquals(4, a.getUnsignedLong.longValue().toInt)
Review Comment:
What is the reason for calling `.longValue()` when it seems possible to call
`a.getUnsignedLong.toInt` directly?
##########
build.sbt:
##########
@@ -219,7 +219,7 @@ val minSupportedJavaVersion: String =
lazy val commonSettings = Seq(
organization := "org.apache.daffodil",
- version := "3.6.0",
+ version := "3.7.0-SNAPSHOT",
Review Comment:
This change doesn't belong in this PR. PR #1113 which hasn't been merged
yet will make this change for us.
##########
daffodil-japi/src/test/java/org/apache/daffodil/example/TestJavaAPI.java:
##########
@@ -1209,7 +1209,6 @@ public void testJavaAPI25() throws IOException,
ClassNotFoundException, External
assertEquals(expectedData, bos.toString());
}
- @Test
Review Comment:
Is this change intentional and why is the test being disabled?
##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/runtime1/api/Metadata.scala:
##########
@@ -0,0 +1,305 @@
+/*
+ * 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.daffodil.runtime1.api
+
+import java.lang.{ Long => JLong }
+import scala.collection.JavaConverters._
+import scala.xml.NamespaceBinding
+
+import org.apache.daffodil.runtime1.dpath.NodeInfo
+import org.apache.daffodil.runtime1.dpath.NodeInfo.PrimType
+
+/**
+ * This is the supportable API for access to the RuntimeData structures
+ * which provide access to static information about a given .
Review Comment:
About a given compiled schema object, or is there a better description than
that?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]