Created
November 17, 2011 02:36
-
-
Save eed3si9n/1372205 to your computer and use it in GitHub Desktop.
xml protocol generated by general test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated by <a href="http://scalaxb.org/">scalaxb</a>. | |
package general | |
/** | |
usage: | |
val obj = scalaxb.fromXML[general.Foo](node) | |
val document = scalaxb.toXML[general.Foo](obj, "foo", general.defaultScope) | |
**/ | |
object `package` extends XMLProtocol { } | |
trait XMLProtocol extends scalaxb.XMLStandardTypes { | |
val defaultScope = scalaxb.toScope(None -> "http://www.example.com/general", | |
Some("gen") -> "http://www.example.com/general", | |
Some("xmime") -> "http://www.w3.org/2005/05/xmlmime", | |
Some("xs") -> "http://www.w3.org/2001/XMLSchema", | |
Some("xsi") -> "http://www.w3.org/2001/XMLSchema-instance") | |
implicit lazy val GeneralSingularBuiltInTypeTestFormat: scalaxb.XMLFormat[general.SingularBuiltInTypeTest] = new DefaultGeneralSingularBuiltInTypeTestFormat {} | |
implicit lazy val GeneralSingularBuiltInTypeTestSequence1Format: scalaxb.XMLFormat[general.SingularBuiltInTypeTestSequence1] = new DefaultGeneralSingularBuiltInTypeTestSequence1Format {} | |
implicit lazy val GeneralSingularBuiltInTypeTestSequence2Format: scalaxb.XMLFormat[general.SingularBuiltInTypeTestSequence2] = new DefaultGeneralSingularBuiltInTypeTestSequence2Format {} | |
implicit lazy val GeneralSingularBuiltInTypeTestSequence3Format: scalaxb.XMLFormat[general.SingularBuiltInTypeTestSequence3] = new DefaultGeneralSingularBuiltInTypeTestSequence3Format {} | |
implicit lazy val GeneralSingularBuiltInTypeTestSequence4Format: scalaxb.XMLFormat[general.SingularBuiltInTypeTestSequence4] = new DefaultGeneralSingularBuiltInTypeTestSequence4Format {} | |
implicit lazy val GeneralSingularBuiltInTypeTestSequence5Format: scalaxb.XMLFormat[general.SingularBuiltInTypeTestSequence5] = new DefaultGeneralSingularBuiltInTypeTestSequence5Format {} | |
implicit lazy val GeneralSingularComplexTypeTestFormat: scalaxb.XMLFormat[general.SingularComplexTypeTest] = new DefaultGeneralSingularComplexTypeTestFormat {} | |
implicit lazy val GeneralNillablePersonStarTestFormat: scalaxb.XMLFormat[general.NillablePersonStarTest] = new DefaultGeneralNillablePersonStarTestFormat {} | |
implicit lazy val GeneralChoiceComplexTypeTestFormat: scalaxb.XMLFormat[general.ChoiceComplexTypeTest] = new DefaultGeneralChoiceComplexTypeTestFormat {} | |
implicit lazy val GeneralSingularSimpleTypeTestFormat: scalaxb.XMLFormat[general.SingularSimpleTypeTest] = new DefaultGeneralSingularSimpleTypeTestFormat {} | |
implicit lazy val GeneralListTestFormat: scalaxb.XMLFormat[general.ListTest] = new DefaultGeneralListTestFormat {} | |
implicit lazy val GeneralAnyTestFormat: scalaxb.XMLFormat[general.AnyTest] = new DefaultGeneralAnyTestFormat {} | |
implicit lazy val GeneralAnyTypeTestFormat: scalaxb.XMLFormat[general.AnyTypeTest] = new DefaultGeneralAnyTypeTestFormat {} | |
implicit lazy val GeneralLongAllTestFormat: scalaxb.XMLFormat[general.LongAllTest] = new DefaultGeneralLongAllTestFormat {} | |
implicit lazy val GeneralEmptyComplexTypeTestFormat: scalaxb.XMLFormat[general.EmptyComplexTypeTest] = new DefaultGeneralEmptyComplexTypeTestFormat {} | |
implicit lazy val GeneralEmptySequenceTestFormat: scalaxb.XMLFormat[general.EmptySequenceTest] = new DefaultGeneralEmptySequenceTestFormat {} | |
implicit lazy val GeneralEmptySequenceGroupTestFormat: scalaxb.XMLFormat[general.EmptySequenceGroupTest] = new DefaultGeneralEmptySequenceGroupTestFormat {} | |
implicit lazy val GeneralEmptyChoiceGroupTestFormat: scalaxb.XMLFormat[general.EmptyChoiceGroupTest] = new DefaultGeneralEmptyChoiceGroupTestFormat {} | |
implicit lazy val GeneralTopLevelMultipleSeqTestFormat: scalaxb.XMLFormat[general.TopLevelMultipleSeqTest] = new DefaultGeneralTopLevelMultipleSeqTestFormat {} | |
implicit lazy val GeneralTopLevelMultipleSeqTestSequence1Format: scalaxb.XMLFormat[general.TopLevelMultipleSeqTestSequence1] = new DefaultGeneralTopLevelMultipleSeqTestSequence1Format {} | |
implicit lazy val GeneralTopLevelOptionalSeqTestFormat: scalaxb.XMLFormat[general.TopLevelOptionalSeqTest] = new DefaultGeneralTopLevelOptionalSeqTestFormat {} | |
implicit lazy val GeneralTopLevelOptionalSeqTestSequence1Format: scalaxb.XMLFormat[general.TopLevelOptionalSeqTestSequence1] = new DefaultGeneralTopLevelOptionalSeqTestSequence1Format {} | |
implicit lazy val GeneralTopLevelMultipleSeqAnyTestFormat: scalaxb.XMLFormat[general.TopLevelMultipleSeqAnyTest] = new DefaultGeneralTopLevelMultipleSeqAnyTestFormat {} | |
implicit lazy val GeneralProtocolTypeFormat: scalaxb.XMLFormat[general.ProtocolType] = new DefaultGeneralProtocolTypeFormat {} | |
implicit lazy val GeneralPersonFormat: scalaxb.XMLFormat[general.Person] = new DefaultGeneralPersonFormat {} | |
implicit lazy val GeneralAddressableFormat: scalaxb.XMLFormat[general.Addressable] = new DefaultGeneralAddressableFormat {} | |
implicit lazy val GeneralAddressFormat: scalaxb.XMLFormat[general.Address] = new DefaultGeneralAddressFormat {} | |
implicit lazy val GeneralUSAddressFormat: scalaxb.XMLFormat[general.USAddress] = new DefaultGeneralUSAddressFormat {} | |
implicit lazy val GeneralMilkTypeFormat: scalaxb.XMLFormat[general.MilkType] = new DefaultGeneralMilkTypeFormat {} | |
implicit lazy val GeneralComplexListOfMilkFormat: scalaxb.XMLFormat[general.ComplexListOfMilk] = new DefaultGeneralComplexListOfMilkFormat {} | |
implicit lazy val GeneralComplexListOfBuiltInTypeFormat: scalaxb.XMLFormat[general.ComplexListOfBuiltInType] = new DefaultGeneralComplexListOfBuiltInTypeFormat {} | |
implicit lazy val GeneralOtherFormat: scalaxb.XMLFormat[general.Other] = new DefaultGeneralOtherFormat {} | |
implicit lazy val GeneralDupeSequenceTestFormat: scalaxb.XMLFormat[general.DupeSequenceTest] = new DefaultGeneralDupeSequenceTestFormat {} | |
implicit lazy val GeneralOther2Format: scalaxb.XMLFormat[general.Other2] = new DefaultGeneralOther2Format {} | |
implicit lazy val GeneralDupeSequenceTest2Format: scalaxb.XMLFormat[general.DupeSequenceTest2] = new DefaultGeneralDupeSequenceTest2Format {} | |
implicit lazy val GeneralSubstitutionGroupTestFormat: scalaxb.XMLFormat[general.SubstitutionGroupTest] = new DefaultGeneralSubstitutionGroupTestFormat {} | |
implicit lazy val GeneralLongAttributeTestFormat: scalaxb.XMLFormat[general.LongAttributeTest] = new DefaultGeneralLongAttributeTestFormat {} | |
implicit lazy val GeneralAnySimpleTypeExtensionFormat: scalaxb.XMLFormat[general.AnySimpleTypeExtension] = new DefaultGeneralAnySimpleTypeExtensionFormat {} | |
implicit lazy val GeneralDupeElemFormat: scalaxb.XMLFormat[general.DupeElem] = new DefaultGeneralDupeElemFormat {} | |
implicit lazy val GeneralDupeElem2Format: scalaxb.XMLFormat[general.DupeElem2] = new DefaultGeneralDupeElem2Format {} | |
implicit lazy val GeneralDupeElem3Format: scalaxb.XMLFormat[general.DupeElem3] = new DefaultGeneralDupeElem3Format {} | |
implicit lazy val GeneralDupeElem4Format: scalaxb.XMLFormat[general.DupeElem4] = new DefaultGeneralDupeElem4Format {} | |
implicit lazy val GeneralJpegPictureTypeFormat: scalaxb.XMLFormat[general.JpegPictureType] = new DefaultGeneralJpegPictureTypeFormat {} | |
implicit lazy val GeneralMimeTestFormat: scalaxb.XMLFormat[general.MimeTest] = new DefaultGeneralMimeTestFormat {} | |
implicit lazy val GeneralEmptySeqGroupSequenceFormat: scalaxb.XMLFormat[general.EmptySeqGroupSequence] = new DefaultGeneralEmptySeqGroupSequenceFormat {} | |
implicit lazy val GeneralCoreattrsFormat: scalaxb.AttributeGroupFormat[general.Coreattrs] = new DefaultGeneralCoreattrsFormat {} | |
implicit lazy val XmlmimeBase64BinaryableFormat: scalaxb.XMLFormat[xmlmime.Base64Binaryable] = new DefaultXmlmimeBase64BinaryableFormat {} | |
implicit lazy val XmlmimeBase64BinaryTypeFormat: scalaxb.XMLFormat[xmlmime.Base64BinaryType] = new DefaultXmlmimeBase64BinaryTypeFormat {} | |
implicit lazy val XmlmimeHexBinaryTypeFormat: scalaxb.XMLFormat[xmlmime.HexBinaryType] = new DefaultXmlmimeHexBinaryTypeFormat {} | |
trait DefaultGeneralSingularBuiltInTypeTestFormat extends scalaxb.ElemNameParser[general.SingularBuiltInTypeTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("SingularBuiltInTypeTest") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.SingularBuiltInTypeTest] = | |
(((scalaxb.ElemName(Some("http://www.example.com/general"), "string")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "boolean")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "decimal")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "float")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "double")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "duration")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "dateTime")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "time")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "date")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "gYearMonth"))) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 ~ p5 ~ p6 ~ p7 ~ p8 ~ p9 ~ p10 => general.SingularBuiltInTypeTestSequence1(scalaxb.fromXML[String](p1, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[Boolean](p2, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[BigDecimal](p3, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[Float](p4, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[Double](p5, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[javax.xml.datatype.Duration](p6, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[javax.xml.datatype.XMLGregorianCalendar](p7, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[javax.xml.datatype.XMLGregorianCalendar](p8, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[javax.xml.datatype.XMLGregorianCalendar](p9, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[javax.xml.datatype.XMLGregorianCalendar](p10, scalaxb.ElemName(node) :: stack)) }) ~ | |
(((scalaxb.ElemName(Some("http://www.example.com/general"), "gYear")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "gMonthDay")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "gDay")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "gMonth")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "hexBinary")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "base64Binary")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "anyURI")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "QName")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "NOTATION")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "normalizedString"))) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 ~ p5 ~ p6 ~ p7 ~ p8 ~ p9 ~ p10 => general.SingularBuiltInTypeTestSequence2(scalaxb.fromXML[javax.xml.datatype.XMLGregorianCalendar](p1, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[javax.xml.datatype.XMLGregorianCalendar](p2, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[javax.xml.datatype.XMLGregorianCalendar](p3, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[javax.xml.datatype.XMLGregorianCalendar](p4, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[scalaxb.HexBinary](p5, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[scalaxb.Base64Binary](p6, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[java.net.URI](p7, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[javax.xml.namespace.QName](p8, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[javax.xml.namespace.QName](p9, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[String](p10, scalaxb.ElemName(node) :: stack)) }) ~ | |
(((scalaxb.ElemName(Some("http://www.example.com/general"), "token")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "language")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "NMTOKEN")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "NMTOKENS")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "Name")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "NCName")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "ID")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "IDREF")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "IDREFS")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "ENTITY"))) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 ~ p5 ~ p6 ~ p7 ~ p8 ~ p9 ~ p10 => general.SingularBuiltInTypeTestSequence3(scalaxb.fromXML[String](p1, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[String](p2, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[String](p3, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[Seq[String]](p4, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[String](p5, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[String](p6, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[String](p7, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[String](p8, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[Seq[String]](p9, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[String](p10, scalaxb.ElemName(node) :: stack)) }) ~ | |
(((scalaxb.ElemName(Some("http://www.example.com/general"), "ENTITIES")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "integer")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "nonPositiveInteger")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "negativeInteger")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "long")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "int")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "short")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "byte")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "nonNegativeInteger")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "unsignedLong"))) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 ~ p5 ~ p6 ~ p7 ~ p8 ~ p9 ~ p10 => general.SingularBuiltInTypeTestSequence4(scalaxb.fromXML[Seq[String]](p1, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[BigInt](p2, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[BigInt](p3, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[BigInt](p4, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[Long](p5, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[Int](p6, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[Short](p7, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[Byte](p8, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[BigInt](p9, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[BigInt](p10, scalaxb.ElemName(node) :: stack)) }) ~ | |
(((scalaxb.ElemName(Some("http://www.example.com/general"), "unsignedInt")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "unsignedShort")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "unsignedByte")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "positiveInteger")) ~ | |
(any(_ => true)) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "anySimpleType"))) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 ~ p5 ~ p6 => general.SingularBuiltInTypeTestSequence5(scalaxb.fromXML[Long](p1, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[Int](p2, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[Int](p3, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[BigInt](p4, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[scalaxb.DataRecord[Any]](p5, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[scalaxb.DataRecord[Any]](p6, scalaxb.ElemName(node) :: stack)) }) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 ~ p5 => | |
general.SingularBuiltInTypeTest(p1, | |
p2, | |
p3, | |
p4, | |
p5) } | |
def writesChildNodes(__obj: general.SingularBuiltInTypeTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(scalaxb.toXML[general.SingularBuiltInTypeTestSequence1](__obj.singularbuiltintypetestsequence1, None, Some("singularbuiltintypetestsequence1"), __scope, false), | |
scalaxb.toXML[general.SingularBuiltInTypeTestSequence2](__obj.singularbuiltintypetestsequence2, None, Some("singularbuiltintypetestsequence2"), __scope, false), | |
scalaxb.toXML[general.SingularBuiltInTypeTestSequence3](__obj.singularbuiltintypetestsequence3, None, Some("singularbuiltintypetestsequence3"), __scope, false), | |
scalaxb.toXML[general.SingularBuiltInTypeTestSequence4](__obj.singularbuiltintypetestsequence4, None, Some("singularbuiltintypetestsequence4"), __scope, false), | |
scalaxb.toXML[general.SingularBuiltInTypeTestSequence5](__obj.singularbuiltintypetestsequence5, None, Some("singularbuiltintypetestsequence5"), __scope, false)) | |
} | |
trait DefaultGeneralSingularBuiltInTypeTestSequence1Format extends scalaxb.XMLFormat[general.SingularBuiltInTypeTestSequence1] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.SingularBuiltInTypeTestSequence1] = Left("don't call me.") | |
def writes(__obj: general.SingularBuiltInTypeTestSequence1, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
Seq.concat(scalaxb.toXML[String](__obj.string, Some("http://www.example.com/general"), Some("string"), __scope, false), | |
scalaxb.toXML[Boolean](__obj.boolean, Some("http://www.example.com/general"), Some("boolean"), __scope, false), | |
scalaxb.toXML[BigDecimal](__obj.decimal, Some("http://www.example.com/general"), Some("decimal"), __scope, false), | |
scalaxb.toXML[Float](__obj.float, Some("http://www.example.com/general"), Some("float"), __scope, false), | |
scalaxb.toXML[Double](__obj.double, Some("http://www.example.com/general"), Some("double"), __scope, false), | |
scalaxb.toXML[javax.xml.datatype.Duration](__obj.duration, Some("http://www.example.com/general"), Some("duration"), __scope, false), | |
scalaxb.toXML[javax.xml.datatype.XMLGregorianCalendar](__obj.dateTime, Some("http://www.example.com/general"), Some("dateTime"), __scope, false), | |
scalaxb.toXML[javax.xml.datatype.XMLGregorianCalendar](__obj.time, Some("http://www.example.com/general"), Some("time"), __scope, false), | |
scalaxb.toXML[javax.xml.datatype.XMLGregorianCalendar](__obj.date, Some("http://www.example.com/general"), Some("date"), __scope, false), | |
scalaxb.toXML[javax.xml.datatype.XMLGregorianCalendar](__obj.gYearMonth, Some("http://www.example.com/general"), Some("gYearMonth"), __scope, false)) | |
} | |
trait DefaultGeneralSingularBuiltInTypeTestSequence2Format extends scalaxb.XMLFormat[general.SingularBuiltInTypeTestSequence2] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.SingularBuiltInTypeTestSequence2] = Left("don't call me.") | |
def writes(__obj: general.SingularBuiltInTypeTestSequence2, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
Seq.concat(scalaxb.toXML[javax.xml.datatype.XMLGregorianCalendar](__obj.gYear, Some("http://www.example.com/general"), Some("gYear"), __scope, false), | |
scalaxb.toXML[javax.xml.datatype.XMLGregorianCalendar](__obj.gMonthDay, Some("http://www.example.com/general"), Some("gMonthDay"), __scope, false), | |
scalaxb.toXML[javax.xml.datatype.XMLGregorianCalendar](__obj.gDay, Some("http://www.example.com/general"), Some("gDay"), __scope, false), | |
scalaxb.toXML[javax.xml.datatype.XMLGregorianCalendar](__obj.gMonth, Some("http://www.example.com/general"), Some("gMonth"), __scope, false), | |
scalaxb.toXML[scalaxb.HexBinary](__obj.hexBinary, Some("http://www.example.com/general"), Some("hexBinary"), __scope, false), | |
scalaxb.toXML[scalaxb.Base64Binary](__obj.base64Binary, Some("http://www.example.com/general"), Some("base64Binary"), __scope, false), | |
scalaxb.toXML[java.net.URI](__obj.anyURI, Some("http://www.example.com/general"), Some("anyURI"), __scope, false), | |
scalaxb.toXML[javax.xml.namespace.QName](__obj.QName, Some("http://www.example.com/general"), Some("QName"), __scope, false), | |
scalaxb.toXML[javax.xml.namespace.QName](__obj.NOTATION, Some("http://www.example.com/general"), Some("NOTATION"), __scope, false), | |
scalaxb.toXML[String](__obj.normalizedString, Some("http://www.example.com/general"), Some("normalizedString"), __scope, false)) | |
} | |
trait DefaultGeneralSingularBuiltInTypeTestSequence3Format extends scalaxb.XMLFormat[general.SingularBuiltInTypeTestSequence3] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.SingularBuiltInTypeTestSequence3] = Left("don't call me.") | |
def writes(__obj: general.SingularBuiltInTypeTestSequence3, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
Seq.concat(scalaxb.toXML[String](__obj.token, Some("http://www.example.com/general"), Some("token"), __scope, false), | |
scalaxb.toXML[String](__obj.language, Some("http://www.example.com/general"), Some("language"), __scope, false), | |
scalaxb.toXML[String](__obj.NMTOKEN, Some("http://www.example.com/general"), Some("NMTOKEN"), __scope, false), | |
scalaxb.toXML[Seq[String]](__obj.NMTOKENS, Some("http://www.example.com/general"), Some("NMTOKENS"), __scope, false), | |
scalaxb.toXML[String](__obj.Name, Some("http://www.example.com/general"), Some("Name"), __scope, false), | |
scalaxb.toXML[String](__obj.NCName, Some("http://www.example.com/general"), Some("NCName"), __scope, false), | |
scalaxb.toXML[String](__obj.ID, Some("http://www.example.com/general"), Some("ID"), __scope, false), | |
scalaxb.toXML[String](__obj.IDREF, Some("http://www.example.com/general"), Some("IDREF"), __scope, false), | |
scalaxb.toXML[Seq[String]](__obj.IDREFS, Some("http://www.example.com/general"), Some("IDREFS"), __scope, false), | |
scalaxb.toXML[String](__obj.ENTITY, Some("http://www.example.com/general"), Some("ENTITY"), __scope, false)) | |
} | |
trait DefaultGeneralSingularBuiltInTypeTestSequence4Format extends scalaxb.XMLFormat[general.SingularBuiltInTypeTestSequence4] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.SingularBuiltInTypeTestSequence4] = Left("don't call me.") | |
def writes(__obj: general.SingularBuiltInTypeTestSequence4, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
Seq.concat(scalaxb.toXML[Seq[String]](__obj.ENTITIES, Some("http://www.example.com/general"), Some("ENTITIES"), __scope, false), | |
scalaxb.toXML[BigInt](__obj.integer, Some("http://www.example.com/general"), Some("integer"), __scope, false), | |
scalaxb.toXML[BigInt](__obj.nonPositiveInteger, Some("http://www.example.com/general"), Some("nonPositiveInteger"), __scope, false), | |
scalaxb.toXML[BigInt](__obj.negativeInteger, Some("http://www.example.com/general"), Some("negativeInteger"), __scope, false), | |
scalaxb.toXML[Long](__obj.long, Some("http://www.example.com/general"), Some("long"), __scope, false), | |
scalaxb.toXML[Int](__obj.int, Some("http://www.example.com/general"), Some("int"), __scope, false), | |
scalaxb.toXML[Short](__obj.short, Some("http://www.example.com/general"), Some("short"), __scope, false), | |
scalaxb.toXML[Byte](__obj.byte, Some("http://www.example.com/general"), Some("byte"), __scope, false), | |
scalaxb.toXML[BigInt](__obj.nonNegativeInteger, Some("http://www.example.com/general"), Some("nonNegativeInteger"), __scope, false), | |
scalaxb.toXML[BigInt](__obj.unsignedLong, Some("http://www.example.com/general"), Some("unsignedLong"), __scope, false)) | |
} | |
trait DefaultGeneralSingularBuiltInTypeTestSequence5Format extends scalaxb.XMLFormat[general.SingularBuiltInTypeTestSequence5] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.SingularBuiltInTypeTestSequence5] = Left("don't call me.") | |
def writes(__obj: general.SingularBuiltInTypeTestSequence5, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
Seq.concat(scalaxb.toXML[Long](__obj.unsignedInt, Some("http://www.example.com/general"), Some("unsignedInt"), __scope, false), | |
scalaxb.toXML[Int](__obj.unsignedShort, Some("http://www.example.com/general"), Some("unsignedShort"), __scope, false), | |
scalaxb.toXML[Int](__obj.unsignedByte, Some("http://www.example.com/general"), Some("unsignedByte"), __scope, false), | |
scalaxb.toXML[BigInt](__obj.positiveInteger, Some("http://www.example.com/general"), Some("positiveInteger"), __scope, false), | |
Some(__obj.anyType) map {x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, true)} get, | |
Some(__obj.anySimpleType) map {x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, true)} get) | |
} | |
trait DefaultGeneralSingularComplexTypeTestFormat extends scalaxb.ElemNameParser[general.SingularComplexTypeTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("SingularComplexTypeTest") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.SingularComplexTypeTest] = | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "person1")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "person2")) ~ | |
opt(scalaxb.ElemName(Some("http://www.example.com/general"), "person3")) ~ | |
opt(scalaxb.ElemName(Some("http://www.example.com/general"), "person4")) ~ | |
rep(scalaxb.ElemName(Some("http://www.example.com/general"), "person5")) ~ | |
rep(scalaxb.ElemName(Some("http://www.example.com/general"), "person6")) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 ~ p5 ~ p6 => | |
general.SingularComplexTypeTest(scalaxb.fromXML[general.Person](p1, scalaxb.ElemName(node) :: stack), | |
p2.nilOption map { scalaxb.fromXML[general.Person](_, scalaxb.ElemName(node) :: stack) }, | |
p3.headOption map { scalaxb.fromXML[general.Person](_, scalaxb.ElemName(node) :: stack) }, | |
p4.headOption map { _.nilOption map { scalaxb.fromXML[general.Person](_, scalaxb.ElemName(node) :: stack) }}, | |
p5.toSeq map { scalaxb.fromXML[general.Person](_, scalaxb.ElemName(node) :: stack) }, | |
p6.toSeq map { _.nilOption map { scalaxb.fromXML[general.Person](_, scalaxb.ElemName(node) :: stack) }}) } | |
def writesChildNodes(__obj: general.SingularComplexTypeTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(scalaxb.toXML[general.Person](__obj.person1, Some("http://www.example.com/general"), Some("person1"), __scope, false), | |
scalaxb.toXML[Option[general.Person]](__obj.person2, Some("http://www.example.com/general"), Some("person2"), __scope, false), | |
__obj.person3 map { scalaxb.toXML[general.Person](_, Some("http://www.example.com/general"), Some("person3"), __scope, false) } getOrElse {Nil}, | |
__obj.person4 map { scalaxb.toXML[Option[general.Person]](_, Some("http://www.example.com/general"), Some("person4"), __scope, false) } getOrElse {Nil}, | |
__obj.person5 flatMap { scalaxb.toXML[general.Person](_, Some("http://www.example.com/general"), Some("person5"), __scope, false) }, | |
__obj.person6 flatMap { scalaxb.toXML[Option[general.Person]](_, Some("http://www.example.com/general"), Some("person6"), __scope, false) }) | |
} | |
trait DefaultGeneralNillablePersonStarTestFormat extends scalaxb.ElemNameParser[general.NillablePersonStarTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("NillablePersonStarTest") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.NillablePersonStarTest] = | |
rep(scalaxb.ElemName(Some("http://www.example.com/general"), "person")) ^^ | |
{ case p1 => | |
general.NillablePersonStarTest(p1.toSeq map { _.nilOption map { scalaxb.fromXML[general.Person](_, scalaxb.ElemName(node) :: stack) }}: _*) } | |
def writesChildNodes(__obj: general.NillablePersonStarTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.person flatMap { scalaxb.toXML[Option[general.Person]](_, Some("http://www.example.com/general"), Some("person"), __scope, false) }) | |
} | |
trait DefaultGeneralChoiceComplexTypeTestFormat extends scalaxb.ElemNameParser[general.ChoiceComplexTypeTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("ChoiceComplexTypeTest") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.ChoiceComplexTypeTest] = | |
(((scalaxb.ElemName(Some("http://www.example.com/general"), "person1")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[general.Person](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://www.example.com/general"), "address1")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[general.Addressable](x, scalaxb.ElemName(node) :: stack))))) ~ | |
(((scalaxb.ElemName(Some("http://www.example.com/general"), "person2")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), x.nilOption map {scalaxb.fromXML[general.Person](_, scalaxb.ElemName(node) :: stack)}))) | | |
((scalaxb.ElemName(Some("http://www.example.com/general"), "address2")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), x.nilOption map {scalaxb.fromXML[general.Addressable](_, scalaxb.ElemName(node) :: stack)})))) ~ | |
opt(((scalaxb.ElemName(Some("http://www.example.com/general"), "person3")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[general.Person](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://www.example.com/general"), "address3")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[general.Addressable](x, scalaxb.ElemName(node) :: stack))))) ~ | |
opt(((scalaxb.ElemName(Some("http://www.example.com/general"), "person4")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), x.nilOption map {scalaxb.fromXML[general.Person](_, scalaxb.ElemName(node) :: stack)}))) | | |
((scalaxb.ElemName(Some("http://www.example.com/general"), "address4")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), x.nilOption map {scalaxb.fromXML[general.Addressable](_, scalaxb.ElemName(node) :: stack)})))) ~ | |
rep(((scalaxb.ElemName(Some("http://www.example.com/general"), "person5")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[general.Person](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://www.example.com/general"), "address5")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[general.Addressable](x, scalaxb.ElemName(node) :: stack))))) ~ | |
rep(((scalaxb.ElemName(Some("http://www.example.com/general"), "person6")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), x.nilOption map {scalaxb.fromXML[general.Person](_, scalaxb.ElemName(node) :: stack)}))) | | |
((scalaxb.ElemName(Some("http://www.example.com/general"), "address6")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), x.nilOption map {scalaxb.fromXML[general.Addressable](_, scalaxb.ElemName(node) :: stack)})))) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 ~ p5 ~ p6 => | |
general.ChoiceComplexTypeTest(p1, | |
p2, | |
p3, | |
p4, | |
p5.toSeq, | |
p6.toSeq) } | |
def writesChildNodes(__obj: general.ChoiceComplexTypeTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(Some(__obj.choicecomplextypetestoption) map {x => scalaxb.toXML[scalaxb.DataRecord[general.ChoiceComplexTypeTestOption]](x, x.namespace, x.key, __scope, false)} get, | |
Some(__obj.choicecomplextypetestoption2) map {x => scalaxb.toXML[scalaxb.DataRecord[Option[general.ChoiceComplexTypeTestOption2]]](x, x.namespace, x.key, __scope, false)} get, | |
__obj.choicecomplextypetestoption3 map { x => scalaxb.toXML[scalaxb.DataRecord[general.ChoiceComplexTypeTestOption3]](x, x.namespace, x.key, __scope, false) } getOrElse {Nil}, | |
__obj.choicecomplextypetestoption4 map { x => scalaxb.toXML[scalaxb.DataRecord[Option[general.ChoiceComplexTypeTestOption4]]](x, x.namespace, x.key, __scope, false) } getOrElse {Nil}, | |
__obj.choicecomplextypetestoption5 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[general.ChoiceComplexTypeTestOption5]](x, x.namespace, x.key, __scope, false) }, | |
__obj.choicecomplextypetestoption6 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Option[general.ChoiceComplexTypeTestOption6]]](x, x.namespace, x.key, __scope, false) }) | |
} | |
trait DefaultGeneralSingularSimpleTypeTestFormat extends scalaxb.ElemNameParser[general.SingularSimpleTypeTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("SingularSimpleTypeTest") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.SingularSimpleTypeTest] = | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "number1")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "number2")) ~ | |
opt(scalaxb.ElemName(Some("http://www.example.com/general"), "number3")) ~ | |
opt(scalaxb.ElemName(Some("http://www.example.com/general"), "number4")) ~ | |
rep(scalaxb.ElemName(Some("http://www.example.com/general"), "number5")) ~ | |
rep(scalaxb.ElemName(Some("http://www.example.com/general"), "number6")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "milk1")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "milk2")) ~ | |
opt(scalaxb.ElemName(Some("http://www.example.com/general"), "milk3")) ~ | |
opt(scalaxb.ElemName(Some("http://www.example.com/general"), "milk4")) ~ | |
rep(scalaxb.ElemName(Some("http://www.example.com/general"), "milk5")) ~ | |
rep(scalaxb.ElemName(Some("http://www.example.com/general"), "milk6")) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 ~ p5 ~ p6 ~ p7 ~ p8 ~ p9 ~ p10 ~ p11 ~ p12 => | |
general.SingularSimpleTypeTest(scalaxb.fromXML[Long](p1, scalaxb.ElemName(node) :: stack), | |
p2.nilOption map { scalaxb.fromXML[Long](_, scalaxb.ElemName(node) :: stack) }, | |
p3.headOption map { scalaxb.fromXML[Long](_, scalaxb.ElemName(node) :: stack) }, | |
p4.headOption map { _.nilOption map { scalaxb.fromXML[Long](_, scalaxb.ElemName(node) :: stack) }}, | |
p5.toSeq map { scalaxb.fromXML[Long](_, scalaxb.ElemName(node) :: stack) }, | |
p6.toSeq map { _.nilOption map { scalaxb.fromXML[Long](_, scalaxb.ElemName(node) :: stack) }}, | |
scalaxb.fromXML[general.MilkType](p7, scalaxb.ElemName(node) :: stack), | |
p8.nilOption map { scalaxb.fromXML[general.MilkType](_, scalaxb.ElemName(node) :: stack) }, | |
p9.headOption map { scalaxb.fromXML[general.MilkType](_, scalaxb.ElemName(node) :: stack) }, | |
p10.headOption map { _.nilOption map { scalaxb.fromXML[general.MilkType](_, scalaxb.ElemName(node) :: stack) }}, | |
p11.toSeq map { scalaxb.fromXML[general.MilkType](_, scalaxb.ElemName(node) :: stack) }, | |
p12.toSeq map { _.nilOption map { scalaxb.fromXML[general.MilkType](_, scalaxb.ElemName(node) :: stack) }}, | |
(node \ "@attr1").headOption map { scalaxb.fromXML[Long](_, scalaxb.ElemName(node) :: stack) }, | |
(node \ "@attr2").headOption map { scalaxb.fromXML[general.MilkType](_, scalaxb.ElemName(node) :: stack) }) } | |
override def writesAttribute(__obj: general.SingularSimpleTypeTest, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attr_attr1 foreach { x => attr = scala.xml.Attribute(null, "attr1", x.toString, attr) } | |
__obj.attr_attr2 foreach { x => attr = scala.xml.Attribute(null, "attr2", x.toString, attr) } | |
attr | |
} | |
def writesChildNodes(__obj: general.SingularSimpleTypeTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(scalaxb.toXML[Long](__obj.number1, Some("http://www.example.com/general"), Some("number1"), __scope, false), | |
scalaxb.toXML[Option[Long]](__obj.number2, Some("http://www.example.com/general"), Some("number2"), __scope, false), | |
__obj.number3 map { scalaxb.toXML[Long](_, Some("http://www.example.com/general"), Some("number3"), __scope, false) } getOrElse {Nil}, | |
__obj.number4 map { scalaxb.toXML[Option[Long]](_, Some("http://www.example.com/general"), Some("number4"), __scope, false) } getOrElse {Nil}, | |
__obj.number5 flatMap { scalaxb.toXML[Long](_, Some("http://www.example.com/general"), Some("number5"), __scope, false) }, | |
__obj.number6 flatMap { scalaxb.toXML[Option[Long]](_, Some("http://www.example.com/general"), Some("number6"), __scope, false) }, | |
scalaxb.toXML[general.MilkType](__obj.milk1, Some("http://www.example.com/general"), Some("milk1"), __scope, false), | |
scalaxb.toXML[Option[general.MilkType]](__obj.milk2, Some("http://www.example.com/general"), Some("milk2"), __scope, false), | |
__obj.milk3 map { scalaxb.toXML[general.MilkType](_, Some("http://www.example.com/general"), Some("milk3"), __scope, false) } getOrElse {Nil}, | |
__obj.milk4 map { scalaxb.toXML[Option[general.MilkType]](_, Some("http://www.example.com/general"), Some("milk4"), __scope, false) } getOrElse {Nil}, | |
__obj.milk5 flatMap { scalaxb.toXML[general.MilkType](_, Some("http://www.example.com/general"), Some("milk5"), __scope, false) }, | |
__obj.milk6 flatMap { scalaxb.toXML[Option[general.MilkType]](_, Some("http://www.example.com/general"), Some("milk6"), __scope, false) }) | |
} | |
trait DefaultGeneralListTestFormat extends scalaxb.ElemNameParser[general.ListTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("ListTest") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.ListTest] = | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "numbers1")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "numbers2")) ~ | |
opt(scalaxb.ElemName(Some("http://www.example.com/general"), "numbers3")) ~ | |
opt(scalaxb.ElemName(Some("http://www.example.com/general"), "numbers4")) ~ | |
rep(scalaxb.ElemName(Some("http://www.example.com/general"), "numbers5")) ~ | |
rep(scalaxb.ElemName(Some("http://www.example.com/general"), "numbers6")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "numbers7")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "milk1")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "milk2")) ~ | |
opt(scalaxb.ElemName(Some("http://www.example.com/general"), "milk3")) ~ | |
opt(scalaxb.ElemName(Some("http://www.example.com/general"), "milk4")) ~ | |
rep(scalaxb.ElemName(Some("http://www.example.com/general"), "milk5")) ~ | |
rep(scalaxb.ElemName(Some("http://www.example.com/general"), "milk6")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "milk7")) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 ~ p5 ~ p6 ~ p7 ~ p8 ~ p9 ~ p10 ~ p11 ~ p12 ~ p13 ~ p14 => | |
general.ListTest(scalaxb.fromXML[Seq[Long]](p1, scalaxb.ElemName(node) :: stack), | |
p2.nilOption map { scalaxb.fromXML[Seq[Long]](_, scalaxb.ElemName(node) :: stack) }, | |
p3.headOption map { scalaxb.fromXML[Seq[Long]](_, scalaxb.ElemName(node) :: stack) }, | |
p4.headOption map { _.nilOption map { scalaxb.fromXML[Seq[Long]](_, scalaxb.ElemName(node) :: stack) }}, | |
p5.toSeq map { scalaxb.fromXML[Seq[Long]](_, scalaxb.ElemName(node) :: stack) }, | |
p6.toSeq map { _.nilOption map { scalaxb.fromXML[Seq[Long]](_, scalaxb.ElemName(node) :: stack) }}, | |
scalaxb.fromXML[Seq[Long]](p7, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[Seq[general.MilkType]](p8, scalaxb.ElemName(node) :: stack), | |
p9.nilOption map { scalaxb.fromXML[Seq[general.MilkType]](_, scalaxb.ElemName(node) :: stack) }, | |
p10.headOption map { scalaxb.fromXML[Seq[general.MilkType]](_, scalaxb.ElemName(node) :: stack) }, | |
p11.headOption map { _.nilOption map { scalaxb.fromXML[Seq[general.MilkType]](_, scalaxb.ElemName(node) :: stack) }}, | |
p12.toSeq map { scalaxb.fromXML[Seq[general.MilkType]](_, scalaxb.ElemName(node) :: stack) }, | |
p13.toSeq map { _.nilOption map { scalaxb.fromXML[Seq[general.MilkType]](_, scalaxb.ElemName(node) :: stack) }}, | |
scalaxb.fromXML[Seq[general.MilkType]](p14, scalaxb.ElemName(node) :: stack), | |
(node \ "@attr1").headOption map { scalaxb.fromXML[Seq[Long]](_, scalaxb.ElemName(node) :: stack) }, | |
(node \ "@attr2").headOption map { scalaxb.fromXML[Seq[general.MilkType]](_, scalaxb.ElemName(node) :: stack) }) } | |
override def writesAttribute(__obj: general.ListTest, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attr_attr1 foreach { x => attr = scala.xml.Attribute(null, "attr1", x.map(x => x.toString).mkString(" "), attr) } | |
__obj.attr_attr2 foreach { x => attr = scala.xml.Attribute(null, "attr2", x.map(x => x.toString).mkString(" "), attr) } | |
attr | |
} | |
def writesChildNodes(__obj: general.ListTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(scalaxb.toXML[Seq[Long]](__obj.numbers1, Some("http://www.example.com/general"), Some("numbers1"), __scope, false), | |
scalaxb.toXML[Option[Seq[Long]]](__obj.numbers2, Some("http://www.example.com/general"), Some("numbers2"), __scope, false), | |
__obj.numbers3 map { scalaxb.toXML[Seq[Long]](_, Some("http://www.example.com/general"), Some("numbers3"), __scope, false) } getOrElse {Nil}, | |
__obj.numbers4 map { scalaxb.toXML[Option[Seq[Long]]](_, Some("http://www.example.com/general"), Some("numbers4"), __scope, false) } getOrElse {Nil}, | |
__obj.numbers5 flatMap { scalaxb.toXML[Seq[Long]](_, Some("http://www.example.com/general"), Some("numbers5"), __scope, false) }, | |
__obj.numbers6 flatMap { scalaxb.toXML[Option[Seq[Long]]](_, Some("http://www.example.com/general"), Some("numbers6"), __scope, false) }, | |
scalaxb.toXML[Seq[Long]](__obj.numbers7, Some("http://www.example.com/general"), Some("numbers7"), __scope, false), | |
scalaxb.toXML[Seq[general.MilkType]](__obj.milk1, Some("http://www.example.com/general"), Some("milk1"), __scope, false), | |
scalaxb.toXML[Option[Seq[general.MilkType]]](__obj.milk2, Some("http://www.example.com/general"), Some("milk2"), __scope, false), | |
__obj.milk3 map { scalaxb.toXML[Seq[general.MilkType]](_, Some("http://www.example.com/general"), Some("milk3"), __scope, false) } getOrElse {Nil}, | |
__obj.milk4 map { scalaxb.toXML[Option[Seq[general.MilkType]]](_, Some("http://www.example.com/general"), Some("milk4"), __scope, false) } getOrElse {Nil}, | |
__obj.milk5 flatMap { scalaxb.toXML[Seq[general.MilkType]](_, Some("http://www.example.com/general"), Some("milk5"), __scope, false) }, | |
__obj.milk6 flatMap { scalaxb.toXML[Option[Seq[general.MilkType]]](_, Some("http://www.example.com/general"), Some("milk6"), __scope, false) }, | |
scalaxb.toXML[Seq[general.MilkType]](__obj.milk7, Some("http://www.example.com/general"), Some("milk7"), __scope, false)) | |
} | |
trait DefaultGeneralAnyTestFormat extends scalaxb.ElemNameParser[general.AnyTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("AnyTest") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.AnyTest] = | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "person1")) ~ | |
(any(_.namespace != Some("http://www.example.com/general"))) ~ | |
(any(x => List(None) contains x.namespace)) ~ | |
((((scalaxb.ElemName(Some("http://www.example.com/general"), "person2")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), x.nilOption map {scalaxb.fromXML[general.Person](_, scalaxb.ElemName(node) :: stack)})))) | | |
((any(_.namespace != Some("http://www.example.com/general")) ^^ (scalaxb.fromXML[scalaxb.DataRecord[Option[Any]]](_, scalaxb.ElemName(node) :: stack))))) ~ | |
opt(scalaxb.ElemName(Some("http://www.example.com/general"), "person3")) ~ | |
opt(any(_.namespace != Some("http://www.example.com/general"))) ~ | |
opt((((scalaxb.ElemName(Some("http://www.example.com/general"), "person4")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), x.nilOption map {scalaxb.fromXML[general.Person](_, scalaxb.ElemName(node) :: stack)})))) | | |
((any(_.namespace != Some("http://www.example.com/general")) ^^ (scalaxb.fromXML[scalaxb.DataRecord[Option[Any]]](_, scalaxb.ElemName(node) :: stack))))) ~ | |
rep(any(_.namespace != Some("http://www.example.com/general"))) ~ | |
rep(scalaxb.ElemName(Some("http://www.example.com/general"), "person5")) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 ~ p5 ~ p6 ~ p7 ~ p8 ~ p9 => | |
general.AnyTest(scalaxb.fromXML[general.Person](p1, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[scalaxb.DataRecord[Any]](p2, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[scalaxb.DataRecord[Any]](p3, scalaxb.ElemName(node) :: stack), | |
p4, | |
p5.headOption map { scalaxb.fromXML[general.Person](_, scalaxb.ElemName(node) :: stack) }, | |
p6.headOption map { scalaxb.fromXML[scalaxb.DataRecord[Any]](_, scalaxb.ElemName(node) :: stack) }, | |
p7, | |
p8.toSeq map { scalaxb.fromXML[scalaxb.DataRecord[Any]](_, scalaxb.ElemName(node) :: stack) }, | |
p9.toSeq map { scalaxb.fromXML[general.Person](_, scalaxb.ElemName(node) :: stack) }) } | |
def writesChildNodes(__obj: general.AnyTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(scalaxb.toXML[general.Person](__obj.person1, Some("http://www.example.com/general"), Some("person1"), __scope, false), | |
Some(__obj.any) map {x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, true)} get, | |
Some(__obj.any2) map {x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, true)} get, | |
Some(__obj.anytestoption) map {x => scalaxb.toXML[scalaxb.DataRecord[Option[Any]]](x, x.namespace, x.key, __scope, false)} get, | |
__obj.person3 map { scalaxb.toXML[general.Person](_, Some("http://www.example.com/general"), Some("person3"), __scope, false) } getOrElse {Nil}, | |
__obj.any3 map { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, true) } getOrElse {Nil}, | |
__obj.anytestoption2 map { x => scalaxb.toXML[scalaxb.DataRecord[Option[Any]]](x, x.namespace, x.key, __scope, false) } getOrElse {Nil}, | |
__obj.any4 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, true) }, | |
__obj.person5 flatMap { scalaxb.toXML[general.Person](_, Some("http://www.example.com/general"), Some("person5"), __scope, false) }) | |
} | |
trait DefaultGeneralAnyTypeTestFormat extends scalaxb.ElemNameParser[general.AnyTypeTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("AnyTypeTest") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.AnyTypeTest] = | |
(any(_ => true)) ~ | |
(any(_ => true)) ~ | |
opt(any(_ => true)) ~ | |
opt(any(_ => true)) ~ | |
rep(any(_ => true)) ~ | |
rep(any(_ => true)) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 ~ p5 ~ p6 => | |
general.AnyTypeTest(scalaxb.fromXML[scalaxb.DataRecord[Any]](p1, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[scalaxb.DataRecord[Option[Any]]](p2, scalaxb.ElemName(node) :: stack), | |
p3.headOption map { scalaxb.fromXML[scalaxb.DataRecord[Any]](_, scalaxb.ElemName(node) :: stack) }, | |
p4.headOption map { scalaxb.fromXML[scalaxb.DataRecord[Option[Any]]](_, scalaxb.ElemName(node) :: stack) }, | |
p5.toSeq map { scalaxb.fromXML[scalaxb.DataRecord[Any]](_, scalaxb.ElemName(node) :: stack) }, | |
p6.toSeq map { scalaxb.fromXML[scalaxb.DataRecord[Option[Any]]](_, scalaxb.ElemName(node) :: stack) }) } | |
def writesChildNodes(__obj: general.AnyTypeTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(Some(__obj.any1) map {x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, true)} get, | |
Some(__obj.any2) map {x => scalaxb.toXML[scalaxb.DataRecord[Option[Any]]](x, x.namespace, x.key, __scope, false)} get, | |
__obj.any3 map { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, true) } getOrElse {Nil}, | |
__obj.any4 map { x => scalaxb.toXML[scalaxb.DataRecord[Option[Any]]](x, x.namespace, x.key, __scope, false) } getOrElse {Nil}, | |
__obj.any5 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, true) }, | |
__obj.any6 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Option[Any]]](x, x.namespace, x.key, __scope, false) }) | |
} | |
trait DefaultGeneralLongAllTestFormat extends scalaxb.XMLFormat[general.LongAllTest] with scalaxb.CanWriteChildNodes[general.LongAllTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.LongAllTest] = seq match { | |
case node: scala.xml.Node => Right(general.LongAllTest(scala.collection.immutable.ListMap(List( | |
(node \ "address1").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[general.Addressable](x, scalaxb.ElemName(node) :: stack)) } map { "address1" -> _ }, | |
(node \ "address2").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[general.Addressable](x, scalaxb.ElemName(node) :: stack)) } map { "address2" -> _ }, | |
(node \ "string3").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string3" -> _ }, | |
(node \ "string4").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string4" -> _ }, | |
(node \ "string5").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string5" -> _ }, | |
(node \ "string6").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string6" -> _ }, | |
(node \ "string7").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string7" -> _ }, | |
(node \ "string8").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string8" -> _ }, | |
(node \ "string9").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string9" -> _ }, | |
(node \ "string10").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string10" -> _ }, | |
(node \ "string11").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string11" -> _ }, | |
(node \ "string12").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string12" -> _ }, | |
(node \ "string13").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string13" -> _ }, | |
(node \ "string14").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string14" -> _ }, | |
(node \ "string15").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string15" -> _ }, | |
(node \ "string16").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string16" -> _ }, | |
(node \ "string17").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string17" -> _ }, | |
(node \ "string18").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string18" -> _ }, | |
(node \ "string19").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string19" -> _ }, | |
(node \ "string20").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string20" -> _ }, | |
(node \ "string21").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string21" -> _ }, | |
(node \ "string22").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string22" -> _ }, | |
(node \ "string23").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string23" -> _ }, | |
(node \ "string24").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string24" -> _ }, | |
(node \ "string25").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string25" -> _ }, | |
(node \ "string26").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string26" -> _ }, | |
(node \ "string27").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string27" -> _ }, | |
(node \ "string28").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string28" -> _ }, | |
(node \ "string29").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string29" -> _ }, | |
(node \ "string30").headOption map { x => scalaxb.DataRecord(x, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "string30" -> _ }).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
def writesChildNodes(__obj: general.LongAllTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(scalaxb.toXML[Map[String, scalaxb.DataRecord[Any]]](__obj.all, None, Some("all"), __scope, false)) | |
} | |
trait DefaultGeneralEmptyComplexTypeTestFormat extends scalaxb.XMLFormat[general.EmptyComplexTypeTest] with scalaxb.CanWriteChildNodes[general.EmptyComplexTypeTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.EmptyComplexTypeTest] = seq match { | |
case node: scala.xml.Node => Right(general.EmptyComplexTypeTest()) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
def writesChildNodes(__obj: general.EmptyComplexTypeTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait DefaultGeneralEmptySequenceTestFormat extends scalaxb.XMLFormat[general.EmptySequenceTest] with scalaxb.CanWriteChildNodes[general.EmptySequenceTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.EmptySequenceTest] = seq match { | |
case node: scala.xml.Node => Right(general.EmptySequenceTest()) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
def writesChildNodes(__obj: general.EmptySequenceTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait DefaultGeneralEmptySequenceGroupTestFormat extends scalaxb.XMLFormat[general.EmptySequenceGroupTest] with scalaxb.CanWriteChildNodes[general.EmptySequenceGroupTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.EmptySequenceGroupTest] = seq match { | |
case node: scala.xml.Node => Right(general.EmptySequenceGroupTest()) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
def writesChildNodes(__obj: general.EmptySequenceGroupTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait DefaultGeneralEmptyChoiceGroupTestFormat extends scalaxb.ElemNameParser[general.EmptyChoiceGroupTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("EmptyChoiceGroupTest") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.EmptyChoiceGroupTest] = | |
opt(((scalaxb.ElemName(Some("http://www.example.com/general"), "string1")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack))))) ^^ | |
{ case p1 => | |
general.EmptyChoiceGroupTest(p1) } | |
def writesChildNodes(__obj: general.EmptyChoiceGroupTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.emptychoicegrouptestoption map { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) } getOrElse {Nil}) | |
} | |
trait DefaultGeneralTopLevelMultipleSeqTestFormat extends scalaxb.ElemNameParser[general.TopLevelMultipleSeqTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("TopLevelMultipleSeqTest") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.TopLevelMultipleSeqTest] = | |
rep(((scalaxb.ElemName(Some("http://www.example.com/general"), "firstName")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "lastName"))) ^^ | |
{ case p1 ~ p2 => general.TopLevelMultipleSeqTestSequence1(scalaxb.fromXML[String](p1, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[String](p2, scalaxb.ElemName(node) :: stack)) }) ^^ | |
{ case p1 => | |
general.TopLevelMultipleSeqTest(p1.toSeq: _*) } | |
def writesChildNodes(__obj: general.TopLevelMultipleSeqTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.toplevelmultipleseqtestsequence1 flatMap { scalaxb.toXML[general.TopLevelMultipleSeqTestSequence1](_, None, Some("toplevelmultipleseqtestsequence1"), __scope, false) }) | |
} | |
trait DefaultGeneralTopLevelMultipleSeqTestSequence1Format extends scalaxb.XMLFormat[general.TopLevelMultipleSeqTestSequence1] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.TopLevelMultipleSeqTestSequence1] = Left("don't call me.") | |
def writes(__obj: general.TopLevelMultipleSeqTestSequence1, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
Seq.concat(scalaxb.toXML[String](__obj.firstName, Some("http://www.example.com/general"), Some("firstName"), __scope, false), | |
scalaxb.toXML[String](__obj.lastName, Some("http://www.example.com/general"), Some("lastName"), __scope, false)) | |
} | |
trait DefaultGeneralTopLevelOptionalSeqTestFormat extends scalaxb.ElemNameParser[general.TopLevelOptionalSeqTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("TopLevelOptionalSeqTest") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.TopLevelOptionalSeqTest] = | |
opt(((scalaxb.ElemName(Some("http://www.example.com/general"), "firstName")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "lastName"))) ^^ | |
{ case p1 ~ p2 => general.TopLevelOptionalSeqTestSequence1(scalaxb.fromXML[String](p1, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[String](p2, scalaxb.ElemName(node) :: stack)) }) ^^ | |
{ case p1 => | |
general.TopLevelOptionalSeqTest(p1) } | |
def writesChildNodes(__obj: general.TopLevelOptionalSeqTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.topleveloptionalseqtestsequence1 map { scalaxb.toXML[general.TopLevelOptionalSeqTestSequence1](_, None, Some("topleveloptionalseqtestsequence1"), __scope, false) } getOrElse {Nil}) | |
} | |
trait DefaultGeneralTopLevelOptionalSeqTestSequence1Format extends scalaxb.XMLFormat[general.TopLevelOptionalSeqTestSequence1] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.TopLevelOptionalSeqTestSequence1] = Left("don't call me.") | |
def writes(__obj: general.TopLevelOptionalSeqTestSequence1, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
Seq.concat(scalaxb.toXML[String](__obj.firstName, Some("http://www.example.com/general"), Some("firstName"), __scope, false), | |
scalaxb.toXML[String](__obj.lastName, Some("http://www.example.com/general"), Some("lastName"), __scope, false)) | |
} | |
trait DefaultGeneralTopLevelMultipleSeqAnyTestFormat extends scalaxb.ElemNameParser[general.TopLevelMultipleSeqAnyTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("TopLevelMultipleSeqAnyTest") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.TopLevelMultipleSeqAnyTest] = | |
optTextRecord ~ | |
rep(((any(_.namespace != Some("http://www.example.com/general")) ^^ (scalaxb.fromXML[scalaxb.DataRecord[Any]](_, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), p2.toList) }) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
general.TopLevelMultipleSeqAnyTest(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList)) } | |
def writesChildNodes(__obj: general.TopLevelMultipleSeqAnyTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
__obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) } | |
} | |
trait DefaultGeneralProtocolTypeFormat extends scalaxb.ElemNameParser[general.ProtocolType] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("ProtocolType") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.ProtocolType] = | |
(((any(_ => true) ^^ (scalaxb.fromXML[scalaxb.DataRecord[Any]](_, scalaxb.ElemName(node) :: stack)))) | | |
((any(_ => true) ^^ (scalaxb.fromXML[scalaxb.DataRecord[Any]](_, scalaxb.ElemName(node) :: stack)))) | | |
((any(_ => true) ^^ (scalaxb.fromXML[scalaxb.DataRecord[Any]](_, scalaxb.ElemName(node) :: stack))))) ^^ | |
{ case p1 => | |
general.ProtocolType(p1) } | |
def writesChildNodes(__obj: general.ProtocolType, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(Some(__obj.protocoltypeoption) map {x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false)} get) | |
} | |
trait DefaultGeneralPersonFormat extends scalaxb.ElemNameParser[general.Person] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("Person") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.Person] = | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "firstName")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "lastName")) ^^ | |
{ case p1 ~ p2 => | |
general.Person(scalaxb.fromXML[String](p1, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[String](p2, scalaxb.ElemName(node) :: stack)) } | |
def writesChildNodes(__obj: general.Person, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(scalaxb.toXML[String](__obj.firstName, Some("http://www.example.com/general"), Some("firstName"), __scope, false), | |
scalaxb.toXML[String](__obj.lastName, Some("http://www.example.com/general"), Some("lastName"), __scope, false)) | |
} | |
trait DefaultGeneralAddressableFormat extends scalaxb.XMLFormat[general.Addressable] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.Addressable] = seq match { | |
case node: scala.xml.Node => | |
scalaxb.Helper.instanceType(node) match { | |
case (Some("http://www.example.com/general"), Some("USAddress")) => Right(scalaxb.fromXML[general.USAddress](node, stack)) | |
case _ => Right(scalaxb.fromXML[general.Address](node, stack)) | |
} | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
def writes(__obj: general.Addressable, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = __obj match { | |
case x: general.USAddress => scalaxb.toXML[general.USAddress](x, __namespace, __elementLabel, __scope, true) | |
case x: general.Address => scalaxb.toXML[general.Address](x, __namespace, __elementLabel, __scope, false) | |
} | |
} | |
trait DefaultGeneralAddressFormat extends scalaxb.ElemNameParser[general.Address] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("Address") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.Address] = | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "street")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "city")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "state")) ^^ | |
{ case p1 ~ p2 ~ p3 => | |
general.Address(scalaxb.fromXML[String](p1, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[String](p2, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[String](p3, scalaxb.ElemName(node) :: stack)) } | |
def writesChildNodes(__obj: general.Address, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(scalaxb.toXML[String](__obj.street, Some("http://www.example.com/general"), Some("street"), __scope, false), | |
scalaxb.toXML[String](__obj.city, Some("http://www.example.com/general"), Some("city"), __scope, false), | |
scalaxb.toXML[String](__obj.state, Some("http://www.example.com/general"), Some("state"), __scope, false)) | |
} | |
trait DefaultGeneralUSAddressFormat extends scalaxb.ElemNameParser[general.USAddress] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("USAddress") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.USAddress] = | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "street")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "city")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "state")) ~ | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "zip")) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 => | |
general.USAddress(scalaxb.fromXML[String](p1, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[String](p2, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[String](p3, scalaxb.ElemName(node) :: stack), | |
scalaxb.fromXML[BigInt](p4, scalaxb.ElemName(node) :: stack), | |
scala.collection.immutable.ListMap((node match { | |
case elem: scala.xml.Elem => | |
elem.attributes.toList flatMap { | |
case scala.xml.UnprefixedAttribute(key, value, _) => | |
List(("@" + key, scalaxb.DataRecord(None, Some(key), value.text))) | |
case scala.xml.PrefixedAttribute(pre, key, value, _) => | |
val ns = elem.scope.getURI(pre) | |
List(("@{" + ns + "}" + key, scalaxb.DataRecord(Option[String](ns), Some(key), value.text))) | |
case _ => Nil | |
} | |
case _ => Nil | |
}): _*)) } | |
override def writesAttribute(__obj: general.USAddress, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr) } | |
attr | |
} | |
def writesChildNodes(__obj: general.USAddress, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(scalaxb.toXML[String](__obj.street, Some("http://www.example.com/general"), Some("street"), __scope, false), | |
scalaxb.toXML[String](__obj.city, Some("http://www.example.com/general"), Some("city"), __scope, false), | |
scalaxb.toXML[String](__obj.state, Some("http://www.example.com/general"), Some("state"), __scope, false), | |
scalaxb.toXML[BigInt](__obj.zip, Some("http://www.example.com/general"), Some("zip"), __scope, false)) | |
} | |
def buildGeneralMilkTypeFormat = new DefaultGeneralMilkTypeFormat {} | |
trait DefaultGeneralMilkTypeFormat extends scalaxb.XMLFormat[general.MilkType] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.MilkType] = | |
Right(general.MilkType.fromString(seq.text)) | |
def writes(__obj: general.MilkType, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
scala.xml.Elem(scalaxb.Helper.getPrefix(__namespace, __scope).orNull, | |
__elementLabel getOrElse { error("missing element label.") }, | |
scala.xml.Null, __scope, scala.xml.Text(__obj.toString)) | |
} | |
trait DefaultGeneralComplexListOfMilkFormat extends scalaxb.XMLFormat[general.ComplexListOfMilk] with scalaxb.CanWriteChildNodes[general.ComplexListOfMilk] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.ComplexListOfMilk] = seq match { | |
case node: scala.xml.Node => Right(general.ComplexListOfMilk(scalaxb.fromXML[Seq[general.MilkType]](node, scalaxb.ElemName(node) :: stack), | |
(node \ "@id").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) }, | |
(node \ "@class").headOption map { scalaxb.fromXML[Seq[String]](_, scalaxb.ElemName(node) :: stack) })) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: general.ComplexListOfMilk, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attr_id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
__obj.attr_class foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
attr | |
} | |
def writesChildNodes(__obj: general.ComplexListOfMilk, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq(scala.xml.Text(__obj.value.toString)) | |
} | |
trait DefaultGeneralComplexListOfBuiltInTypeFormat extends scalaxb.XMLFormat[general.ComplexListOfBuiltInType] with scalaxb.CanWriteChildNodes[general.ComplexListOfBuiltInType] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.ComplexListOfBuiltInType] = seq match { | |
case node: scala.xml.Node => Right(general.ComplexListOfBuiltInType(scalaxb.fromXML[Seq[Long]](node, scalaxb.ElemName(node) :: stack), | |
(node \ "@id").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) }, | |
(node \ "@class").headOption map { scalaxb.fromXML[Seq[String]](_, scalaxb.ElemName(node) :: stack) })) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: general.ComplexListOfBuiltInType, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attr_id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
__obj.attr_class foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
attr | |
} | |
def writesChildNodes(__obj: general.ComplexListOfBuiltInType, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq(scala.xml.Text(__obj.value.toString)) | |
} | |
trait DefaultGeneralOtherFormat extends scalaxb.ElemNameParser[general.Other] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.Other] = | |
rep(any(_ => true)) ^^ | |
{ case p1 => | |
general.Other(p1.toSeq map { scalaxb.fromXML[scalaxb.DataRecord[Any]](_, scalaxb.ElemName(node) :: stack) }: _*) } | |
def writesChildNodes(__obj: general.Other, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.any flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, true) }) | |
} | |
trait DefaultGeneralDupeSequenceTestFormat extends scalaxb.ElemNameParser[general.DupeSequenceTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("DupeSequenceTest") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.DupeSequenceTest] = | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "street")) ~ | |
opt(scalaxb.ElemName(Some("http://www.example.com/general"), "other")) ^^ | |
{ case p1 ~ p2 => | |
general.DupeSequenceTest(scalaxb.fromXML[String](p1, scalaxb.ElemName(node) :: stack), | |
p2.headOption map { scalaxb.fromXML[general.Other](_, scalaxb.ElemName(node) :: stack) }) } | |
def writesChildNodes(__obj: general.DupeSequenceTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(scalaxb.toXML[String](__obj.street, Some("http://www.example.com/general"), Some("street"), __scope, false), | |
__obj.other map { scalaxb.toXML[general.Other](_, Some("http://www.example.com/general"), Some("other"), __scope, false) } getOrElse {Nil}) | |
} | |
trait DefaultGeneralOther2Format extends scalaxb.ElemNameParser[general.Other2] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.Other2] = | |
rep(any(_ => true)) ^^ | |
{ case p1 => | |
general.Other2(p1.toSeq map { scalaxb.fromXML[scalaxb.DataRecord[Any]](_, scalaxb.ElemName(node) :: stack) }: _*) } | |
def writesChildNodes(__obj: general.Other2, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.any flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, true) }) | |
} | |
trait DefaultGeneralDupeSequenceTest2Format extends scalaxb.ElemNameParser[general.DupeSequenceTest2] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("DupeSequenceTest2") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.DupeSequenceTest2] = | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "street")) ~ | |
opt(scalaxb.ElemName(Some("http://www.example.com/general"), "other")) ^^ | |
{ case p1 ~ p2 => | |
general.DupeSequenceTest2(scalaxb.fromXML[String](p1, scalaxb.ElemName(node) :: stack), | |
p2.headOption map { scalaxb.fromXML[general.Other2](_, scalaxb.ElemName(node) :: stack) }) } | |
def writesChildNodes(__obj: general.DupeSequenceTest2, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(scalaxb.toXML[String](__obj.street, Some("http://www.example.com/general"), Some("street"), __scope, false), | |
__obj.other map { scalaxb.toXML[general.Other2](_, Some("http://www.example.com/general"), Some("other"), __scope, false) } getOrElse {Nil}) | |
} | |
trait DefaultGeneralSubstitutionGroupTestFormat extends scalaxb.ElemNameParser[general.SubstitutionGroupTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
override def typeName: Option[String] = Some("SubstitutionGroupTest") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.SubstitutionGroupTest] = | |
(((scalaxb.ElemName(Some("http://www.example.com/general"), "SubGroupMember2")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[general.Person](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://www.example.com/general"), "SubGroupMember")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://www.example.com/general"), "subgroupHead")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack))))) ^^ | |
{ case p1 => | |
general.SubstitutionGroupTest(p1) } | |
def writesChildNodes(__obj: general.SubstitutionGroupTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(Some(__obj.subgroupHead) map {x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false)} get) | |
} | |
trait DefaultGeneralLongAttributeTestFormat extends scalaxb.XMLFormat[general.LongAttributeTest] with scalaxb.CanWriteChildNodes[general.LongAttributeTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.LongAttributeTest] = seq match { | |
case node: scala.xml.Node => Right(general.LongAttributeTest(scala.collection.immutable.ListMap(List( | |
(node \ "@milk1").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[general.MilkType](x, scalaxb.ElemName(node) :: stack)) } map { "@milk1" -> _ }, | |
(node \ "@string2").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string2" -> _ }, | |
(node \ "@string3").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string3" -> _ }, | |
(node \ "@string4").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string4" -> _ }, | |
(node \ "@string5").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string5" -> _ }, | |
(node \ "@string6").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string6" -> _ }, | |
(node \ "@string7").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string7" -> _ }, | |
(node \ "@string8").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string8" -> _ }, | |
(node \ "@string9").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string9" -> _ }, | |
(node \ "@string10").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string10" -> _ }, | |
(node \ "@string11").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string11" -> _ }, | |
(node \ "@string12").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string12" -> _ }, | |
(node \ "@string13").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string13" -> _ }, | |
(node \ "@string14").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string14" -> _ }, | |
(node \ "@string15").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string15" -> _ }, | |
(node \ "@string16").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string16" -> _ }, | |
(node \ "@string17").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string17" -> _ }, | |
(node \ "@string18").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string18" -> _ }, | |
(node \ "@string19").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string19" -> _ }, | |
(node \ "@string20").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string20" -> _ }, | |
(node \ "@string21").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string21" -> _ }, | |
(node \ "@string22").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string22" -> _ }, | |
(node \ "@string23").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string23" -> _ }, | |
(node \ "@string24").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string24" -> _ }, | |
(node \ "@string25").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string25" -> _ }, | |
(node \ "@string26").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string26" -> _ }, | |
(node \ "@string27").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string27" -> _ }, | |
(node \ "@string28").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string28" -> _ }, | |
(node \ "@string29").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string29" -> _ }, | |
(node \ "@string30").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@string30" -> _ }, | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@class").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Seq[String]](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])] ::: (node match { | |
case elem: scala.xml.Elem => | |
elem.attributes.toList flatMap { | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "milk1" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string2" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string3" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string4" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string5" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string6" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string7" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string8" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string9" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string10" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string11" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string12" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string13" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string14" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string15" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string16" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string17" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string18" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string19" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string20" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string21" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string22" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string23" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string24" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string25" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string26" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string27" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string28" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string29" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "string30" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "id" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) if key == "class" => Nil | |
case scala.xml.UnprefixedAttribute(key, value, _) => | |
List(("@" + key, scalaxb.DataRecord(None, Some(key), value.text))) | |
case scala.xml.PrefixedAttribute(pre, key, value, _) => | |
val ns = elem.scope.getURI(pre) | |
List(("@{" + ns + "}" + key, scalaxb.DataRecord(Option[String](ns), Some(key), value.text))) | |
case _ => Nil | |
} | |
case _ => Nil | |
}): _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: general.LongAttributeTest, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@milk1", _) => __obj.attr_milk1 foreach { x => attr = scala.xml.Attribute(null, "milk1", x.toString, attr) } | |
case ("@string2", _) => __obj.attr_string2 foreach { x => attr = scala.xml.Attribute(null, "string2", x.toString, attr) } | |
case ("@string3", _) => __obj.attr_string3 foreach { x => attr = scala.xml.Attribute(null, "string3", x.toString, attr) } | |
case ("@string4", _) => __obj.attr_string4 foreach { x => attr = scala.xml.Attribute(null, "string4", x.toString, attr) } | |
case ("@string5", _) => __obj.attr_string5 foreach { x => attr = scala.xml.Attribute(null, "string5", x.toString, attr) } | |
case ("@string6", _) => __obj.attr_string6 foreach { x => attr = scala.xml.Attribute(null, "string6", x.toString, attr) } | |
case ("@string7", _) => __obj.attr_string7 foreach { x => attr = scala.xml.Attribute(null, "string7", x.toString, attr) } | |
case ("@string8", _) => __obj.attr_string8 foreach { x => attr = scala.xml.Attribute(null, "string8", x.toString, attr) } | |
case ("@string9", _) => __obj.attr_string9 foreach { x => attr = scala.xml.Attribute(null, "string9", x.toString, attr) } | |
case ("@string10", _) => __obj.attr_string10 foreach { x => attr = scala.xml.Attribute(null, "string10", x.toString, attr) } | |
case ("@string11", _) => __obj.attr_string11 foreach { x => attr = scala.xml.Attribute(null, "string11", x.toString, attr) } | |
case ("@string12", _) => __obj.attr_string12 foreach { x => attr = scala.xml.Attribute(null, "string12", x.toString, attr) } | |
case ("@string13", _) => __obj.attr_string13 foreach { x => attr = scala.xml.Attribute(null, "string13", x.toString, attr) } | |
case ("@string14", _) => __obj.attr_string14 foreach { x => attr = scala.xml.Attribute(null, "string14", x.toString, attr) } | |
case ("@string15", _) => __obj.attr_string15 foreach { x => attr = scala.xml.Attribute(null, "string15", x.toString, attr) } | |
case ("@string16", _) => __obj.attr_string16 foreach { x => attr = scala.xml.Attribute(null, "string16", x.toString, attr) } | |
case ("@string17", _) => __obj.attr_string17 foreach { x => attr = scala.xml.Attribute(null, "string17", x.toString, attr) } | |
case ("@string18", _) => __obj.attr_string18 foreach { x => attr = scala.xml.Attribute(null, "string18", x.toString, attr) } | |
case ("@string19", _) => __obj.attr_string19 foreach { x => attr = scala.xml.Attribute(null, "string19", x.toString, attr) } | |
case ("@string20", _) => __obj.attr_string20 foreach { x => attr = scala.xml.Attribute(null, "string20", x.toString, attr) } | |
case ("@string21", _) => __obj.attr_string21 foreach { x => attr = scala.xml.Attribute(null, "string21", x.toString, attr) } | |
case ("@string22", _) => __obj.attr_string22 foreach { x => attr = scala.xml.Attribute(null, "string22", x.toString, attr) } | |
case ("@string23", _) => __obj.attr_string23 foreach { x => attr = scala.xml.Attribute(null, "string23", x.toString, attr) } | |
case ("@string24", _) => __obj.attr_string24 foreach { x => attr = scala.xml.Attribute(null, "string24", x.toString, attr) } | |
case ("@string25", _) => __obj.attr_string25 foreach { x => attr = scala.xml.Attribute(null, "string25", x.toString, attr) } | |
case ("@string26", _) => __obj.attr_string26 foreach { x => attr = scala.xml.Attribute(null, "string26", x.toString, attr) } | |
case ("@string27", _) => __obj.attr_string27 foreach { x => attr = scala.xml.Attribute(null, "string27", x.toString, attr) } | |
case ("@string28", _) => __obj.attr_string28 foreach { x => attr = scala.xml.Attribute(null, "string28", x.toString, attr) } | |
case ("@string29", _) => __obj.attr_string29 foreach { x => attr = scala.xml.Attribute(null, "string29", x.toString, attr) } | |
case ("@string30", _) => __obj.attr_string30 foreach { x => attr = scala.xml.Attribute(null, "string30", x.toString, attr) } | |
case ("@id", _) => __obj.attr_id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.attr_class foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr) | |
} | |
attr | |
} | |
def writesChildNodes(__obj: general.LongAttributeTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait DefaultGeneralAnySimpleTypeExtensionFormat extends scalaxb.XMLFormat[general.AnySimpleTypeExtension] with scalaxb.CanWriteChildNodes[general.AnySimpleTypeExtension] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.AnySimpleTypeExtension] = seq match { | |
case node: scala.xml.Node => Right(general.AnySimpleTypeExtension(scalaxb.fromXML[scalaxb.DataRecord[Any]](node, scalaxb.ElemName(node) :: stack), | |
scala.collection.immutable.ListMap((node match { | |
case elem: scala.xml.Elem => | |
elem.attributes.toList flatMap { | |
case scala.xml.UnprefixedAttribute(key, value, _) => | |
List(("@" + key, scalaxb.DataRecord(None, Some(key), value.text))) | |
case scala.xml.PrefixedAttribute(pre, key, value, _) => | |
val ns = elem.scope.getURI(pre) | |
List(("@{" + ns + "}" + key, scalaxb.DataRecord(Option[String](ns), Some(key), value.text))) | |
case _ => Nil | |
} | |
case _ => Nil | |
}): _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: general.AnySimpleTypeExtension, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case (key, x) => attr = scala.xml.Attribute((x.namespace map { __scope.getPrefix(_) }).orNull, x.key.orNull, x.value.toString, attr) } | |
attr | |
} | |
def writesChildNodes(__obj: general.AnySimpleTypeExtension, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq(scala.xml.Text(__obj.value.value.toString)) | |
} | |
trait DefaultGeneralDupeElemFormat extends scalaxb.XMLFormat[general.DupeElem] with scalaxb.CanWriteChildNodes[general.DupeElem] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.DupeElem] = seq match { | |
case node: scala.xml.Node => Right(general.DupeElem()) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
def writesChildNodes(__obj: general.DupeElem, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait DefaultGeneralDupeElem2Format extends scalaxb.ElemNameParser[general.DupeElem2] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.DupeElem2] = | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "dupeElem")) ^^ | |
{ case p1 => | |
general.DupeElem2(scalaxb.fromXML[general.DupeElem](p1, scalaxb.ElemName(node) :: stack)) } | |
def writesChildNodes(__obj: general.DupeElem2, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(scalaxb.toXML[general.DupeElem](__obj.dupeElem, Some("http://www.example.com/general"), Some("dupeElem"), __scope, false)) | |
} | |
trait DefaultGeneralDupeElem3Format extends scalaxb.XMLFormat[general.DupeElem3] with scalaxb.CanWriteChildNodes[general.DupeElem3] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.DupeElem3] = seq match { | |
case node: scala.xml.Node => Right(general.DupeElem3()) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
def writesChildNodes(__obj: general.DupeElem3, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait DefaultGeneralDupeElem4Format extends scalaxb.ElemNameParser[general.DupeElem4] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.DupeElem4] = | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "dupeElem")) ^^ | |
{ case p1 => | |
general.DupeElem4(scalaxb.fromXML[general.DupeElem3](p1, scalaxb.ElemName(node) :: stack)) } | |
def writesChildNodes(__obj: general.DupeElem4, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(scalaxb.toXML[general.DupeElem3](__obj.dupeElem, Some("http://www.example.com/general"), Some("dupeElem"), __scope, false)) | |
} | |
trait DefaultGeneralJpegPictureTypeFormat extends scalaxb.XMLFormat[general.JpegPictureType] with scalaxb.CanWriteChildNodes[general.JpegPictureType] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.JpegPictureType] = seq match { | |
case node: scala.xml.Node => Right(general.JpegPictureType(scalaxb.fromXML[scalaxb.Base64Binary](node, scalaxb.ElemName(node) :: stack), | |
(node \ "@{http://www.w3.org/2005/05/xmlmime}contentType").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) })) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: general.JpegPictureType, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attr_xmimecontentType foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/2005/05/xmlmime"), "contentType", x.toString, attr) } | |
attr | |
} | |
def writesChildNodes(__obj: general.JpegPictureType, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq(scala.xml.Text(__obj.value.toString)) | |
} | |
trait DefaultGeneralMimeTestFormat extends scalaxb.ElemNameParser[general.MimeTest] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[general.MimeTest] = | |
(scalaxb.ElemName(Some("http://www.example.com/general"), "JpegPicture")) ^^ | |
{ case p1 => | |
general.MimeTest(scalaxb.fromXML[general.JpegPictureType](p1, scalaxb.ElemName(node) :: stack)) } | |
def writesChildNodes(__obj: general.MimeTest, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(scalaxb.toXML[general.JpegPictureType](__obj.JpegPicture, Some("http://www.example.com/general"), Some("JpegPicture"), __scope, false)) | |
} | |
trait GeneralDupeElemGroup2GroupFormat extends scalaxb.AnyElemNameParser { | |
def parseDupeElemGroup2Group(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[scalaxb.DataRecord[general.DupeElem4]] = | |
(((scalaxb.ElemName(Some("http://www.example.com/general"), "dupeElem")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[general.DupeElem4](x, scalaxb.ElemName(node) :: stack))))) | |
def parseDupeElemGroup2Group(node: scala.xml.Node, stack: List[scalaxb.ElemName], wrap: Boolean): Parser[scalaxb.DataRecord[general.DupeElem4]] = | |
(((scalaxb.ElemName(Some("http://www.example.com/general"), "dupeElem")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[general.DupeElem4](x, scalaxb.ElemName(node) :: stack))))) | |
def parsemixedDupeElemGroup2Group(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Seq[scalaxb.DataRecord[Any]]] = | |
(((((scalaxb.ElemName(Some("http://www.example.com/general"), "dupeElem")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[general.DupeElem4](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) | |
} | |
trait GeneralDupeElemGroup1GroupFormat extends scalaxb.AnyElemNameParser { | |
def parseDupeElemGroup1Group(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[scalaxb.DataRecord[general.DupeElem2]] = | |
(((scalaxb.ElemName(Some("http://www.example.com/general"), "dupeElem")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[general.DupeElem2](x, scalaxb.ElemName(node) :: stack))))) | |
def parseDupeElemGroup1Group(node: scala.xml.Node, stack: List[scalaxb.ElemName], wrap: Boolean): Parser[scalaxb.DataRecord[general.DupeElem2]] = | |
(((scalaxb.ElemName(Some("http://www.example.com/general"), "dupeElem")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[general.DupeElem2](x, scalaxb.ElemName(node) :: stack))))) | |
def parsemixedDupeElemGroup1Group(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Seq[scalaxb.DataRecord[Any]]] = | |
(((((scalaxb.ElemName(Some("http://www.example.com/general"), "dupeElem")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[general.DupeElem2](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) | |
} | |
trait DefaultGeneralEmptySeqGroupSequenceFormat extends scalaxb.XMLFormat[general.EmptySeqGroupSequence] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.EmptySeqGroupSequence] = Left("don't call me.") | |
def writes(__obj: general.EmptySeqGroupSequence, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
Nil | |
} | |
trait DefaultGeneralCoreattrsFormat extends scalaxb.AttributeGroupFormat[general.Coreattrs] { | |
val targetNamespace: Option[String] = Some("http://www.example.com/general") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, general.Coreattrs] = seq match { | |
case node: scala.xml.Node => Right(general.Coreattrs((node \ "@id").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) }, | |
(node \ "@class").headOption map { scalaxb.fromXML[Seq[String]](_, scalaxb.ElemName(node) :: stack) })) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
def toAttribute(__obj: general.Coreattrs, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = __attr | |
__obj.attr_id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
__obj.attr_class foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
attr | |
} | |
} | |
trait DefaultXmlmimeBase64BinaryableFormat extends scalaxb.XMLFormat[xmlmime.Base64Binaryable] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, xmlmime.Base64Binaryable] = seq match { | |
case node: scala.xml.Node => | |
scalaxb.Helper.instanceType(node) match { | |
case (Some("http://www.example.com/general"), Some("JpegPictureType")) => Right(scalaxb.fromXML[general.JpegPictureType](node, stack)) | |
case _ => Right(scalaxb.fromXML[xmlmime.Base64BinaryType](node, stack)) | |
} | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
def writes(__obj: xmlmime.Base64Binaryable, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = __obj match { | |
case x: general.JpegPictureType => scalaxb.toXML[general.JpegPictureType](x, __namespace, __elementLabel, __scope, true) | |
case x: xmlmime.Base64BinaryType => scalaxb.toXML[xmlmime.Base64BinaryType](x, __namespace, __elementLabel, __scope, false) | |
} | |
} | |
trait DefaultXmlmimeBase64BinaryTypeFormat extends scalaxb.XMLFormat[xmlmime.Base64BinaryType] with scalaxb.CanWriteChildNodes[xmlmime.Base64BinaryType] { | |
val targetNamespace: Option[String] = Some("http://www.w3.org/2005/05/xmlmime") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, xmlmime.Base64BinaryType] = seq match { | |
case node: scala.xml.Node => Right(xmlmime.Base64BinaryType(scalaxb.fromXML[scalaxb.Base64Binary](node, scalaxb.ElemName(node) :: stack), | |
(node \ "@{http://www.w3.org/2005/05/xmlmime}contentType").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) })) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: xmlmime.Base64BinaryType, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attr_xmimecontentType foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/2005/05/xmlmime"), "contentType", x.toString, attr) } | |
attr | |
} | |
def writesChildNodes(__obj: xmlmime.Base64BinaryType, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq(scala.xml.Text(__obj.value.toString)) | |
} | |
trait DefaultXmlmimeHexBinaryTypeFormat extends scalaxb.XMLFormat[xmlmime.HexBinaryType] with scalaxb.CanWriteChildNodes[xmlmime.HexBinaryType] { | |
val targetNamespace: Option[String] = Some("http://www.w3.org/2005/05/xmlmime") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, xmlmime.HexBinaryType] = seq match { | |
case node: scala.xml.Node => Right(xmlmime.HexBinaryType(scalaxb.fromXML[scalaxb.HexBinary](node, scalaxb.ElemName(node) :: stack), | |
(node \ "@{http://www.w3.org/2005/05/xmlmime}contentType").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) })) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: xmlmime.HexBinaryType, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attr_xmimecontentType foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/2005/05/xmlmime"), "contentType", x.toString, attr) } | |
attr | |
} | |
def writesChildNodes(__obj: xmlmime.HexBinaryType, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq(scala.xml.Text(__obj.value.toString)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment