mbeckerle commented on a change in pull request #326: Daffodil 2280 cleanup - 
removes backpointers and factory patterns no longer needed
URL: https://github.com/apache/incubator-daffodil/pull/326#discussion_r394615310
 
 

 ##########
 File path: daffodil-core/src/main/scala/org/apache/daffodil/dsom/GroupRef.scala
 ##########
 @@ -53,24 +53,43 @@ trait GroupRef { self: ModelGroup =>
  * A GroupRefFactory (group reference) is an indirection to
  * factories to create a SequenceGroupRef, or ChoiceGroupRef.
  *
- * The refXMLArg is the xml for the group reference.
+ * The refXML is the xml for the group reference.
  *
  * This factory exists in order to make error messages refer to the
- * right part of the schema.
+ * right part of the schema and to navigate the ref prior to creating
+ * the object so that we can create a more specific kind of group ref that
+ * knows if it is referring to a choice or a sequence.
  */
-final class GroupRefFactory(refXMLArg: Node, val refLexicalParent: 
SchemaComponent, position: Int, isHidden: Boolean)
-  extends SchemaComponentFactory(refXMLArg, 
Some(refLexicalParent.schemaDocument))
+object GroupRefFactory {
+
+  def apply(refXML: Node, refLexicalParent: SchemaComponent, position: Int, 
isHidden: Boolean) = {
+    val f = new GroupRefFactory(refXML, refLexicalParent, position, isHidden)
+    f.groupRef
+  }
+}
+
+/**
+ * This is a quasi schema component. It is such simply to share a bunch of
 
 Review comment:
   Improved comment language.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to