bsloane1650 commented on a change in pull request #223: Daffodil 1444 schema 
comp simple types
URL: https://github.com/apache/incubator-daffodil/pull/223#discussion_r289625733
 
 

 ##########
 File path: 
daffodil-core/src/main/scala/org/apache/daffodil/dsom/RestrictionUnion.scala
 ##########
 @@ -238,57 +239,21 @@ final class RestrictionFactory(val xmlArg: Node, val 
simpleTypeFactory: SimpleTy
       facetValueSet
     }
   }
-  
-  lazy val optLogicalValueSet:Option[RepValueSet[AnyRef]] = 
if(logicalValueSet.isEmpty) None else Some(logicalValueSet)
-
-}
-
-final class Restriction(val simpleType: SimpleTypeDefBase, factory: 
RestrictionFactory)
-  extends SchemaComponentImpl(factory.xmlArg, simpleType.schemaDocument) {
-
-  import org.apache.daffodil.dsom.FacetTypes._
-
-  lazy val optUnion = factory.optUnion.map(_.union(simpleType))
-  lazy val enumerationValues = factory.enumerationValues
-  lazy val fractionDigitsValue = factory.fractionDigitsValue
-  lazy val hasEnumeration = factory.hasEnumeration
-  lazy val hasFractionDigits = factory.hasFractionDigits
-  lazy val hasMaxExclusive = factory.hasMaxExclusive
-  lazy val hasMaxInclusive = factory.hasMaxInclusive
-  lazy val hasMaxLength = factory.hasMaxLength
-  lazy val hasMinExclusive = factory.hasMinExclusive
-  lazy val hasMinInclusive = factory.hasMinInclusive
-  lazy val hasMinLength = factory.hasMinLength
-  lazy val hasPattern = factory.hasPattern
-  lazy val hasTotalDigits = factory.hasTotalDigits
-  lazy val maxExclusiveValue = factory.maxExclusiveValue
-  lazy val maxInclusiveValue = factory.maxInclusiveValue
-  lazy val maxLengthValue = factory.maxLengthValue
-  lazy val minExclusiveValue = factory.minExclusiveValue
-  lazy val minInclusiveValue = factory.minInclusiveValue
-  lazy val minLengthValue = factory.minLengthValue
-  lazy val patternValues = factory.patternValues
-  lazy val primType = factory.primType
-  lazy val totalDigitsValue = factory.totalDigitsValue
-  lazy val baseQName = factory.baseQName
-
-  override lazy val enclosingComponentDef = factory.enclosingComponent
-
-  lazy val optBaseDef = 
factory.optBaseDef.map(_.forElement(simpleType.elementDecl))
 
+  lazy val optLogicalValueSet: Option[RepValueSet[AnyRef]] = if 
(logicalValueSet.isEmpty) None else Some(logicalValueSet)
 }
 
 /**
  * A schema component for simple type unions
  */
-final class UnionFactory(val xmlArg: Node, simpleTypeFactory: 
SimpleTypeDefFactory)
-  extends SchemaComponentFactory(xmlArg, simpleTypeFactory.schemaDocument) {
-
+final class Union(val xmlArg: Node, simpleTypeDef: SimpleTypeDefBase)
+  extends SchemaComponentImpl(xmlArg, simpleTypeDef)
+  with NestingLexicalMixin {
   Assert.invariant(xmlArg.asInstanceOf[scala.xml.Elem].label == "union")
-  
-  def union(simpleType: SimpleTypeDefBase) = {
-    new Union(simpleType, this)
-  }
+
+  //  def union(simpleType: SimpleTypeDefBase) = {
+  //    new Union(simpleType, this)
+  //  }
 
 Review comment:
   Delete commented code

----------------------------------------------------------------
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