Last active
February 26, 2018 17:44
-
-
Save hosamaly/01a38c3987d8a024f3537e85a074f122 to your computer and use it in GitHub Desktop.
ScalaXB NITF 3.4 classes
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>. | |
/** The core schema for the News Industry Text Format.Date of creation of this XML Schema document version: 2012-01-12 (xml_lang error fixed) | |
*/ | |
trait Align | |
object Align { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[Align]): Align = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: Align) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[Align] = Seq(LeftType, Center, RightType, Justify, CharType) | |
} | |
case object LeftType extends Align { override def toString = "left" } | |
case object Center extends Align { override def toString = "center" } | |
case object RightType extends Align { override def toString = "right" } | |
case object Justify extends Align { override def toString = "justify" } | |
case object CharType extends Align { override def toString = "char" } | |
trait Valign | |
object Valign { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[Valign]): Valign = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: Valign) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[Valign] = Seq(Top, Middle, Bottom, Baseline) | |
} | |
case object Top extends Valign { override def toString = "top" } | |
case object Middle extends Valign { override def toString = "middle" } | |
case object Bottom extends Valign { override def toString = "bottom" } | |
case object Baseline extends Valign { override def toString = "baseline" } | |
case class Nitf(head: Option[Head] = None, | |
body: Body, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val uno = attributes.get("@uno") map { _.as[String]} | |
lazy val version = attributes("@version").as[String] | |
lazy val changeDate = attributes("@change.date").as[String] | |
lazy val changeTime = attributes("@change.time").as[String] | |
lazy val baselang = attributes.get("@baselang") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[Seq[String]]} | |
} | |
case class Head(title: Option[Title] = None, | |
meta: Seq[Meta] = Nil, | |
tobject: Option[Tobject] = None, | |
iim: Option[Iim] = None, | |
docdata: Option[Docdata] = None, | |
pubdata: Seq[Pubdata] = Nil, | |
revisionHistory: Seq[RevisionHistory] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
trait Type | |
object Type { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[Type]): Type = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: Type) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[Type] = Seq(Main, Subtitle, Parttitle, Alternate, Abbrev, Other) | |
} | |
case object Main extends Type { override def toString = "main" } | |
case object Subtitle extends Type { override def toString = "subtitle" } | |
case object Parttitle extends Type { override def toString = "parttitle" } | |
case object Alternate extends Type { override def toString = "alternate" } | |
case object Abbrev extends Type { override def toString = "abbrev" } | |
case object Other extends Type { override def toString = "other" } | |
case class Title(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val typeValue = attributes.get("@type") map { _.as[Type]} | |
} | |
case class Meta(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val httpEquiv = attributes.get("@http-equiv") map { _.as[String]} | |
lazy val name = attributes.get("@name") map { _.as[String]} | |
lazy val content = attributes("@content").as[String] | |
} | |
case class Tobject(tobjectProperty: Seq[TobjectProperty] = Nil, | |
tobjectSubject: Seq[TobjectSubject] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val tobjectType = attributes("@tobject.type").as[String] | |
} | |
case class TobjectProperty(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val tobjectPropertyType = attributes("@tobject.property.type").as[String] | |
} | |
case class TobjectSubject(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val tobjectSubjectIpr = attributes("@tobject.subject.ipr").as[String] | |
lazy val tobjectSubjectRefnum = attributes("@tobject.subject.refnum").as[String] | |
lazy val tobjectSubjectCode = attributes.get("@tobject.subject.code") map { _.as[String]} | |
lazy val tobjectSubjectType = attributes.get("@tobject.subject.type") map { _.as[String]} | |
lazy val tobjectSubjectMatter = attributes.get("@tobject.subject.matter") map { _.as[String]} | |
lazy val tobjectSubjectDetail = attributes.get("@tobject.subject.detail") map { _.as[String]} | |
} | |
case class Iim(ds: Seq[Ds] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val ver = attributes.get("@ver") map { _.as[String]} | |
} | |
case class Ds(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val num = attributes("@num").as[String] | |
lazy val valueAttribute = attributes.get("@value") map { _.as[String]} | |
} | |
case class Docdata(docdataoption: Seq[scalaxb.DataRecord[DocdataOption]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val managementStatus = attributes.get("@management-status") map { _.as[String]} | |
lazy val managementDocIdref = attributes.get("@management-doc-idref") map { _.as[String]} | |
lazy val managementIdrefStatus = attributes.get("@management-idref-status") map { _.as[String]} | |
} | |
trait DocdataOption | |
case class Correction(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val info = attributes.get("@info") map { _.as[String]} | |
lazy val idString = attributes.get("@id-string") map { _.as[String]} | |
lazy val regsrc = attributes.get("@regsrc") map { _.as[String]} | |
} | |
case class Evloc(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val isoCc = attributes.get("@iso-cc") map { _.as[String]} | |
lazy val stateProv = attributes.get("@state-prov") map { _.as[String]} | |
lazy val countyDist = attributes.get("@county-dist") map { _.as[String]} | |
lazy val city = attributes.get("@city") map { _.as[String]} | |
} | |
case class DocId(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val regsrc = attributes.get("@regsrc") map { _.as[String]} | |
lazy val idString = attributes.get("@id-string") map { _.as[String]} | |
} | |
case class DelList(dellistsequence1: Seq[DelListSequence1] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
case class DelListSequence1(fromSrc: FromSrc) | |
case class FromSrc(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val srcName = attributes.get("@src-name") map { _.as[String]} | |
lazy val levelNumber = attributes.get("@level-number") map { _.as[String]} | |
} | |
case class Urgency(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val edUrg = attributes.get("@ed-urg") map { _.as[String]} | |
} | |
case class Fixture(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val fixId = attributes.get("@fix-id") map { _.as[String]} | |
} | |
case class DateIssue(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val norm = attributes.get("@norm") map { _.as[String]} | |
} | |
case class DateRelease(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val norm = attributes.get("@norm") map { _.as[String]} | |
} | |
case class DateExpire(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val norm = attributes.get("@norm") map { _.as[String]} | |
} | |
case class DocScope(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val scope = attributes.get("@scope") map { _.as[String]} | |
} | |
case class Series(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val seriesName = attributes.get("@series.name") map { _.as[String]} | |
lazy val seriesPart = attributes("@series.part").as[String] | |
lazy val seriesTotalpart = attributes("@series.totalpart").as[String] | |
} | |
case class EdMsg(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val msgType = attributes.get("@msg-type") map { _.as[String]} | |
lazy val info = attributes.get("@info") map { _.as[String]} | |
} | |
case class DuKey(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val generation = attributes.get("@generation") map { _.as[String]} | |
lazy val part = attributes.get("@part") map { _.as[String]} | |
lazy val version = attributes.get("@version") map { _.as[String]} | |
lazy val key = attributes.get("@key") map { _.as[String]} | |
} | |
case class DocCopyright(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val year = attributes.get("@year") map { _.as[String]} | |
lazy val holder = attributes.get("@holder") map { _.as[String]} | |
} | |
case class DocRights(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val owner = attributes.get("@owner") map { _.as[String]} | |
lazy val startdate = attributes.get("@startdate") map { _.as[String]} | |
lazy val enddate = attributes.get("@enddate") map { _.as[String]} | |
lazy val agent = attributes.get("@agent") map { _.as[String]} | |
lazy val geography = attributes.get("@geography") map { _.as[String]} | |
lazy val locationCode = attributes.get("@location-code") map { _.as[String]} | |
lazy val codeSource = attributes.get("@code-source") map { _.as[String]} | |
lazy val typeValue = attributes.get("@type") map { _.as[String]} | |
lazy val limitations = attributes.get("@limitations") map { _.as[String]} | |
} | |
case class KeyList(keylistsequence1: Seq[KeyListSequence1] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
case class KeyListSequence1(keyword: Keyword) | |
case class Keyword(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val key = attributes.get("@key") map { _.as[String]} | |
} | |
case class IdentifiedContent(identifiedcontentoption: Seq[scalaxb.DataRecord[IdentifiedContentOption]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DocdataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
trait IdentifiedContentOption | |
trait TypeType | |
object TypeType { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[TypeType]): TypeType = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: TypeType) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[TypeType] = Seq(Print, Audio, Video, Web, Appliance, OtherValue) | |
} | |
case object Print extends TypeType { override def toString = "print" } | |
case object Audio extends TypeType { override def toString = "audio" } | |
case object Video extends TypeType { override def toString = "video" } | |
case object Web extends TypeType { override def toString = "web" } | |
case object Appliance extends TypeType { override def toString = "appliance" } | |
case object OtherValue extends TypeType { override def toString = "other" } | |
case class Pubdata(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val typeValue = attributes.get("@type") map { _.as[TypeType]} | |
lazy val itemLength = attributes.get("@item-length") map { _.as[String]} | |
lazy val unitOfMeasure = attributes.get("@unit-of-measure") map { _.as[String]} | |
lazy val datePublication = attributes.get("@date.publication") map { _.as[String]} | |
lazy val name = attributes.get("@name") map { _.as[String]} | |
lazy val issn = attributes.get("@issn") map { _.as[String]} | |
lazy val volume = attributes.get("@volume") map { _.as[String]} | |
lazy val number = attributes.get("@number") map { _.as[String]} | |
lazy val issue = attributes.get("@issue") map { _.as[String]} | |
lazy val editionName = attributes.get("@edition.name") map { _.as[String]} | |
lazy val editionArea = attributes.get("@edition.area") map { _.as[String]} | |
lazy val positionSection = attributes.get("@position.section") map { _.as[String]} | |
lazy val positionSequence = attributes.get("@position.sequence") map { _.as[String]} | |
lazy val exRef = attributes.get("@ex-ref") map { _.as[String]} | |
} | |
trait FunctionTypeType | |
object FunctionTypeType { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[FunctionTypeType]): FunctionTypeType = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: FunctionTypeType) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[FunctionTypeType] = Seq(WriterAuthor, Editor, Producer, Archivist, Videographer, GraphicArtist, Photographer, Statistician, OtherValue2) | |
} | |
case object WriterAuthor extends FunctionTypeType { override def toString = "writer-author" } | |
case object Editor extends FunctionTypeType { override def toString = "editor" } | |
case object Producer extends FunctionTypeType { override def toString = "producer" } | |
case object Archivist extends FunctionTypeType { override def toString = "archivist" } | |
case object Videographer extends FunctionTypeType { override def toString = "videographer" } | |
case object GraphicArtist extends FunctionTypeType { override def toString = "graphic-artist" } | |
case object Photographer extends FunctionTypeType { override def toString = "photographer" } | |
case object Statistician extends FunctionTypeType { override def toString = "statistician" } | |
case object OtherValue2 extends FunctionTypeType { override def toString = "other" } | |
case class RevisionHistory(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val name = attributes.get("@name") map { _.as[String]} | |
lazy val function = attributes.get("@function") map { _.as[FunctionTypeType]} | |
lazy val norm = attributes.get("@norm") map { _.as[String]} | |
lazy val comment = attributes.get("@comment") map { _.as[String]} | |
} | |
case class Body(bodyHead: Option[BodyHead] = None, | |
bodyContent: Seq[BodyContent] = Nil, | |
bodyEnd: Option[BodyEnd] = None, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
case class BodyHead(hedline: Seq[Hedline] = Nil, | |
note: Seq[Note] = Nil, | |
rights: Option[Rights] = None, | |
byline: Seq[Byline] = Nil, | |
distributor: Option[Distributor] = None, | |
dateline: Seq[Dateline] = Nil, | |
abstractValue: Seq[Abstract] = Nil, | |
series: Option[Series] = None, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
case class Hedline(hl1: Hl1, | |
hl2: Seq[Hl2] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
case class Hl1(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
trait Hl1Option | |
case class Hl2(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends BlockContentOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
trait Hl2Option | |
trait Noteclass | |
object Noteclass { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[Noteclass]): Noteclass = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: Noteclass) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[Noteclass] = Seq(Cpyrt, End, Hd, Editorsnote, Trademk, Undef) | |
} | |
case object Cpyrt extends Noteclass { override def toString = "cpyrt" } | |
case object End extends Noteclass { override def toString = "end" } | |
case object Hd extends Noteclass { override def toString = "hd" } | |
case object Editorsnote extends Noteclass { override def toString = "editorsnote" } | |
case object Trademk extends Noteclass { override def toString = "trademk" } | |
case object Undef extends Noteclass { override def toString = "undef" } | |
trait TypeType2 | |
object TypeType2 { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[TypeType2]): TypeType2 = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: TypeType2) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[TypeType2] = Seq(Std, Pa, Npa) | |
} | |
case object Std extends TypeType2 { override def toString = "std" } | |
case object Pa extends TypeType2 { override def toString = "pa" } | |
case object Npa extends TypeType2 { override def toString = "npa" } | |
case class Note(notesequence1: Seq[NoteSequence1] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends BlockContentOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val noteclass = attributes.get("@noteclass") map { _.as[Noteclass]} | |
lazy val typeValue = attributes("@type").as[TypeType2] | |
} | |
case class NoteSequence1(bodyContent: BodyContent) | |
case class Rights(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
trait RightsOption | |
case class RightsOwner(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends RightsOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val contact = attributes.get("@contact") map { _.as[String]} | |
} | |
case class RightsStartdate(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends RightsOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val norm = attributes.get("@norm") map { _.as[String]} | |
} | |
case class RightsEnddate(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends RightsOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val norm = attributes.get("@norm") map { _.as[String]} | |
} | |
case class RightsAgent(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends RightsOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val contact = attributes.get("@contact") map { _.as[String]} | |
} | |
case class RightsGeography(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends RightsOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val locationCode = attributes.get("@location-code") map { _.as[String]} | |
lazy val codeSource = attributes.get("@code-source") map { _.as[String]} | |
} | |
case class RightsType(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends RightsOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
case class RightsLimitations(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends RightsOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
case class Byline(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
trait BylineOption | |
case class Byttl(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends BylineOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
trait ByttlOption | |
case class Distributor(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
trait DistributorOption | |
case class Dateline(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
trait DatelineOption | |
case class StoryDate(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DatelineOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val norm = attributes.get("@norm") map { _.as[String]} | |
} | |
case class Abstract(abstractoption: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
trait AbstractOption | |
case class Copyrite(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with Hl2Option with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
trait CopyriteOption | |
case class CopyriteYear(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends CopyriteOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
case class CopyriteHolder(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends CopyriteOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
case class BodyContent(bodycontentoption: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
trait BodyContentOption | |
case class Block(blocksequence1: Option[BlockSequence1] = None, | |
blockoption: Seq[scalaxb.DataRecord[Any]] = Nil, | |
blocksequence2: Option[BlockSequence2] = None, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends BodyContentOption with DdOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
case class BlockSequence2(datasource: Option[Datasource] = None) | |
trait BlockOption | |
case class BlockSequence1(tobject: Option[Tobject] = None, | |
keyList: Option[KeyList] = None, | |
classifier: Seq[Classifier] = Nil, | |
byline: Option[Byline] = None, | |
dateline: Option[Dateline] = None, | |
copyrite: Option[Copyrite] = None, | |
abstractValue: Seq[Abstract] = Nil) | |
case class P(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends BlockContentOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val lede = attributes.get("@lede") map { _.as[String]} | |
lazy val summary = attributes.get("@summary") map { _.as[String]} | |
lazy val optionalText = attributes.get("@optional-text") map { _.as[String]} | |
} | |
trait POption | |
trait AlignType | |
object AlignType { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[AlignType]): AlignType = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: AlignType) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[AlignType] = Seq(LeftTypeValue, CenterValue, RightTypeValue) | |
} | |
case object LeftTypeValue extends AlignType { override def toString = "left" } | |
case object CenterValue extends AlignType { override def toString = "center" } | |
case object RightTypeValue extends AlignType { override def toString = "right" } | |
trait Frame | |
object Frame { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[Frame]): Frame = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: Frame) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[Frame] = Seq(Void, Above, Below, Hsides, Lhs, Rhs, Vsides, Box, Border) | |
} | |
case object Void extends Frame { override def toString = "void" } | |
case object Above extends Frame { override def toString = "above" } | |
case object Below extends Frame { override def toString = "below" } | |
case object Hsides extends Frame { override def toString = "hsides" } | |
case object Lhs extends Frame { override def toString = "lhs" } | |
case object Rhs extends Frame { override def toString = "rhs" } | |
case object Vsides extends Frame { override def toString = "vsides" } | |
case object Box extends Frame { override def toString = "box" } | |
case object Border extends Frame { override def toString = "border" } | |
trait Rules | |
object Rules { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[Rules]): Rules = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: Rules) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[Rules] = Seq(NoneType, Basic, Rows, Cols, AllType) | |
} | |
case object NoneType extends Rules { override def toString = "none" } | |
case object Basic extends Rules { override def toString = "basic" } | |
case object Rows extends Rules { override def toString = "rows" } | |
case object Cols extends Rules { override def toString = "cols" } | |
case object AllType extends Rules { override def toString = "all" } | |
case class Table(caption: Option[Caption] = None, | |
tableoption: Option[scalaxb.DataRecord[TableOption]] = None, | |
thead: Option[Thead] = None, | |
tfoot: Option[Tfoot] = None, | |
tableoption2: Seq[scalaxb.DataRecord[TableOption2]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends BlockContentOption with NitfTableOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val tabletype = attributes.get("@tabletype") map { _.as[String]} | |
lazy val align = attributes.get("@align") map { _.as[AlignType]} | |
lazy val width = attributes.get("@width") map { _.as[String]} | |
lazy val cols = attributes.get("@cols") map { _.as[String]} | |
lazy val border = attributes.get("@border") map { _.as[String]} | |
lazy val frame = attributes.get("@frame") map { _.as[Frame]} | |
lazy val rules = attributes.get("@rules") map { _.as[Rules]} | |
lazy val cellspacing = attributes.get("@cellspacing") map { _.as[String]} | |
lazy val cellpadding = attributes.get("@cellpadding") map { _.as[String]} | |
} | |
trait TableOption | |
trait TableOption2 | |
case class Media(mediaMetadata: Seq[MediaMetadata] = Nil, | |
mediasequence1: Seq[MediaSequence1] = Nil, | |
mediaCaption: Seq[MediaCaption] = Nil, | |
mediaProducer: Option[MediaProducer] = None, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends BlockContentOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val mediaType = attributes("@media-type").as[String] | |
} | |
case class MediaSequence1(mediaReference: MediaReference, | |
mediaObject: Option[MediaObject] = None) | |
trait Units | |
object Units { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[Units]): Units = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: Units) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[Units] = Seq(Pixels) | |
} | |
case object Pixels extends Units { override def toString = "pixels" } | |
trait Noflow | |
object Noflow { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[Noflow]): Noflow = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: Noflow) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[Noflow] = Seq(NoflowValue) | |
} | |
case object NoflowValue extends Noflow { override def toString = "noflow" } | |
case class MediaReference(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val source = attributes.get("@source") map { _.as[String]} | |
lazy val name = attributes.get("@name") map { _.as[String]} | |
lazy val mimeType = attributes.get("@mime-type") map { _.as[String]} | |
lazy val coding = attributes.get("@coding") map { _.as[String]} | |
lazy val time = attributes.get("@time") map { _.as[String]} | |
lazy val timeUnitOfMeasure = attributes.get("@time-unit-of-measure") map { _.as[String]} | |
lazy val outcue = attributes.get("@outcue") map { _.as[String]} | |
lazy val sourceCredit = attributes.get("@source-credit") map { _.as[String]} | |
lazy val copyright = attributes.get("@copyright") map { _.as[String]} | |
lazy val alternateText = attributes.get("@alternate-text") map { _.as[String]} | |
lazy val height = attributes.get("@height") map { _.as[String]} | |
lazy val width = attributes.get("@width") map { _.as[String]} | |
lazy val units = attributes.get("@units") map { _.as[Units]} | |
lazy val imagemap = attributes.get("@imagemap") map { _.as[String]} | |
lazy val noflow = attributes.get("@noflow") map { _.as[Noflow]} | |
lazy val dataLocation = attributes.get("@data-location") map { _.as[String]} | |
} | |
case class MediaMetadata(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val name = attributes("@name").as[String] | |
lazy val valueAttribute = attributes.get("@value") map { _.as[String]} | |
} | |
case class MediaObject(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val encoding = attributes("@encoding").as[String] | |
} | |
case class MediaCaption(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
trait MediaCaptionOption | |
case class MediaProducer(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
trait MediaProducerOption | |
case class Ol(olsequence1: Seq[OlSequence1] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends BlockContentOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val seqnum = attributes.get("@seqnum") map { _.as[String]} | |
} | |
case class OlSequence1(li: Li) | |
case class Ul(ulsequence1: Seq[UlSequence1] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends BlockContentOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
case class UlSequence1(li: Li) | |
case class Li(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
trait LiOption | |
case class Dl(dloption: Seq[scalaxb.DataRecord[DlOption]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends BlockContentOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
trait DlOption | |
case class Dt(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DlOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
trait DtOption | |
case class Dd(ddoption: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends DlOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
trait DdOption | |
trait Nowrap | |
object Nowrap { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[Nowrap]): Nowrap = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: Nowrap) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[Nowrap] = Seq(NowrapValue) | |
} | |
case object NowrapValue extends Nowrap { override def toString = "nowrap" } | |
case class Bq(bqsequence1: Seq[BqSequence1] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends BlockContentOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val nowrap = attributes.get("@nowrap") map { _.as[Nowrap]} | |
lazy val quoteSource = attributes.get("@quote-source") map { _.as[String]} | |
} | |
case class BqSequence1(block: Seq[Block] = Nil, | |
credit: Option[Credit] = None) | |
case class Credit(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
trait CreditOption | |
case class Fn(fnsequence1: Seq[FnSequence1] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends BlockContentOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
case class FnSequence1(bodyContent: BodyContent) | |
case class Pre(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends BlockContentOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
case class Hr(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends BlockContentOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
case class Datasource(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
trait AlignType2 | |
object AlignType2 { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[AlignType2]): AlignType2 = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: AlignType2) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[AlignType2] = Seq(TopValue, BottomValue, LeftTypeValue2, RightTypeValue2) | |
} | |
case object TopValue extends AlignType2 { override def toString = "top" } | |
case object BottomValue extends AlignType2 { override def toString = "bottom" } | |
case object LeftTypeValue2 extends AlignType2 { override def toString = "left" } | |
case object RightTypeValue2 extends AlignType2 { override def toString = "right" } | |
case class Caption(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val align = attributes.get("@align") map { _.as[AlignType2]} | |
} | |
trait CaptionOption | |
case class Col(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends TableOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val span = attributes("@span").as[String] | |
lazy val width = attributes.get("@width") map { _.as[String]} | |
lazy val align = attributes.get("@align") map { _.as[Align]} | |
lazy val char = attributes.get("@char") map { _.as[String]} | |
lazy val charoff = attributes.get("@charoff") map { _.as[String]} | |
lazy val valign = attributes.get("@valign") map { _.as[Valign]} | |
} | |
case class Colgroup(col: Seq[Col] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends TableOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val align = attributes.get("@align") map { _.as[Align]} | |
lazy val char = attributes.get("@char") map { _.as[String]} | |
lazy val charoff = attributes.get("@charoff") map { _.as[String]} | |
lazy val valign = attributes.get("@valign") map { _.as[Valign]} | |
} | |
case class Thead(tr: Seq[Tr] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val align = attributes.get("@align") map { _.as[Align]} | |
lazy val char = attributes.get("@char") map { _.as[String]} | |
lazy val charoff = attributes.get("@charoff") map { _.as[String]} | |
lazy val valign = attributes.get("@valign") map { _.as[Valign]} | |
} | |
case class Tbody(tr: Seq[Tr] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends TableOption2 { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val align = attributes.get("@align") map { _.as[Align]} | |
lazy val char = attributes.get("@char") map { _.as[String]} | |
lazy val charoff = attributes.get("@charoff") map { _.as[String]} | |
lazy val valign = attributes.get("@valign") map { _.as[Valign]} | |
} | |
case class Tfoot(tr: Seq[Tr] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val align = attributes.get("@align") map { _.as[Align]} | |
lazy val char = attributes.get("@char") map { _.as[String]} | |
lazy val charoff = attributes.get("@charoff") map { _.as[String]} | |
lazy val valign = attributes.get("@valign") map { _.as[Valign]} | |
} | |
case class Tr(troption: Seq[scalaxb.DataRecord[TrOption]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends TableOption2 { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val align = attributes.get("@align") map { _.as[Align]} | |
lazy val char = attributes.get("@char") map { _.as[String]} | |
lazy val charoff = attributes.get("@charoff") map { _.as[String]} | |
lazy val valign = attributes.get("@valign") map { _.as[Valign]} | |
} | |
trait TrOption | |
trait NowrapType | |
object NowrapType { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[NowrapType]): NowrapType = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: NowrapType) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[NowrapType] = Seq(NowrapValue2) | |
} | |
case object NowrapValue2 extends NowrapType { override def toString = "nowrap" } | |
case class Th(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends TrOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val axis = attributes.get("@axis") map { _.as[String]} | |
lazy val axes = attributes.get("@axes") map { _.as[String]} | |
lazy val nowrap = attributes.get("@nowrap") map { _.as[NowrapType]} | |
lazy val rowspan = attributes.get("@rowspan") map { _.as[String]} | |
lazy val colspan = attributes.get("@colspan") map { _.as[String]} | |
lazy val align = attributes.get("@align") map { _.as[Align]} | |
lazy val char = attributes.get("@char") map { _.as[String]} | |
lazy val charoff = attributes.get("@charoff") map { _.as[String]} | |
lazy val valign = attributes.get("@valign") map { _.as[Valign]} | |
} | |
trait ThOption | |
trait NowrapType2 | |
object NowrapType2 { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[NowrapType2]): NowrapType2 = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: NowrapType2) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[NowrapType2] = Seq(NowrapValue3) | |
} | |
case object NowrapValue3 extends NowrapType2 { override def toString = "nowrap" } | |
case class Td(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends TrOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val axis = attributes.get("@axis") map { _.as[String]} | |
lazy val axes = attributes.get("@axes") map { _.as[String]} | |
lazy val nowrap = attributes.get("@nowrap") map { _.as[NowrapType2]} | |
lazy val rowspan = attributes.get("@rowspan") map { _.as[String]} | |
lazy val colspan = attributes.get("@colspan") map { _.as[String]} | |
lazy val align = attributes.get("@align") map { _.as[Align]} | |
lazy val char = attributes.get("@char") map { _.as[String]} | |
lazy val charoff = attributes.get("@charoff") map { _.as[String]} | |
lazy val valign = attributes.get("@valign") map { _.as[Valign]} | |
} | |
trait TdOption | |
case class Chron(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with Hl2Option with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val norm = attributes.get("@norm") map { _.as[String]} | |
} | |
case class Event(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with IdentifiedContentOption with Hl2Option with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val startDate = attributes.get("@start-date") map { _.as[String]} | |
lazy val endDate = attributes.get("@end-date") map { _.as[String]} | |
lazy val idsrc = attributes.get("@idsrc") map { _.as[String]} | |
lazy val valueAttribute = attributes.get("@value") map { _.as[String]} | |
} | |
trait EventOption | |
case class FunctionType(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with IdentifiedContentOption with Hl2Option with POption with PersonOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val idsrc = attributes.get("@idsrc") map { _.as[String]} | |
lazy val valueAttribute = attributes.get("@value") map { _.as[String]} | |
} | |
trait FunctionTypeOption | |
case class Location(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with IdentifiedContentOption with Hl2Option with BylineOption with DatelineOption with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val locationCode = attributes.get("@location-code") map { _.as[String]} | |
lazy val codeSource = attributes.get("@code-source") map { _.as[String]} | |
} | |
trait LocationOption | |
case class Sublocation(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends LocationOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val locationCode = attributes.get("@location-code") map { _.as[String]} | |
lazy val codeSource = attributes.get("@code-source") map { _.as[String]} | |
} | |
trait SublocationOption | |
case class City(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends LocationOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val cityCode = attributes.get("@city-code") map { _.as[String]} | |
lazy val codeSource = attributes.get("@code-source") map { _.as[String]} | |
} | |
trait CityOption | |
case class State(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends LocationOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val stateCode = attributes.get("@state-code") map { _.as[String]} | |
lazy val codeSource = attributes.get("@code-source") map { _.as[String]} | |
} | |
trait StateOption | |
case class Region(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends LocationOption with PostaddrOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val regionCode = attributes.get("@region-code") map { _.as[String]} | |
lazy val codeSource = attributes.get("@code-source") map { _.as[String]} | |
} | |
trait RegionOption | |
case class Country(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends LocationOption with PostaddrOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val isoCc = attributes.get("@iso-cc") map { _.as[String]} | |
} | |
trait CountryOption | |
case class Money(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with Hl2Option with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val unit = attributes.get("@unit") map { _.as[String]} | |
lazy val date = attributes.get("@date") map { _.as[String]} | |
} | |
case class Num(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with Hl2Option with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val units = attributes.get("@units") map { _.as[String]} | |
lazy val decimalCh = attributes.get("@decimal-ch") map { _.as[String]} | |
lazy val thousandsCh = attributes.get("@thousands-ch") map { _.as[String]} | |
} | |
trait NumOption | |
case class Frac(numer: Numer, | |
fracSep: Option[FracSep] = None, | |
denom: Denom, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends NumOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
case class Numer(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
case class FracSep(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
case class Denom(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
case class Sub(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends NumOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
case class Sup(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends NumOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
case class ObjectTitle(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with IdentifiedContentOption with Hl2Option with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val idsrc = attributes.get("@idsrc") map { _.as[String]} | |
lazy val valueAttribute = attributes.get("@value") map { _.as[String]} | |
} | |
trait ObjectTitleOption | |
case class Org(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with IdentifiedContentOption with Hl2Option with ByttlOption with DistributorOption with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val idsrc = attributes.get("@idsrc") map { _.as[String]} | |
lazy val valueAttribute = attributes.get("@value") map { _.as[String]} | |
} | |
trait OrgOption | |
case class AltCode(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EventOption with FunctionTypeOption with LocationOption with SublocationOption with CityOption with StateOption with RegionOption with CountryOption with ObjectTitleOption with OrgOption with PersonOption with VirtlocOption with ClassifierOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val idsrc = attributes("@idsrc").as[String] | |
lazy val valueAttribute = attributes("@value").as[String] | |
} | |
trait Gender | |
object Gender { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[Gender]): Gender = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: Gender) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[Gender] = Seq(Male, Female) | |
} | |
case object Male extends Gender { override def toString = "male" } | |
case object Female extends Gender { override def toString = "female" } | |
case class Person(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with IdentifiedContentOption with Hl2Option with BylineOption with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val idsrc = attributes.get("@idsrc") map { _.as[String]} | |
lazy val valueAttribute = attributes.get("@value") map { _.as[String]} | |
lazy val gender = attributes.get("@gender") map { _.as[Gender]} | |
} | |
trait PersonOption | |
case class NameGiven(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends PersonOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
case class NameFamily(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends PersonOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
case class Postaddr(addressee: Addressee, | |
deliveryPoint: Option[DeliveryPoint] = None, | |
postaddroption: Seq[scalaxb.DataRecord[PostaddrOption]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with Hl2Option with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
trait PostaddrOption | |
case class Virtloc(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with IdentifiedContentOption with Hl2Option with BylineOption with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val idsrc = attributes.get("@idsrc") map { _.as[String]} | |
lazy val valueAttribute = attributes.get("@value") map { _.as[String]} | |
} | |
trait VirtlocOption | |
case class A(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with Hl2Option with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val href = attributes.get("@href") map { _.as[String]} | |
lazy val name = attributes.get("@name") map { _.as[String]} | |
lazy val rel = attributes.get("@rel") map { _.as[String]} | |
lazy val rev = attributes.get("@rev") map { _.as[String]} | |
lazy val title = attributes.get("@title") map { _.as[String]} | |
} | |
trait AOption | |
case class Br(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with Hl2Option with POption with DeliveryPointOption with DeliveryOfficeOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
case class Em(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with Hl2Option with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
trait EmOption | |
case class Lang(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with Hl2Option with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val idsrc = attributes.get("@idsrc") map { _.as[String]} | |
lazy val valueAttribute = attributes.get("@value") map { _.as[String]} | |
} | |
trait LangOption | |
case class Pronounce(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with Hl2Option with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val guide = attributes.get("@guide") map { _.as[String]} | |
lazy val phonetic = attributes.get("@phonetic") map { _.as[String]} | |
} | |
trait PronounceOption | |
case class Q(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with Hl2Option with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val quoteSource = attributes.get("@quote-source") map { _.as[String]} | |
} | |
trait QOption | |
case class Addressee(person: Person, | |
function: Option[FunctionType] = None, | |
careOf: Option[CareOf] = None, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
case class CareOf(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
case class DeliveryPoint(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val pointCode = attributes.get("@point-code") map { _.as[String]} | |
lazy val codeSource = attributes.get("@code-source") map { _.as[String]} | |
} | |
trait DeliveryPointOption | |
case class Postcode(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends PostaddrOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val codeSource = attributes.get("@code-source") map { _.as[String]} | |
} | |
case class DeliveryOffice(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends PostaddrOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val officeCode = attributes.get("@office-code") map { _.as[String]} | |
lazy val codeSource = attributes.get("@code-source") map { _.as[String]} | |
} | |
trait DeliveryOfficeOption | |
case class BodyEnd(tagline: Option[Tagline] = None, | |
bibliography: Option[Bibliography] = None, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
trait TypeType3 | |
object TypeType3 { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[TypeType3]): TypeType3 = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: TypeType3) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[TypeType3] = Seq(StdValue, PaValue, NpaValue) | |
} | |
case object StdValue extends TypeType3 { override def toString = "std" } | |
case object PaValue extends TypeType3 { override def toString = "pa" } | |
case object NpaValue extends TypeType3 { override def toString = "npa" } | |
case class Tagline(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val typeValue = attributes("@type").as[TypeType3] | |
} | |
trait TaglineOption | |
case class Bibliography(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
case class Classifier(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends EnrichedTextOption with IdentifiedContentOption with Hl2Option with POption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val typeValue = attributes.get("@type") map { _.as[String]} | |
lazy val idsrc = attributes.get("@idsrc") map { _.as[String]} | |
lazy val valueAttribute = attributes.get("@value") map { _.as[String]} | |
} | |
trait ClassifierOption | |
case class NitfTable(nitfTableMetadata: NitfTableMetadata, | |
nitftableoption: scalaxb.DataRecord[NitfTableOption], | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends BlockContentOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
} | |
trait NitfTableOption | |
case class CustomTable(mixed: Seq[scalaxb.DataRecord[Any]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends NitfTableOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
case class TableReference(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends NitfTableOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val idref = attributes("@idref").as[String] | |
} | |
trait Status | |
object Status { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[Status]): Status = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: Status) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[Status] = Seq(PreValue, SnapShot, Interim, Final, Official) | |
} | |
case object PreValue extends Status { override def toString = "pre" } | |
case object SnapShot extends Status { override def toString = "snap-shot" } | |
case object Interim extends Status { override def toString = "interim" } | |
case object Final extends Status { override def toString = "final" } | |
case object Official extends Status { override def toString = "official" } | |
case class NitfTableMetadata(nitfTableSummary: Option[NitfTableSummary] = None, | |
nitftablemetadataoption: Seq[scalaxb.DataRecord[NitfTableMetadataOption]] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
lazy val subclass = attributes.get("@subclass") map { _.as[String]} | |
lazy val idsrc = attributes.get("@idsrc") map { _.as[String]} | |
lazy val valueAttribute = attributes.get("@value") map { _.as[String]} | |
lazy val status = attributes.get("@status") map { _.as[Status]} | |
lazy val columnCount = attributes.get("@column-count") map { _.as[String]} | |
lazy val rowCount = attributes.get("@row-count") map { _.as[String]} | |
} | |
trait NitfTableMetadataOption | |
case class NitfTableSummary(p: Seq[P] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val classValue = attributes.get("@class") map { _.as[String]} | |
lazy val style = attributes.get("@style") map { _.as[String]} | |
lazy val xmllang = attributes.get("@{http://www.w3.org/XML/1998/namespace}lang") map { _.as[String]} | |
} | |
case class NitfColgroup(nitfcolgroupsequence1: Seq[NitfColgroupSequence1] = Nil, | |
attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends NitfTableMetadataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val idsrc = attributes.get("@idsrc") map { _.as[String]} | |
lazy val valueAttribute = attributes.get("@value") map { _.as[String]} | |
lazy val occurrences = attributes.get("@occurrences") map { _.as[String]} | |
} | |
case class NitfColgroupSequence1(nitfCol: NitfCol) | |
trait DataType | |
object DataType { | |
def fromString(value: String, scope: scala.xml.NamespaceBinding)(implicit fmt: scalaxb.XMLFormat[DataType]): DataType = fmt.reads(scala.xml.Text(value), Nil) match { | |
case Right(x: DataType) => x | |
case x => throw new RuntimeException(s"fromString returned unexpected value $x for input $value") | |
} | |
lazy val values: Seq[DataType] = Seq(Text, Number, Graphic, OtherValue3) | |
} | |
case object Text extends DataType { override def toString = "text" } | |
case object Number extends DataType { override def toString = "number" } | |
case object Graphic extends DataType { override def toString = "graphic" } | |
case object OtherValue3 extends DataType { override def toString = "other" } | |
case class NitfCol(attributes: Map[String, scalaxb.DataRecord[Any]] = Map()) extends NitfTableMetadataOption { | |
lazy val id = attributes.get("@id") map { _.as[String]} | |
lazy val idsrc = attributes.get("@idsrc") map { _.as[String]} | |
lazy val valueAttribute = attributes.get("@value") map { _.as[String]} | |
lazy val occurrences = attributes.get("@occurrences") map { _.as[String]} | |
lazy val dataType = attributes.get("@data-type") map { _.as[DataType]} | |
lazy val dataFormat = attributes.get("@data-format") map { _.as[String]} | |
} | |
trait BlockContentOption | |
trait EnrichedTextOption | |
case class CellVAlign(valign: Option[Valign] = None) | |
case class CommonNITFAttributes(id: Option[String] = None, | |
classValue: Option[String] = None, | |
style: Option[String] = None, | |
xmllang: Option[String] = None) | |
case class GlobalNITFAttributes(id: Option[String] = None) | |
case class CellAlign(align: Option[Align] = None, | |
char: Option[String] = None, | |
charoff: Option[String] = None) | |
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>. | |
import scala.concurrent.Future | |
/** | |
usage: | |
val obj = scalaxb.fromXML[.Foo](node) | |
val document = scalaxb.toXML[.Foo](obj, "foo", .defaultScope) | |
**/ | |
object `package` extends XMLProtocol { } | |
trait XMLProtocol extends scalaxb.XMLStandardTypes { | |
val defaultScope = scalaxb.toScope(Some("nitf") -> "http://iptc.org/std/NITF/2006-10-18/", | |
Some("xs") -> "http://www.w3.org/2001/XMLSchema", | |
Some("xsi") -> "http://www.w3.org/2001/XMLSchema-instance") | |
implicit lazy val _AlignFormat: scalaxb.XMLFormat[Align] = new Default_AlignFormat {} | |
implicit lazy val _ValignFormat: scalaxb.XMLFormat[Valign] = new Default_ValignFormat {} | |
implicit lazy val _NitfFormat: scalaxb.XMLFormat[Nitf] = new Default_NitfFormat {} | |
implicit lazy val _HeadFormat: scalaxb.XMLFormat[Head] = new Default_HeadFormat {} | |
implicit lazy val _TypeFormat: scalaxb.XMLFormat[Type] = new Default_TypeFormat {} | |
implicit lazy val _TitleFormat: scalaxb.XMLFormat[Title] = new Default_TitleFormat {} | |
implicit lazy val _MetaFormat: scalaxb.XMLFormat[Meta] = new Default_MetaFormat {} | |
implicit lazy val _TobjectFormat: scalaxb.XMLFormat[Tobject] = new Default_TobjectFormat {} | |
implicit lazy val _TobjectPropertyFormat: scalaxb.XMLFormat[TobjectProperty] = new Default_TobjectPropertyFormat {} | |
implicit lazy val _TobjectSubjectFormat: scalaxb.XMLFormat[TobjectSubject] = new Default_TobjectSubjectFormat {} | |
implicit lazy val _IimFormat: scalaxb.XMLFormat[Iim] = new Default_IimFormat {} | |
implicit lazy val _DsFormat: scalaxb.XMLFormat[Ds] = new Default_DsFormat {} | |
implicit lazy val _DocdataFormat: scalaxb.XMLFormat[Docdata] = new Default_DocdataFormat {} | |
implicit lazy val _CorrectionFormat: scalaxb.XMLFormat[Correction] = new Default_CorrectionFormat {} | |
implicit lazy val _EvlocFormat: scalaxb.XMLFormat[Evloc] = new Default_EvlocFormat {} | |
implicit lazy val _DocIdFormat: scalaxb.XMLFormat[DocId] = new Default_DocIdFormat {} | |
implicit lazy val _DelListFormat: scalaxb.XMLFormat[DelList] = new Default_DelListFormat {} | |
implicit lazy val _DelListSequence1Format: scalaxb.XMLFormat[DelListSequence1] = new Default_DelListSequence1Format {} | |
implicit lazy val _FromSrcFormat: scalaxb.XMLFormat[FromSrc] = new Default_FromSrcFormat {} | |
implicit lazy val _UrgencyFormat: scalaxb.XMLFormat[Urgency] = new Default_UrgencyFormat {} | |
implicit lazy val _FixtureFormat: scalaxb.XMLFormat[Fixture] = new Default_FixtureFormat {} | |
implicit lazy val _DateIssueFormat: scalaxb.XMLFormat[DateIssue] = new Default_DateIssueFormat {} | |
implicit lazy val _DateReleaseFormat: scalaxb.XMLFormat[DateRelease] = new Default_DateReleaseFormat {} | |
implicit lazy val _DateExpireFormat: scalaxb.XMLFormat[DateExpire] = new Default_DateExpireFormat {} | |
implicit lazy val _DocScopeFormat: scalaxb.XMLFormat[DocScope] = new Default_DocScopeFormat {} | |
implicit lazy val _SeriesFormat: scalaxb.XMLFormat[Series] = new Default_SeriesFormat {} | |
implicit lazy val _EdMsgFormat: scalaxb.XMLFormat[EdMsg] = new Default_EdMsgFormat {} | |
implicit lazy val _DuKeyFormat: scalaxb.XMLFormat[DuKey] = new Default_DuKeyFormat {} | |
implicit lazy val _DocCopyrightFormat: scalaxb.XMLFormat[DocCopyright] = new Default_DocCopyrightFormat {} | |
implicit lazy val _DocRightsFormat: scalaxb.XMLFormat[DocRights] = new Default_DocRightsFormat {} | |
implicit lazy val _KeyListFormat: scalaxb.XMLFormat[KeyList] = new Default_KeyListFormat {} | |
implicit lazy val _KeyListSequence1Format: scalaxb.XMLFormat[KeyListSequence1] = new Default_KeyListSequence1Format {} | |
implicit lazy val _KeywordFormat: scalaxb.XMLFormat[Keyword] = new Default_KeywordFormat {} | |
implicit lazy val _IdentifiedContentFormat: scalaxb.XMLFormat[IdentifiedContent] = new Default_IdentifiedContentFormat {} | |
implicit lazy val _TypeTypeFormat: scalaxb.XMLFormat[TypeType] = new Default_TypeTypeFormat {} | |
implicit lazy val _PubdataFormat: scalaxb.XMLFormat[Pubdata] = new Default_PubdataFormat {} | |
implicit lazy val _FunctionTypeTypeFormat: scalaxb.XMLFormat[FunctionTypeType] = new Default_FunctionTypeTypeFormat {} | |
implicit lazy val _RevisionHistoryFormat: scalaxb.XMLFormat[RevisionHistory] = new Default_RevisionHistoryFormat {} | |
implicit lazy val _BodyFormat: scalaxb.XMLFormat[Body] = new Default_BodyFormat {} | |
implicit lazy val _BodyHeadFormat: scalaxb.XMLFormat[BodyHead] = new Default_BodyHeadFormat {} | |
implicit lazy val _HedlineFormat: scalaxb.XMLFormat[Hedline] = new Default_HedlineFormat {} | |
implicit lazy val _Hl1Format: scalaxb.XMLFormat[Hl1] = new Default_Hl1Format {} | |
implicit lazy val _Hl2Format: scalaxb.XMLFormat[Hl2] = new Default_Hl2Format {} | |
implicit lazy val _NoteclassFormat: scalaxb.XMLFormat[Noteclass] = new Default_NoteclassFormat {} | |
implicit lazy val _TypeType2Format: scalaxb.XMLFormat[TypeType2] = new Default_TypeType2Format {} | |
implicit lazy val _NoteFormat: scalaxb.XMLFormat[Note] = new Default_NoteFormat {} | |
implicit lazy val _NoteSequence1Format: scalaxb.XMLFormat[NoteSequence1] = new Default_NoteSequence1Format {} | |
implicit lazy val _RightsFormat: scalaxb.XMLFormat[Rights] = new Default_RightsFormat {} | |
implicit lazy val _RightsOwnerFormat: scalaxb.XMLFormat[RightsOwner] = new Default_RightsOwnerFormat {} | |
implicit lazy val _RightsStartdateFormat: scalaxb.XMLFormat[RightsStartdate] = new Default_RightsStartdateFormat {} | |
implicit lazy val _RightsEnddateFormat: scalaxb.XMLFormat[RightsEnddate] = new Default_RightsEnddateFormat {} | |
implicit lazy val _RightsAgentFormat: scalaxb.XMLFormat[RightsAgent] = new Default_RightsAgentFormat {} | |
implicit lazy val _RightsGeographyFormat: scalaxb.XMLFormat[RightsGeography] = new Default_RightsGeographyFormat {} | |
implicit lazy val _RightsTypeFormat: scalaxb.XMLFormat[RightsType] = new Default_RightsTypeFormat {} | |
implicit lazy val _RightsLimitationsFormat: scalaxb.XMLFormat[RightsLimitations] = new Default_RightsLimitationsFormat {} | |
implicit lazy val _BylineFormat: scalaxb.XMLFormat[Byline] = new Default_BylineFormat {} | |
implicit lazy val _ByttlFormat: scalaxb.XMLFormat[Byttl] = new Default_ByttlFormat {} | |
implicit lazy val _DistributorFormat: scalaxb.XMLFormat[Distributor] = new Default_DistributorFormat {} | |
implicit lazy val _DatelineFormat: scalaxb.XMLFormat[Dateline] = new Default_DatelineFormat {} | |
implicit lazy val _StoryDateFormat: scalaxb.XMLFormat[StoryDate] = new Default_StoryDateFormat {} | |
implicit lazy val _AbstractFormat: scalaxb.XMLFormat[Abstract] = new Default_AbstractFormat {} | |
implicit lazy val _CopyriteFormat: scalaxb.XMLFormat[Copyrite] = new Default_CopyriteFormat {} | |
implicit lazy val _CopyriteYearFormat: scalaxb.XMLFormat[CopyriteYear] = new Default_CopyriteYearFormat {} | |
implicit lazy val _CopyriteHolderFormat: scalaxb.XMLFormat[CopyriteHolder] = new Default_CopyriteHolderFormat {} | |
implicit lazy val _BodyContentFormat: scalaxb.XMLFormat[BodyContent] = new Default_BodyContentFormat {} | |
implicit lazy val _BlockFormat: scalaxb.XMLFormat[Block] = new Default_BlockFormat {} | |
implicit lazy val _BlockSequence2Format: scalaxb.XMLFormat[BlockSequence2] = new Default_BlockSequence2Format {} | |
implicit lazy val _BlockSequence1Format: scalaxb.XMLFormat[BlockSequence1] = new Default_BlockSequence1Format {} | |
implicit lazy val _PFormat: scalaxb.XMLFormat[P] = new Default_PFormat {} | |
implicit lazy val _AlignTypeFormat: scalaxb.XMLFormat[AlignType] = new Default_AlignTypeFormat {} | |
implicit lazy val _FrameFormat: scalaxb.XMLFormat[Frame] = new Default_FrameFormat {} | |
implicit lazy val _RulesFormat: scalaxb.XMLFormat[Rules] = new Default_RulesFormat {} | |
implicit lazy val _TableFormat: scalaxb.XMLFormat[Table] = new Default_TableFormat {} | |
implicit lazy val _MediaFormat: scalaxb.XMLFormat[Media] = new Default_MediaFormat {} | |
implicit lazy val _MediaSequence1Format: scalaxb.XMLFormat[MediaSequence1] = new Default_MediaSequence1Format {} | |
implicit lazy val _UnitsFormat: scalaxb.XMLFormat[Units] = new Default_UnitsFormat {} | |
implicit lazy val _NoflowFormat: scalaxb.XMLFormat[Noflow] = new Default_NoflowFormat {} | |
implicit lazy val _MediaReferenceFormat: scalaxb.XMLFormat[MediaReference] = new Default_MediaReferenceFormat {} | |
implicit lazy val _MediaMetadataFormat: scalaxb.XMLFormat[MediaMetadata] = new Default_MediaMetadataFormat {} | |
implicit lazy val _MediaObjectFormat: scalaxb.XMLFormat[MediaObject] = new Default_MediaObjectFormat {} | |
implicit lazy val _MediaCaptionFormat: scalaxb.XMLFormat[MediaCaption] = new Default_MediaCaptionFormat {} | |
implicit lazy val _MediaProducerFormat: scalaxb.XMLFormat[MediaProducer] = new Default_MediaProducerFormat {} | |
implicit lazy val _OlFormat: scalaxb.XMLFormat[Ol] = new Default_OlFormat {} | |
implicit lazy val _OlSequence1Format: scalaxb.XMLFormat[OlSequence1] = new Default_OlSequence1Format {} | |
implicit lazy val _UlFormat: scalaxb.XMLFormat[Ul] = new Default_UlFormat {} | |
implicit lazy val _UlSequence1Format: scalaxb.XMLFormat[UlSequence1] = new Default_UlSequence1Format {} | |
implicit lazy val _LiFormat: scalaxb.XMLFormat[Li] = new Default_LiFormat {} | |
implicit lazy val _DlFormat: scalaxb.XMLFormat[Dl] = new Default_DlFormat {} | |
implicit lazy val _DtFormat: scalaxb.XMLFormat[Dt] = new Default_DtFormat {} | |
implicit lazy val _DdFormat: scalaxb.XMLFormat[Dd] = new Default_DdFormat {} | |
implicit lazy val _NowrapFormat: scalaxb.XMLFormat[Nowrap] = new Default_NowrapFormat {} | |
implicit lazy val _BqFormat: scalaxb.XMLFormat[Bq] = new Default_BqFormat {} | |
implicit lazy val _BqSequence1Format: scalaxb.XMLFormat[BqSequence1] = new Default_BqSequence1Format {} | |
implicit lazy val _CreditFormat: scalaxb.XMLFormat[Credit] = new Default_CreditFormat {} | |
implicit lazy val _FnFormat: scalaxb.XMLFormat[Fn] = new Default_FnFormat {} | |
implicit lazy val _FnSequence1Format: scalaxb.XMLFormat[FnSequence1] = new Default_FnSequence1Format {} | |
implicit lazy val _PreFormat: scalaxb.XMLFormat[Pre] = new Default_PreFormat {} | |
implicit lazy val _HrFormat: scalaxb.XMLFormat[Hr] = new Default_HrFormat {} | |
implicit lazy val _DatasourceFormat: scalaxb.XMLFormat[Datasource] = new Default_DatasourceFormat {} | |
implicit lazy val _AlignType2Format: scalaxb.XMLFormat[AlignType2] = new Default_AlignType2Format {} | |
implicit lazy val _CaptionFormat: scalaxb.XMLFormat[Caption] = new Default_CaptionFormat {} | |
implicit lazy val _ColFormat: scalaxb.XMLFormat[Col] = new Default_ColFormat {} | |
implicit lazy val _ColgroupFormat: scalaxb.XMLFormat[Colgroup] = new Default_ColgroupFormat {} | |
implicit lazy val _TheadFormat: scalaxb.XMLFormat[Thead] = new Default_TheadFormat {} | |
implicit lazy val _TbodyFormat: scalaxb.XMLFormat[Tbody] = new Default_TbodyFormat {} | |
implicit lazy val _TfootFormat: scalaxb.XMLFormat[Tfoot] = new Default_TfootFormat {} | |
implicit lazy val _TrFormat: scalaxb.XMLFormat[Tr] = new Default_TrFormat {} | |
implicit lazy val _NowrapTypeFormat: scalaxb.XMLFormat[NowrapType] = new Default_NowrapTypeFormat {} | |
implicit lazy val _ThFormat: scalaxb.XMLFormat[Th] = new Default_ThFormat {} | |
implicit lazy val _NowrapType2Format: scalaxb.XMLFormat[NowrapType2] = new Default_NowrapType2Format {} | |
implicit lazy val _TdFormat: scalaxb.XMLFormat[Td] = new Default_TdFormat {} | |
implicit lazy val _ChronFormat: scalaxb.XMLFormat[Chron] = new Default_ChronFormat {} | |
implicit lazy val _EventFormat: scalaxb.XMLFormat[Event] = new Default_EventFormat {} | |
implicit lazy val _FunctionTypeFormat: scalaxb.XMLFormat[FunctionType] = new Default_FunctionTypeFormat {} | |
implicit lazy val _LocationFormat: scalaxb.XMLFormat[Location] = new Default_LocationFormat {} | |
implicit lazy val _SublocationFormat: scalaxb.XMLFormat[Sublocation] = new Default_SublocationFormat {} | |
implicit lazy val _CityFormat: scalaxb.XMLFormat[City] = new Default_CityFormat {} | |
implicit lazy val _StateFormat: scalaxb.XMLFormat[State] = new Default_StateFormat {} | |
implicit lazy val _RegionFormat: scalaxb.XMLFormat[Region] = new Default_RegionFormat {} | |
implicit lazy val _CountryFormat: scalaxb.XMLFormat[Country] = new Default_CountryFormat {} | |
implicit lazy val _MoneyFormat: scalaxb.XMLFormat[Money] = new Default_MoneyFormat {} | |
implicit lazy val _NumFormat: scalaxb.XMLFormat[Num] = new Default_NumFormat {} | |
implicit lazy val _FracFormat: scalaxb.XMLFormat[Frac] = new Default_FracFormat {} | |
implicit lazy val _NumerFormat: scalaxb.XMLFormat[Numer] = new Default_NumerFormat {} | |
implicit lazy val _FracSepFormat: scalaxb.XMLFormat[FracSep] = new Default_FracSepFormat {} | |
implicit lazy val _DenomFormat: scalaxb.XMLFormat[Denom] = new Default_DenomFormat {} | |
implicit lazy val _SubFormat: scalaxb.XMLFormat[Sub] = new Default_SubFormat {} | |
implicit lazy val _SupFormat: scalaxb.XMLFormat[Sup] = new Default_SupFormat {} | |
implicit lazy val _ObjectTitleFormat: scalaxb.XMLFormat[ObjectTitle] = new Default_ObjectTitleFormat {} | |
implicit lazy val _OrgFormat: scalaxb.XMLFormat[Org] = new Default_OrgFormat {} | |
implicit lazy val _AltCodeFormat: scalaxb.XMLFormat[AltCode] = new Default_AltCodeFormat {} | |
implicit lazy val _GenderFormat: scalaxb.XMLFormat[Gender] = new Default_GenderFormat {} | |
implicit lazy val _PersonFormat: scalaxb.XMLFormat[Person] = new Default_PersonFormat {} | |
implicit lazy val _NameGivenFormat: scalaxb.XMLFormat[NameGiven] = new Default_NameGivenFormat {} | |
implicit lazy val _NameFamilyFormat: scalaxb.XMLFormat[NameFamily] = new Default_NameFamilyFormat {} | |
implicit lazy val _PostaddrFormat: scalaxb.XMLFormat[Postaddr] = new Default_PostaddrFormat {} | |
implicit lazy val _VirtlocFormat: scalaxb.XMLFormat[Virtloc] = new Default_VirtlocFormat {} | |
implicit lazy val _AFormat: scalaxb.XMLFormat[A] = new Default_AFormat {} | |
implicit lazy val _BrFormat: scalaxb.XMLFormat[Br] = new Default_BrFormat {} | |
implicit lazy val _EmFormat: scalaxb.XMLFormat[Em] = new Default_EmFormat {} | |
implicit lazy val _LangFormat: scalaxb.XMLFormat[Lang] = new Default_LangFormat {} | |
implicit lazy val _PronounceFormat: scalaxb.XMLFormat[Pronounce] = new Default_PronounceFormat {} | |
implicit lazy val _QFormat: scalaxb.XMLFormat[Q] = new Default_QFormat {} | |
implicit lazy val _AddresseeFormat: scalaxb.XMLFormat[Addressee] = new Default_AddresseeFormat {} | |
implicit lazy val _CareOfFormat: scalaxb.XMLFormat[CareOf] = new Default_CareOfFormat {} | |
implicit lazy val _DeliveryPointFormat: scalaxb.XMLFormat[DeliveryPoint] = new Default_DeliveryPointFormat {} | |
implicit lazy val _PostcodeFormat: scalaxb.XMLFormat[Postcode] = new Default_PostcodeFormat {} | |
implicit lazy val _DeliveryOfficeFormat: scalaxb.XMLFormat[DeliveryOffice] = new Default_DeliveryOfficeFormat {} | |
implicit lazy val _BodyEndFormat: scalaxb.XMLFormat[BodyEnd] = new Default_BodyEndFormat {} | |
implicit lazy val _TypeType3Format: scalaxb.XMLFormat[TypeType3] = new Default_TypeType3Format {} | |
implicit lazy val _TaglineFormat: scalaxb.XMLFormat[Tagline] = new Default_TaglineFormat {} | |
implicit lazy val _BibliographyFormat: scalaxb.XMLFormat[Bibliography] = new Default_BibliographyFormat {} | |
implicit lazy val _ClassifierFormat: scalaxb.XMLFormat[Classifier] = new Default_ClassifierFormat {} | |
implicit lazy val _NitfTableFormat: scalaxb.XMLFormat[NitfTable] = new Default_NitfTableFormat {} | |
implicit lazy val _CustomTableFormat: scalaxb.XMLFormat[CustomTable] = new Default_CustomTableFormat {} | |
implicit lazy val _TableReferenceFormat: scalaxb.XMLFormat[TableReference] = new Default_TableReferenceFormat {} | |
implicit lazy val _StatusFormat: scalaxb.XMLFormat[Status] = new Default_StatusFormat {} | |
implicit lazy val _NitfTableMetadataFormat: scalaxb.XMLFormat[NitfTableMetadata] = new Default_NitfTableMetadataFormat {} | |
implicit lazy val _NitfTableSummaryFormat: scalaxb.XMLFormat[NitfTableSummary] = new Default_NitfTableSummaryFormat {} | |
implicit lazy val _NitfColgroupFormat: scalaxb.XMLFormat[NitfColgroup] = new Default_NitfColgroupFormat {} | |
implicit lazy val _NitfColgroupSequence1Format: scalaxb.XMLFormat[NitfColgroupSequence1] = new Default_NitfColgroupSequence1Format {} | |
implicit lazy val _DataTypeFormat: scalaxb.XMLFormat[DataType] = new Default_DataTypeFormat {} | |
implicit lazy val _NitfColFormat: scalaxb.XMLFormat[NitfCol] = new Default_NitfColFormat {} | |
implicit lazy val _CellVAlignFormat: scalaxb.AttributeGroupFormat[CellVAlign] = new Default_CellVAlignFormat {} | |
implicit lazy val _CommonNITFAttributesFormat: scalaxb.AttributeGroupFormat[CommonNITFAttributes] = new Default_CommonNITFAttributesFormat {} | |
implicit lazy val _GlobalNITFAttributesFormat: scalaxb.AttributeGroupFormat[GlobalNITFAttributes] = new Default_GlobalNITFAttributesFormat {} | |
implicit lazy val _CellAlignFormat: scalaxb.AttributeGroupFormat[CellAlign] = new Default_CellAlignFormat {} | |
implicit val fromAnySchemaType: scala.xml.Elem => Option[scalaxb.DataRecord[Any]] = {elem => | |
import scalaxb.{Helper, DataRecord, fromXML} | |
val ns = Helper.nullOrEmpty(elem.scope.getURI(elem.prefix)) | |
val key = Some(elem.label) | |
val (xsns, xstype) = Helper.instanceType(elem) | |
(key, ns) match { | |
case (Some("nitf-col"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[NitfCol](elem))) | |
case (Some("nitf-table-summary"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[NitfTableSummary](elem))) | |
case (Some("table-reference"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[TableReference](elem))) | |
case (Some("nitf-table"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[NitfTable](elem))) | |
case (Some("bibliography"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Bibliography](elem))) | |
case (Some("body.end"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[BodyEnd](elem))) | |
case (Some("postcode"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Postcode](elem))) | |
case (Some("care.of"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[CareOf](elem))) | |
case (Some("q"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Q](elem))) | |
case (Some("lang"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Lang](elem))) | |
case (Some("br"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Br](elem))) | |
case (Some("virtloc"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Virtloc](elem))) | |
case (Some("name.family"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[NameFamily](elem))) | |
case (Some("person"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Person](elem))) | |
case (Some("org"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Org](elem))) | |
case (Some("sup"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Sup](elem))) | |
case (Some("denom"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Denom](elem))) | |
case (Some("numer"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Numer](elem))) | |
case (Some("num"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Num](elem))) | |
case (Some("country"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Country](elem))) | |
case (Some("state"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[State](elem))) | |
case (Some("sublocation"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Sublocation](elem))) | |
case (Some("function"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[FunctionType](elem))) | |
case (Some("chron"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Chron](elem))) | |
case (Some("th"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Th](elem))) | |
case (Some("tfoot"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Tfoot](elem))) | |
case (Some("thead"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Thead](elem))) | |
case (Some("col"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Col](elem))) | |
case (Some("datasource"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Datasource](elem))) | |
case (Some("pre"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Pre](elem))) | |
case (Some("credit"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Credit](elem))) | |
case (Some("dd"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Dd](elem))) | |
case (Some("dl"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Dl](elem))) | |
case (Some("ul"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Ul](elem))) | |
case (Some("media-producer"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[MediaProducer](elem))) | |
case (Some("media-object"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[MediaObject](elem))) | |
case (Some("media-reference"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[MediaReference](elem))) | |
case (Some("table"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Table](elem))) | |
case (Some("block"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Block](elem))) | |
case (Some("copyrite.holder"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[CopyriteHolder](elem))) | |
case (Some("copyrite"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Copyrite](elem))) | |
case (Some("story.date"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[StoryDate](elem))) | |
case (Some("distributor"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Distributor](elem))) | |
case (Some("byline"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Byline](elem))) | |
case (Some("rights.type"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[RightsType](elem))) | |
case (Some("rights.agent"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[RightsAgent](elem))) | |
case (Some("rights.startdate"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[RightsStartdate](elem))) | |
case (Some("rights"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Rights](elem))) | |
case (Some("hl2"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Hl2](elem))) | |
case (Some("hedline"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Hedline](elem))) | |
case (Some("body"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Body](elem))) | |
case (Some("pubdata"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Pubdata](elem))) | |
case (Some("keyword"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Keyword](elem))) | |
case (Some("doc.rights"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[DocRights](elem))) | |
case (Some("du-key"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[DuKey](elem))) | |
case (Some("series"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Series](elem))) | |
case (Some("date.expire"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[DateExpire](elem))) | |
case (Some("date.issue"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[DateIssue](elem))) | |
case (Some("urgency"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Urgency](elem))) | |
case (Some("del-list"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[DelList](elem))) | |
case (Some("evloc"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Evloc](elem))) | |
case (Some("docdata"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Docdata](elem))) | |
case (Some("iim"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Iim](elem))) | |
case (Some("tobject.property"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[TobjectProperty](elem))) | |
case (Some("meta"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Meta](elem))) | |
case (Some("head"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Head](elem))) | |
case (Some("nitf"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Nitf](elem))) | |
case (Some("title"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Title](elem))) | |
case (Some("tobject"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Tobject](elem))) | |
case (Some("tobject.subject"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[TobjectSubject](elem))) | |
case (Some("ds"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Ds](elem))) | |
case (Some("correction"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Correction](elem))) | |
case (Some("doc-id"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[DocId](elem))) | |
case (Some("from-src"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[FromSrc](elem))) | |
case (Some("fixture"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Fixture](elem))) | |
case (Some("date.release"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[DateRelease](elem))) | |
case (Some("doc-scope"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[DocScope](elem))) | |
case (Some("ed-msg"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[EdMsg](elem))) | |
case (Some("doc.copyright"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[DocCopyright](elem))) | |
case (Some("key-list"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[KeyList](elem))) | |
case (Some("identified-content"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[IdentifiedContent](elem))) | |
case (Some("revision-history"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[RevisionHistory](elem))) | |
case (Some("body.head"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[BodyHead](elem))) | |
case (Some("hl1"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Hl1](elem))) | |
case (Some("note"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Note](elem))) | |
case (Some("rights.owner"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[RightsOwner](elem))) | |
case (Some("rights.enddate"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[RightsEnddate](elem))) | |
case (Some("rights.geography"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[RightsGeography](elem))) | |
case (Some("rights.limitations"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[RightsLimitations](elem))) | |
case (Some("byttl"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Byttl](elem))) | |
case (Some("dateline"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Dateline](elem))) | |
case (Some("abstract"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Abstract](elem))) | |
case (Some("copyrite.year"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[CopyriteYear](elem))) | |
case (Some("body.content"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[BodyContent](elem))) | |
case (Some("p"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[P](elem))) | |
case (Some("media"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Media](elem))) | |
case (Some("media-metadata"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[MediaMetadata](elem))) | |
case (Some("media-caption"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[MediaCaption](elem))) | |
case (Some("ol"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Ol](elem))) | |
case (Some("li"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Li](elem))) | |
case (Some("dt"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Dt](elem))) | |
case (Some("bq"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Bq](elem))) | |
case (Some("fn"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Fn](elem))) | |
case (Some("hr"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Hr](elem))) | |
case (Some("caption"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Caption](elem))) | |
case (Some("colgroup"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Colgroup](elem))) | |
case (Some("tbody"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Tbody](elem))) | |
case (Some("tr"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Tr](elem))) | |
case (Some("td"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Td](elem))) | |
case (Some("event"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Event](elem))) | |
case (Some("location"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Location](elem))) | |
case (Some("city"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[City](elem))) | |
case (Some("region"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Region](elem))) | |
case (Some("money"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Money](elem))) | |
case (Some("frac"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Frac](elem))) | |
case (Some("frac-sep"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[FracSep](elem))) | |
case (Some("sub"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Sub](elem))) | |
case (Some("object.title"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[ObjectTitle](elem))) | |
case (Some("alt-code"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[AltCode](elem))) | |
case (Some("name.given"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[NameGiven](elem))) | |
case (Some("postaddr"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Postaddr](elem))) | |
case (Some("a"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[A](elem))) | |
case (Some("em"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Em](elem))) | |
case (Some("pronounce"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Pronounce](elem))) | |
case (Some("addressee"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Addressee](elem))) | |
case (Some("delivery.point"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[DeliveryPoint](elem))) | |
case (Some("delivery.office"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[DeliveryOffice](elem))) | |
case (Some("tagline"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Tagline](elem))) | |
case (Some("classifier"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[Classifier](elem))) | |
case (Some("custom-table"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[CustomTable](elem))) | |
case (Some("nitf-table-metadata"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[NitfTableMetadata](elem))) | |
case (Some("nitf-colgroup"), Some("http://iptc.org/std/NITF/2006-10-18/") | None) => Some(DataRecord(ns, key, xsns, xstype, fromXML[NitfColgroup](elem))) | |
case _ => None | |
} | |
} | |
def build_AlignFormat = new Default_AlignFormat {} | |
trait Default_AlignFormat extends scalaxb.XMLFormat[Align] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): Align = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("left")) => LeftType | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("center")) => Center | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("right")) => RightType | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("justify")) => Justify | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("char")) => CharType | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Align] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: Align, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
def build_ValignFormat = new Default_ValignFormat {} | |
trait Default_ValignFormat extends scalaxb.XMLFormat[Valign] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): Valign = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("top")) => Top | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("middle")) => Middle | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bottom")) => Bottom | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("baseline")) => Baseline | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Valign] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: Valign, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
trait Default_NitfFormat extends scalaxb.ElemNameParser[Nitf] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Nitf] = | |
phrase(opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "head")) ~ | |
(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "body")) ^^ | |
{ case p1 ~ p2 => | |
Nitf(p1.headOption map { scalaxb.fromXML[Head](_, scalaxb.ElemName(node) :: stack) }, | |
scalaxb.fromXML[Body](p2, scalaxb.ElemName(node) :: stack), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@uno").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@uno" -> _ }, | |
Some(scalaxb.DataRecord(None, None, scalaxb.fromXML[String](scala.xml.Text("-//IPTC//DTD NITF 3.4//EN"), scalaxb.ElemName(node) :: stack))) map { "@version" -> _ }, | |
Some(scalaxb.DataRecord(None, None, scalaxb.fromXML[String](scala.xml.Text("October 18, 2006"), scalaxb.ElemName(node) :: stack))) map { "@change.date" -> _ }, | |
Some(scalaxb.DataRecord(None, None, scalaxb.fromXML[String](scala.xml.Text("19:30"), scalaxb.ElemName(node) :: stack))) map { "@change.time" -> _ }, | |
(node \ "@baselang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@baselang" -> _ }, | |
(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])]: _*)) }) | |
override def writesAttribute(__obj: Nitf, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@uno", _) => __obj.uno foreach { x => attr = scala.xml.Attribute(null, "uno", x.toString, attr) } | |
case ("@version", _) => attr = scala.xml.Attribute(null, "version", __obj.version.toString, attr) | |
case ("@change.date", _) => attr = scala.xml.Attribute(null, "change.date", __obj.changeDate.toString, attr) | |
case ("@change.time", _) => attr = scala.xml.Attribute(null, "change.time", __obj.changeTime.toString, attr) | |
case ("@baselang", _) => __obj.baselang foreach { x => attr = scala.xml.Attribute(null, "baselang", x.toString, attr) } | |
case ("@class", _) => __obj.classValue 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: Nitf, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(__obj.head map { scalaxb.toXML[Head](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("head"), __scope, false) } getOrElse {Nil}, | |
scalaxb.toXML[Body](__obj.body, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("body"), __scope, false)) | |
} | |
trait Default_HeadFormat extends scalaxb.ElemNameParser[Head] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Head] = | |
phrase(opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "title")) ~ | |
safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "meta")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "tobject")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "iim")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "docdata")) ~ | |
safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "pubdata")) ~ | |
safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "revision-history")) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 ~ p5 ~ p6 ~ p7 => | |
Head(p1.headOption map { scalaxb.fromXML[Title](_, scalaxb.ElemName(node) :: stack) }, | |
p2 map { scalaxb.fromXML[Meta](_, scalaxb.ElemName(node) :: stack) }, | |
p3.headOption map { scalaxb.fromXML[Tobject](_, scalaxb.ElemName(node) :: stack) }, | |
p4.headOption map { scalaxb.fromXML[Iim](_, scalaxb.ElemName(node) :: stack) }, | |
p5.headOption map { scalaxb.fromXML[Docdata](_, scalaxb.ElemName(node) :: stack) }, | |
p6 map { scalaxb.fromXML[Pubdata](_, scalaxb.ElemName(node) :: stack) }, | |
p7 map { scalaxb.fromXML[RevisionHistory](_, scalaxb.ElemName(node) :: stack) }, | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Head, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: Head, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(__obj.title map { scalaxb.toXML[Title](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("title"), __scope, false) } getOrElse {Nil}, | |
__obj.meta flatMap { scalaxb.toXML[Meta](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("meta"), __scope, false) }, | |
__obj.tobject map { scalaxb.toXML[Tobject](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("tobject"), __scope, false) } getOrElse {Nil}, | |
__obj.iim map { scalaxb.toXML[Iim](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("iim"), __scope, false) } getOrElse {Nil}, | |
__obj.docdata map { scalaxb.toXML[Docdata](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("docdata"), __scope, false) } getOrElse {Nil}, | |
__obj.pubdata flatMap { scalaxb.toXML[Pubdata](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("pubdata"), __scope, false) }, | |
__obj.revisionHistory flatMap { scalaxb.toXML[RevisionHistory](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("revision-history"), __scope, false) }) | |
} | |
def build_TypeFormat = new Default_TypeFormat {} | |
trait Default_TypeFormat extends scalaxb.XMLFormat[Type] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): Type = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("main")) => Main | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("subtitle")) => Subtitle | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("parttitle")) => Parttitle | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("alternate")) => Alternate | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("abbrev")) => Abbrev | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("other")) => Other | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Type] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: Type, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
trait Default_TitleFormat extends scalaxb.ElemNameParser[Title] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Title] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
Title(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@type").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Type](x, scalaxb.ElemName(node) :: stack)) } map { "@type" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Title, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@type", _) => __obj.typeValue foreach { x => attr = scala.xml.Attribute(null, "type", 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: Title, __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 Default_MetaFormat extends scalaxb.XMLFormat[Meta] with scalaxb.CanWriteChildNodes[Meta] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Meta] = seq match { | |
case node: scala.xml.Node => Right(Meta(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@http-equiv").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@http-equiv" -> _ }, | |
(node \ "@name").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@name" -> _ }, | |
(node \ "@content").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@content" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: Meta, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@http-equiv", _) => __obj.httpEquiv foreach { x => attr = scala.xml.Attribute(null, "http-equiv", x.toString, attr) } | |
case ("@name", _) => __obj.name foreach { x => attr = scala.xml.Attribute(null, "name", x.toString, attr) } | |
case ("@content", _) => attr = scala.xml.Attribute(null, "content", __obj.content.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: Meta, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_TobjectFormat extends scalaxb.ElemNameParser[Tobject] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Tobject] = | |
phrase(safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "tobject.property")) ~ | |
safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "tobject.subject")) ^^ | |
{ case p1 ~ p2 => | |
Tobject(p1 map { scalaxb.fromXML[TobjectProperty](_, scalaxb.ElemName(node) :: stack) }, | |
p2 map { scalaxb.fromXML[TobjectSubject](_, scalaxb.ElemName(node) :: stack) }, | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@tobject.type").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } orElse Some(scalaxb.DataRecord(None, None, scalaxb.fromXML[String](scala.xml.Text("news"), scalaxb.ElemName(node) :: stack))) map { "@tobject.type" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Tobject, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@tobject.type", _) => if (__obj.tobjectType.toString != "news") attr = scala.xml.Attribute(null, "tobject.type", __obj.tobjectType.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: Tobject, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(__obj.tobjectProperty flatMap { scalaxb.toXML[TobjectProperty](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("tobject.property"), __scope, false) }, | |
__obj.tobjectSubject flatMap { scalaxb.toXML[TobjectSubject](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("tobject.subject"), __scope, false) }) | |
} | |
trait Default_TobjectPropertyFormat extends scalaxb.XMLFormat[TobjectProperty] with scalaxb.CanWriteChildNodes[TobjectProperty] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, TobjectProperty] = seq match { | |
case node: scala.xml.Node => Right(TobjectProperty(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@tobject.property.type").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } orElse Some(scalaxb.DataRecord(None, None, scalaxb.fromXML[String](scala.xml.Text("current"), scalaxb.ElemName(node) :: stack))) map { "@tobject.property.type" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: TobjectProperty, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@tobject.property.type", _) => if (__obj.tobjectPropertyType.toString != "current") attr = scala.xml.Attribute(null, "tobject.property.type", __obj.tobjectPropertyType.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: TobjectProperty, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_TobjectSubjectFormat extends scalaxb.XMLFormat[TobjectSubject] with scalaxb.CanWriteChildNodes[TobjectSubject] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, TobjectSubject] = seq match { | |
case node: scala.xml.Node => Right(TobjectSubject(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@tobject.subject.ipr").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } orElse Some(scalaxb.DataRecord(None, None, scalaxb.fromXML[String](scala.xml.Text("IPTC"), scalaxb.ElemName(node) :: stack))) map { "@tobject.subject.ipr" -> _ }, | |
(node \ "@tobject.subject.refnum").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@tobject.subject.refnum" -> _ }, | |
(node \ "@tobject.subject.code").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@tobject.subject.code" -> _ }, | |
(node \ "@tobject.subject.type").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@tobject.subject.type" -> _ }, | |
(node \ "@tobject.subject.matter").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@tobject.subject.matter" -> _ }, | |
(node \ "@tobject.subject.detail").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@tobject.subject.detail" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: TobjectSubject, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@tobject.subject.ipr", _) => if (__obj.tobjectSubjectIpr.toString != "IPTC") attr = scala.xml.Attribute(null, "tobject.subject.ipr", __obj.tobjectSubjectIpr.toString, attr) | |
case ("@tobject.subject.refnum", _) => attr = scala.xml.Attribute(null, "tobject.subject.refnum", __obj.tobjectSubjectRefnum.toString, attr) | |
case ("@tobject.subject.code", _) => __obj.tobjectSubjectCode foreach { x => attr = scala.xml.Attribute(null, "tobject.subject.code", x.toString, attr) } | |
case ("@tobject.subject.type", _) => __obj.tobjectSubjectType foreach { x => attr = scala.xml.Attribute(null, "tobject.subject.type", x.toString, attr) } | |
case ("@tobject.subject.matter", _) => __obj.tobjectSubjectMatter foreach { x => attr = scala.xml.Attribute(null, "tobject.subject.matter", x.toString, attr) } | |
case ("@tobject.subject.detail", _) => __obj.tobjectSubjectDetail foreach { x => attr = scala.xml.Attribute(null, "tobject.subject.detail", 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: TobjectSubject, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_IimFormat extends scalaxb.ElemNameParser[Iim] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Iim] = | |
phrase(safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "ds")) ^^ | |
{ case p1 => | |
Iim(p1 map { scalaxb.fromXML[Ds](_, scalaxb.ElemName(node) :: stack) }, | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@ver").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@ver" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Iim, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@ver", _) => __obj.ver foreach { x => attr = scala.xml.Attribute(null, "ver", 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: Iim, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.ds flatMap { scalaxb.toXML[Ds](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("ds"), __scope, false) }) | |
} | |
trait Default_DsFormat extends scalaxb.XMLFormat[Ds] with scalaxb.CanWriteChildNodes[Ds] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Ds] = seq match { | |
case node: scala.xml.Node => Right(Ds(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@num").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@num" -> _ }, | |
(node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: Ds, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@num", _) => attr = scala.xml.Attribute(null, "num", __obj.num.toString, attr) | |
case ("@value", _) => __obj.valueAttribute foreach { x => attr = scala.xml.Attribute(null, "value", 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: Ds, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_DocdataFormat extends scalaxb.ElemNameParser[Docdata] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Docdata] = | |
phrase(safeRep(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "correction")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Correction](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "evloc")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Evloc](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "doc-id")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[DocId](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "del-list")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[DelList](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "urgency")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Urgency](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "fixture")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Fixture](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "date.issue")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[DateIssue](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "date.release")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[DateRelease](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "date.expire")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[DateExpire](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "doc-scope")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[DocScope](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "series")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Series](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "ed-msg")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[EdMsg](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "du-key")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[DuKey](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "doc.copyright")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[DocCopyright](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "doc.rights")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[DocRights](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "key-list")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[KeyList](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "identified-content")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[IdentifiedContent](x, scalaxb.ElemName(node) :: stack))))) ^^ | |
{ case p1 => | |
Docdata(p1, | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@management-status").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@management-status" -> _ }, | |
(node \ "@management-doc-idref").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@management-doc-idref" -> _ }, | |
(node \ "@management-idref-status").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@management-idref-status" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Docdata, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@management-status", _) => __obj.managementStatus foreach { x => attr = scala.xml.Attribute(null, "management-status", x.toString, attr) } | |
case ("@management-doc-idref", _) => __obj.managementDocIdref foreach { x => attr = scala.xml.Attribute(null, "management-doc-idref", x.toString, attr) } | |
case ("@management-idref-status", _) => __obj.managementIdrefStatus foreach { x => attr = scala.xml.Attribute(null, "management-idref-status", 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: Docdata, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.docdataoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[DocdataOption]](x, x.namespace, x.key, __scope, false) }) | |
} | |
trait Default_CorrectionFormat extends scalaxb.XMLFormat[Correction] with scalaxb.CanWriteChildNodes[Correction] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Correction] = seq match { | |
case node: scala.xml.Node => Right(Correction(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@info").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@info" -> _ }, | |
(node \ "@id-string").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id-string" -> _ }, | |
(node \ "@regsrc").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@regsrc" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: Correction, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@info", _) => __obj.info foreach { x => attr = scala.xml.Attribute(null, "info", x.toString, attr) } | |
case ("@id-string", _) => __obj.idString foreach { x => attr = scala.xml.Attribute(null, "id-string", x.toString, attr) } | |
case ("@regsrc", _) => __obj.regsrc foreach { x => attr = scala.xml.Attribute(null, "regsrc", 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: Correction, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_EvlocFormat extends scalaxb.XMLFormat[Evloc] with scalaxb.CanWriteChildNodes[Evloc] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Evloc] = seq match { | |
case node: scala.xml.Node => Right(Evloc(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@iso-cc").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@iso-cc" -> _ }, | |
(node \ "@state-prov").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@state-prov" -> _ }, | |
(node \ "@county-dist").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@county-dist" -> _ }, | |
(node \ "@city").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@city" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: Evloc, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@iso-cc", _) => __obj.isoCc foreach { x => attr = scala.xml.Attribute(null, "iso-cc", x.toString, attr) } | |
case ("@state-prov", _) => __obj.stateProv foreach { x => attr = scala.xml.Attribute(null, "state-prov", x.toString, attr) } | |
case ("@county-dist", _) => __obj.countyDist foreach { x => attr = scala.xml.Attribute(null, "county-dist", x.toString, attr) } | |
case ("@city", _) => __obj.city foreach { x => attr = scala.xml.Attribute(null, "city", 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: Evloc, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_DocIdFormat extends scalaxb.XMLFormat[DocId] with scalaxb.CanWriteChildNodes[DocId] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, DocId] = seq match { | |
case node: scala.xml.Node => Right(DocId(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@regsrc").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@regsrc" -> _ }, | |
(node \ "@id-string").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id-string" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: DocId, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@regsrc", _) => __obj.regsrc foreach { x => attr = scala.xml.Attribute(null, "regsrc", x.toString, attr) } | |
case ("@id-string", _) => __obj.idString foreach { x => attr = scala.xml.Attribute(null, "id-string", 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: DocId, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_DelListFormat extends scalaxb.ElemNameParser[DelList] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[DelList] = | |
phrase(safeRep(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "from-src"))) ^^ | |
{ case p1 => DelListSequence1(scalaxb.fromXML[FromSrc](p1, scalaxb.ElemName(node) :: stack)) }) ^^ | |
{ case p1 => | |
DelList(p1, | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: DelList, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: DelList, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.dellistsequence1 flatMap { scalaxb.toXML[DelListSequence1](_, None, Some("dellistsequence1"), __scope, false) }) | |
} | |
trait Default_DelListSequence1Format extends scalaxb.XMLFormat[DelListSequence1] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, DelListSequence1] = Left("don't call me.") | |
def writes(__obj: DelListSequence1, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
scalaxb.toXML[FromSrc](__obj.fromSrc, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("from-src"), __scope, false) | |
} | |
trait Default_FromSrcFormat extends scalaxb.XMLFormat[FromSrc] with scalaxb.CanWriteChildNodes[FromSrc] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, FromSrc] = seq match { | |
case node: scala.xml.Node => Right(FromSrc(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@src-name").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@src-name" -> _ }, | |
(node \ "@level-number").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@level-number" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: FromSrc, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@src-name", _) => __obj.srcName foreach { x => attr = scala.xml.Attribute(null, "src-name", x.toString, attr) } | |
case ("@level-number", _) => __obj.levelNumber foreach { x => attr = scala.xml.Attribute(null, "level-number", 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: FromSrc, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_UrgencyFormat extends scalaxb.XMLFormat[Urgency] with scalaxb.CanWriteChildNodes[Urgency] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Urgency] = seq match { | |
case node: scala.xml.Node => Right(Urgency(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@ed-urg").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@ed-urg" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: Urgency, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@ed-urg", _) => __obj.edUrg foreach { x => attr = scala.xml.Attribute(null, "ed-urg", 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: Urgency, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_FixtureFormat extends scalaxb.XMLFormat[Fixture] with scalaxb.CanWriteChildNodes[Fixture] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Fixture] = seq match { | |
case node: scala.xml.Node => Right(Fixture(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@fix-id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@fix-id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: Fixture, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@fix-id", _) => __obj.fixId foreach { x => attr = scala.xml.Attribute(null, "fix-id", 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: Fixture, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_DateIssueFormat extends scalaxb.XMLFormat[DateIssue] with scalaxb.CanWriteChildNodes[DateIssue] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, DateIssue] = seq match { | |
case node: scala.xml.Node => Right(DateIssue(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@norm").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@norm" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: DateIssue, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@norm", _) => __obj.norm foreach { x => attr = scala.xml.Attribute(null, "norm", 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: DateIssue, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_DateReleaseFormat extends scalaxb.XMLFormat[DateRelease] with scalaxb.CanWriteChildNodes[DateRelease] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, DateRelease] = seq match { | |
case node: scala.xml.Node => Right(DateRelease(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@norm").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@norm" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: DateRelease, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@norm", _) => __obj.norm foreach { x => attr = scala.xml.Attribute(null, "norm", 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: DateRelease, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_DateExpireFormat extends scalaxb.XMLFormat[DateExpire] with scalaxb.CanWriteChildNodes[DateExpire] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, DateExpire] = seq match { | |
case node: scala.xml.Node => Right(DateExpire(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@norm").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@norm" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: DateExpire, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@norm", _) => __obj.norm foreach { x => attr = scala.xml.Attribute(null, "norm", 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: DateExpire, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_DocScopeFormat extends scalaxb.XMLFormat[DocScope] with scalaxb.CanWriteChildNodes[DocScope] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, DocScope] = seq match { | |
case node: scala.xml.Node => Right(DocScope(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@scope").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@scope" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: DocScope, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@scope", _) => __obj.scope foreach { x => attr = scala.xml.Attribute(null, "scope", 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: DocScope, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_SeriesFormat extends scalaxb.XMLFormat[Series] with scalaxb.CanWriteChildNodes[Series] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Series] = seq match { | |
case node: scala.xml.Node => Right(Series(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@series.name").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@series.name" -> _ }, | |
(node \ "@series.part").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } orElse Some(scalaxb.DataRecord(None, None, scalaxb.fromXML[String](scala.xml.Text("0"), scalaxb.ElemName(node) :: stack))) map { "@series.part" -> _ }, | |
(node \ "@series.totalpart").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } orElse Some(scalaxb.DataRecord(None, None, scalaxb.fromXML[String](scala.xml.Text("0"), scalaxb.ElemName(node) :: stack))) map { "@series.totalpart" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: Series, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@series.name", _) => __obj.seriesName foreach { x => attr = scala.xml.Attribute(null, "series.name", x.toString, attr) } | |
case ("@series.part", _) => if (__obj.seriesPart.toString != "0") attr = scala.xml.Attribute(null, "series.part", __obj.seriesPart.toString, attr) | |
case ("@series.totalpart", _) => if (__obj.seriesTotalpart.toString != "0") attr = scala.xml.Attribute(null, "series.totalpart", __obj.seriesTotalpart.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: Series, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_EdMsgFormat extends scalaxb.XMLFormat[EdMsg] with scalaxb.CanWriteChildNodes[EdMsg] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, EdMsg] = seq match { | |
case node: scala.xml.Node => Right(EdMsg(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@msg-type").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@msg-type" -> _ }, | |
(node \ "@info").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@info" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: EdMsg, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@msg-type", _) => __obj.msgType foreach { x => attr = scala.xml.Attribute(null, "msg-type", x.toString, attr) } | |
case ("@info", _) => __obj.info foreach { x => attr = scala.xml.Attribute(null, "info", 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: EdMsg, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_DuKeyFormat extends scalaxb.XMLFormat[DuKey] with scalaxb.CanWriteChildNodes[DuKey] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, DuKey] = seq match { | |
case node: scala.xml.Node => Right(DuKey(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@generation").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@generation" -> _ }, | |
(node \ "@part").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@part" -> _ }, | |
(node \ "@version").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@version" -> _ }, | |
(node \ "@key").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@key" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: DuKey, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@generation", _) => __obj.generation foreach { x => attr = scala.xml.Attribute(null, "generation", x.toString, attr) } | |
case ("@part", _) => __obj.part foreach { x => attr = scala.xml.Attribute(null, "part", x.toString, attr) } | |
case ("@version", _) => __obj.version foreach { x => attr = scala.xml.Attribute(null, "version", x.toString, attr) } | |
case ("@key", _) => __obj.key foreach { x => attr = scala.xml.Attribute(null, "key", 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: DuKey, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_DocCopyrightFormat extends scalaxb.XMLFormat[DocCopyright] with scalaxb.CanWriteChildNodes[DocCopyright] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, DocCopyright] = seq match { | |
case node: scala.xml.Node => Right(DocCopyright(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@year").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@year" -> _ }, | |
(node \ "@holder").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@holder" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: DocCopyright, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@year", _) => __obj.year foreach { x => attr = scala.xml.Attribute(null, "year", x.toString, attr) } | |
case ("@holder", _) => __obj.holder foreach { x => attr = scala.xml.Attribute(null, "holder", 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: DocCopyright, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_DocRightsFormat extends scalaxb.XMLFormat[DocRights] with scalaxb.CanWriteChildNodes[DocRights] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, DocRights] = seq match { | |
case node: scala.xml.Node => Right(DocRights(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@owner").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@owner" -> _ }, | |
(node \ "@startdate").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@startdate" -> _ }, | |
(node \ "@enddate").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@enddate" -> _ }, | |
(node \ "@agent").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@agent" -> _ }, | |
(node \ "@geography").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@geography" -> _ }, | |
(node \ "@location-code").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@location-code" -> _ }, | |
(node \ "@code-source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@code-source" -> _ }, | |
(node \ "@type").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@type" -> _ }, | |
(node \ "@limitations").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@limitations" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: DocRights, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@owner", _) => __obj.owner foreach { x => attr = scala.xml.Attribute(null, "owner", x.toString, attr) } | |
case ("@startdate", _) => __obj.startdate foreach { x => attr = scala.xml.Attribute(null, "startdate", x.toString, attr) } | |
case ("@enddate", _) => __obj.enddate foreach { x => attr = scala.xml.Attribute(null, "enddate", x.toString, attr) } | |
case ("@agent", _) => __obj.agent foreach { x => attr = scala.xml.Attribute(null, "agent", x.toString, attr) } | |
case ("@geography", _) => __obj.geography foreach { x => attr = scala.xml.Attribute(null, "geography", x.toString, attr) } | |
case ("@location-code", _) => __obj.locationCode foreach { x => attr = scala.xml.Attribute(null, "location-code", x.toString, attr) } | |
case ("@code-source", _) => __obj.codeSource foreach { x => attr = scala.xml.Attribute(null, "code-source", x.toString, attr) } | |
case ("@type", _) => __obj.typeValue foreach { x => attr = scala.xml.Attribute(null, "type", x.toString, attr) } | |
case ("@limitations", _) => __obj.limitations foreach { x => attr = scala.xml.Attribute(null, "limitations", 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: DocRights, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_KeyListFormat extends scalaxb.ElemNameParser[KeyList] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[KeyList] = | |
phrase(safeRep(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "keyword"))) ^^ | |
{ case p1 => KeyListSequence1(scalaxb.fromXML[Keyword](p1, scalaxb.ElemName(node) :: stack)) }) ^^ | |
{ case p1 => | |
KeyList(p1, | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: KeyList, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: KeyList, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.keylistsequence1 flatMap { scalaxb.toXML[KeyListSequence1](_, None, Some("keylistsequence1"), __scope, false) }) | |
} | |
trait Default_KeyListSequence1Format extends scalaxb.XMLFormat[KeyListSequence1] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, KeyListSequence1] = Left("don't call me.") | |
def writes(__obj: KeyListSequence1, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
scalaxb.toXML[Keyword](__obj.keyword, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("keyword"), __scope, false) | |
} | |
trait Default_KeywordFormat extends scalaxb.XMLFormat[Keyword] with scalaxb.CanWriteChildNodes[Keyword] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Keyword] = seq match { | |
case node: scala.xml.Node => Right(Keyword(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@key").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@key" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: Keyword, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@key", _) => __obj.key foreach { x => attr = scala.xml.Attribute(null, "key", 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: Keyword, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_IdentifiedContentFormat extends scalaxb.ElemNameParser[IdentifiedContent] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[IdentifiedContent] = | |
phrase(safeRep(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "person")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Person](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "org")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Org](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "location")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Location](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "event")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Event](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "function")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[FunctionType](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "object.title")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[ObjectTitle](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "virtloc")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Virtloc](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "classifier")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Classifier](x, scalaxb.ElemName(node) :: stack))))) ^^ | |
{ case p1 => | |
IdentifiedContent(p1, | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: IdentifiedContent, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: IdentifiedContent, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.identifiedcontentoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[IdentifiedContentOption]](x, x.namespace, x.key, __scope, false) }) | |
} | |
def build_TypeTypeFormat = new Default_TypeTypeFormat {} | |
trait Default_TypeTypeFormat extends scalaxb.XMLFormat[TypeType] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): TypeType = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("print")) => Print | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("audio")) => Audio | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("video")) => Video | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("web")) => Web | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("appliance")) => Appliance | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("other")) => OtherValue | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, TypeType] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: TypeType, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
trait Default_PubdataFormat extends scalaxb.XMLFormat[Pubdata] with scalaxb.CanWriteChildNodes[Pubdata] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Pubdata] = seq match { | |
case node: scala.xml.Node => Right(Pubdata(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@type").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[TypeType](x, scalaxb.ElemName(node) :: stack)) } map { "@type" -> _ }, | |
(node \ "@item-length").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@item-length" -> _ }, | |
(node \ "@unit-of-measure").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@unit-of-measure" -> _ }, | |
(node \ "@date.publication").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@date.publication" -> _ }, | |
(node \ "@name").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@name" -> _ }, | |
(node \ "@issn").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@issn" -> _ }, | |
(node \ "@volume").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@volume" -> _ }, | |
(node \ "@number").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@number" -> _ }, | |
(node \ "@issue").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@issue" -> _ }, | |
(node \ "@edition.name").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@edition.name" -> _ }, | |
(node \ "@edition.area").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@edition.area" -> _ }, | |
(node \ "@position.section").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@position.section" -> _ }, | |
(node \ "@position.sequence").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@position.sequence" -> _ }, | |
(node \ "@ex-ref").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@ex-ref" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: Pubdata, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@type", _) => __obj.typeValue foreach { x => attr = scala.xml.Attribute(null, "type", x.toString, attr) } | |
case ("@item-length", _) => __obj.itemLength foreach { x => attr = scala.xml.Attribute(null, "item-length", x.toString, attr) } | |
case ("@unit-of-measure", _) => __obj.unitOfMeasure foreach { x => attr = scala.xml.Attribute(null, "unit-of-measure", x.toString, attr) } | |
case ("@date.publication", _) => __obj.datePublication foreach { x => attr = scala.xml.Attribute(null, "date.publication", x.toString, attr) } | |
case ("@name", _) => __obj.name foreach { x => attr = scala.xml.Attribute(null, "name", x.toString, attr) } | |
case ("@issn", _) => __obj.issn foreach { x => attr = scala.xml.Attribute(null, "issn", x.toString, attr) } | |
case ("@volume", _) => __obj.volume foreach { x => attr = scala.xml.Attribute(null, "volume", x.toString, attr) } | |
case ("@number", _) => __obj.number foreach { x => attr = scala.xml.Attribute(null, "number", x.toString, attr) } | |
case ("@issue", _) => __obj.issue foreach { x => attr = scala.xml.Attribute(null, "issue", x.toString, attr) } | |
case ("@edition.name", _) => __obj.editionName foreach { x => attr = scala.xml.Attribute(null, "edition.name", x.toString, attr) } | |
case ("@edition.area", _) => __obj.editionArea foreach { x => attr = scala.xml.Attribute(null, "edition.area", x.toString, attr) } | |
case ("@position.section", _) => __obj.positionSection foreach { x => attr = scala.xml.Attribute(null, "position.section", x.toString, attr) } | |
case ("@position.sequence", _) => __obj.positionSequence foreach { x => attr = scala.xml.Attribute(null, "position.sequence", x.toString, attr) } | |
case ("@ex-ref", _) => __obj.exRef foreach { x => attr = scala.xml.Attribute(null, "ex-ref", 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: Pubdata, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
def build_FunctionTypeTypeFormat = new Default_FunctionTypeTypeFormat {} | |
trait Default_FunctionTypeTypeFormat extends scalaxb.XMLFormat[FunctionTypeType] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): FunctionTypeType = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("writer-author")) => WriterAuthor | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("editor")) => Editor | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("producer")) => Producer | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("archivist")) => Archivist | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("videographer")) => Videographer | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("graphic-artist")) => GraphicArtist | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("photographer")) => Photographer | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("statistician")) => Statistician | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("other")) => OtherValue2 | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, FunctionTypeType] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: FunctionTypeType, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
trait Default_RevisionHistoryFormat extends scalaxb.XMLFormat[RevisionHistory] with scalaxb.CanWriteChildNodes[RevisionHistory] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, RevisionHistory] = seq match { | |
case node: scala.xml.Node => Right(RevisionHistory(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@name").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@name" -> _ }, | |
(node \ "@function").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[FunctionTypeType](x, scalaxb.ElemName(node) :: stack)) } map { "@function" -> _ }, | |
(node \ "@norm").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@norm" -> _ }, | |
(node \ "@comment").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@comment" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: RevisionHistory, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@name", _) => __obj.name foreach { x => attr = scala.xml.Attribute(null, "name", x.toString, attr) } | |
case ("@function", _) => __obj.function foreach { x => attr = scala.xml.Attribute(null, "function", x.toString, attr) } | |
case ("@norm", _) => __obj.norm foreach { x => attr = scala.xml.Attribute(null, "norm", x.toString, attr) } | |
case ("@comment", _) => __obj.comment foreach { x => attr = scala.xml.Attribute(null, "comment", 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: RevisionHistory, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_BodyFormat extends scalaxb.ElemNameParser[Body] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Body] = | |
phrase(opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "body.head")) ~ | |
safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "body.content")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "body.end")) ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Body(p1.headOption map { scalaxb.fromXML[BodyHead](_, scalaxb.ElemName(node) :: stack) }, | |
p2 map { scalaxb.fromXML[BodyContent](_, scalaxb.ElemName(node) :: stack) }, | |
p3.headOption map { scalaxb.fromXML[BodyEnd](_, scalaxb.ElemName(node) :: stack) }, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Body, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Body, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(__obj.bodyHead map { scalaxb.toXML[BodyHead](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("body.head"), __scope, false) } getOrElse {Nil}, | |
__obj.bodyContent flatMap { scalaxb.toXML[BodyContent](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("body.content"), __scope, false) }, | |
__obj.bodyEnd map { scalaxb.toXML[BodyEnd](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("body.end"), __scope, false) } getOrElse {Nil}) | |
} | |
trait Default_BodyHeadFormat extends scalaxb.ElemNameParser[BodyHead] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[BodyHead] = | |
phrase(safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "hedline")) ~ | |
safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "note")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "rights")) ~ | |
safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "byline")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "distributor")) ~ | |
safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "dateline")) ~ | |
safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "abstract")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "series")) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 ~ p5 ~ p6 ~ p7 ~ p8 => | |
BodyHead(p1 map { scalaxb.fromXML[Hedline](_, scalaxb.ElemName(node) :: stack) }, | |
p2 map { scalaxb.fromXML[Note](_, scalaxb.ElemName(node) :: stack) }, | |
p3.headOption map { scalaxb.fromXML[Rights](_, scalaxb.ElemName(node) :: stack) }, | |
p4 map { scalaxb.fromXML[Byline](_, scalaxb.ElemName(node) :: stack) }, | |
p5.headOption map { scalaxb.fromXML[Distributor](_, scalaxb.ElemName(node) :: stack) }, | |
p6 map { scalaxb.fromXML[Dateline](_, scalaxb.ElemName(node) :: stack) }, | |
p7 map { scalaxb.fromXML[Abstract](_, scalaxb.ElemName(node) :: stack) }, | |
p8.headOption map { scalaxb.fromXML[Series](_, scalaxb.ElemName(node) :: stack) }, | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: BodyHead, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: BodyHead, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(__obj.hedline flatMap { scalaxb.toXML[Hedline](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("hedline"), __scope, false) }, | |
__obj.note flatMap { scalaxb.toXML[Note](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("note"), __scope, false) }, | |
__obj.rights map { scalaxb.toXML[Rights](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("rights"), __scope, false) } getOrElse {Nil}, | |
__obj.byline flatMap { scalaxb.toXML[Byline](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("byline"), __scope, false) }, | |
__obj.distributor map { scalaxb.toXML[Distributor](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("distributor"), __scope, false) } getOrElse {Nil}, | |
__obj.dateline flatMap { scalaxb.toXML[Dateline](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("dateline"), __scope, false) }, | |
__obj.abstractValue flatMap { scalaxb.toXML[Abstract](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("abstract"), __scope, false) }, | |
__obj.series map { scalaxb.toXML[Series](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("series"), __scope, false) } getOrElse {Nil}) | |
} | |
trait Default_HedlineFormat extends scalaxb.ElemNameParser[Hedline] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Hedline] = | |
phrase((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "hl1")) ~ | |
safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "hl2")) ^^ | |
{ case p1 ~ p2 => | |
Hedline(scalaxb.fromXML[Hl1](p1, scalaxb.ElemName(node) :: stack), | |
p2 map { scalaxb.fromXML[Hl2](_, scalaxb.ElemName(node) :: stack) }, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Hedline, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Hedline, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(scalaxb.toXML[Hl1](__obj.hl1, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("hl1"), __scope, false), | |
__obj.hl2 flatMap { scalaxb.toXML[Hl2](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("hl2"), __scope, false) }) | |
} | |
trait Default_Hl1Format extends scalaxb.ElemNameParser[Hl1] with _EnrichedTextGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Hl1] = | |
phrase(optTextRecord ~ | |
safeRep((parsemixedEnrichedTextGroup(node, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Hl1(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Hl1, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Hl1, __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 Default_Hl2Format extends scalaxb.ElemNameParser[Hl2] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Hl2] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "chron")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Chron](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "classifier")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Classifier](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "copyrite")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Copyrite](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "event")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Event](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "function")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[FunctionType](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "location")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Location](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "money")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Money](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "num")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "object.title")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[ObjectTitle](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "org")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Org](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "person")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Person](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "postaddr")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Postaddr](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "virtloc")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Virtloc](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "a")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[A](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "br")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Br](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "em")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Em](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "lang")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Lang](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "pronounce")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Pronounce](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "q")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Q](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Hl2(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Hl2, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Hl2, __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) } | |
} | |
def build_NoteclassFormat = new Default_NoteclassFormat {} | |
trait Default_NoteclassFormat extends scalaxb.XMLFormat[Noteclass] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): Noteclass = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("cpyrt")) => Cpyrt | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("end")) => End | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("hd")) => Hd | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("editorsnote")) => Editorsnote | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("trademk")) => Trademk | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("undef")) => Undef | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Noteclass] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: Noteclass, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
def build_TypeType2Format = new Default_TypeType2Format {} | |
trait Default_TypeType2Format extends scalaxb.XMLFormat[TypeType2] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): TypeType2 = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("std")) => Std | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("pa")) => Pa | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("npa")) => Npa | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, TypeType2] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: TypeType2, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
trait Default_NoteFormat extends scalaxb.ElemNameParser[Note] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Note] = | |
phrase(safeRep(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "body.content"))) ^^ | |
{ case p1 => NoteSequence1(scalaxb.fromXML[BodyContent](p1, scalaxb.ElemName(node) :: stack)) }) ^^ | |
{ case p1 => | |
Note(p1, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@noteclass").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Noteclass](x, scalaxb.ElemName(node) :: stack)) } map { "@noteclass" -> _ }, | |
(node \ "@type").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[TypeType2](x, scalaxb.ElemName(node) :: stack)) } orElse Some(scalaxb.DataRecord(None, None, scalaxb.fromXML[TypeType2](scala.xml.Text("std"), scalaxb.ElemName(node) :: stack))) map { "@type" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Note, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@noteclass", _) => __obj.noteclass foreach { x => attr = scala.xml.Attribute(null, "noteclass", x.toString, attr) } | |
case ("@type", _) => if (__obj.typeValue.toString != "std") attr = scala.xml.Attribute(null, "type", __obj.typeValue.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: Note, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.notesequence1 flatMap { scalaxb.toXML[NoteSequence1](_, None, Some("notesequence1"), __scope, false) }) | |
} | |
trait Default_NoteSequence1Format extends scalaxb.XMLFormat[NoteSequence1] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, NoteSequence1] = Left("don't call me.") | |
def writes(__obj: NoteSequence1, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
scalaxb.toXML[BodyContent](__obj.bodyContent, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("body.content"), __scope, false) | |
} | |
trait Default_RightsFormat extends scalaxb.ElemNameParser[Rights] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Rights] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "rights.owner")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[RightsOwner](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "rights.startdate")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[RightsStartdate](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "rights.enddate")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[RightsEnddate](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "rights.agent")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[RightsAgent](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "rights.geography")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[RightsGeography](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "rights.type")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[RightsType](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "rights.limitations")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[RightsLimitations](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Rights(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Rights, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: Rights, __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 Default_RightsOwnerFormat extends scalaxb.ElemNameParser[RightsOwner] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[RightsOwner] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
RightsOwner(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@contact").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@contact" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: RightsOwner, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@contact", _) => __obj.contact foreach { x => attr = scala.xml.Attribute(null, "contact", 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: RightsOwner, __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 Default_RightsStartdateFormat extends scalaxb.ElemNameParser[RightsStartdate] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[RightsStartdate] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
RightsStartdate(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@norm").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@norm" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: RightsStartdate, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@norm", _) => __obj.norm foreach { x => attr = scala.xml.Attribute(null, "norm", 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: RightsStartdate, __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 Default_RightsEnddateFormat extends scalaxb.ElemNameParser[RightsEnddate] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[RightsEnddate] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
RightsEnddate(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@norm").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@norm" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: RightsEnddate, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@norm", _) => __obj.norm foreach { x => attr = scala.xml.Attribute(null, "norm", 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: RightsEnddate, __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 Default_RightsAgentFormat extends scalaxb.ElemNameParser[RightsAgent] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[RightsAgent] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
RightsAgent(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@contact").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@contact" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: RightsAgent, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@contact", _) => __obj.contact foreach { x => attr = scala.xml.Attribute(null, "contact", 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: RightsAgent, __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 Default_RightsGeographyFormat extends scalaxb.ElemNameParser[RightsGeography] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[RightsGeography] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
RightsGeography(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@location-code").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@location-code" -> _ }, | |
(node \ "@code-source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@code-source" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: RightsGeography, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@location-code", _) => __obj.locationCode foreach { x => attr = scala.xml.Attribute(null, "location-code", x.toString, attr) } | |
case ("@code-source", _) => __obj.codeSource foreach { x => attr = scala.xml.Attribute(null, "code-source", 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: RightsGeography, __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 Default_RightsTypeFormat extends scalaxb.ElemNameParser[RightsType] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[RightsType] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
RightsType(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: RightsType, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: RightsType, __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 Default_RightsLimitationsFormat extends scalaxb.ElemNameParser[RightsLimitations] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[RightsLimitations] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
RightsLimitations(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: RightsLimitations, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: RightsLimitations, __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 Default_BylineFormat extends scalaxb.ElemNameParser[Byline] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Byline] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "person")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Person](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "byttl")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Byttl](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "location")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Location](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "virtloc")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Virtloc](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Byline(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Byline, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Byline, __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 Default_ByttlFormat extends scalaxb.ElemNameParser[Byttl] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Byttl] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "org")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Org](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Byttl(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Byttl, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: Byttl, __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 Default_DistributorFormat extends scalaxb.ElemNameParser[Distributor] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Distributor] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "org")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Org](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Distributor(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Distributor, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Distributor, __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 Default_DatelineFormat extends scalaxb.ElemNameParser[Dateline] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Dateline] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "location")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Location](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "story.date")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[StoryDate](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Dateline(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Dateline, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Dateline, __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 Default_StoryDateFormat extends scalaxb.ElemNameParser[StoryDate] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[StoryDate] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
StoryDate(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@norm").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@norm" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: StoryDate, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@norm", _) => __obj.norm foreach { x => attr = scala.xml.Attribute(null, "norm", 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: StoryDate, __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 Default_AbstractFormat extends scalaxb.ElemNameParser[Abstract] with _BlockContentGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Abstract] = | |
phrase(safeRep((parseBlockContentGroup(node, scalaxb.ElemName(node) :: stack, true))) ^^ | |
{ case p1 => | |
Abstract(p1, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Abstract, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Abstract, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.abstractoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }) | |
} | |
trait Default_CopyriteFormat extends scalaxb.ElemNameParser[Copyrite] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Copyrite] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "copyrite.year")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[CopyriteYear](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "copyrite.holder")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[CopyriteHolder](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Copyrite(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Copyrite, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: Copyrite, __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 Default_CopyriteYearFormat extends scalaxb.ElemNameParser[CopyriteYear] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[CopyriteYear] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
CopyriteYear(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: CopyriteYear, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: CopyriteYear, __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 Default_CopyriteHolderFormat extends scalaxb.ElemNameParser[CopyriteHolder] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[CopyriteHolder] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
CopyriteHolder(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: CopyriteHolder, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: CopyriteHolder, __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 Default_BodyContentFormat extends scalaxb.ElemNameParser[BodyContent] with _BlockContentGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[BodyContent] = | |
phrase(safeRep(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "block")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Block](x, scalaxb.ElemName(node) :: stack)))) ||| | |
(parseBlockContentGroup(node, scalaxb.ElemName(node) :: stack, true))) ^^ | |
{ case p1 => | |
BodyContent(p1, | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: BodyContent, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: BodyContent, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.bodycontentoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }) | |
} | |
trait Default_BlockFormat extends scalaxb.ElemNameParser[Block] with _BlockContentGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Block] = | |
phrase(opt((opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "tobject")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "key-list")) ~ | |
safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "classifier")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "byline")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "dateline")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "copyrite")) ~ | |
safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "abstract"))) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 ~ p5 ~ p6 ~ p7 => BlockSequence1(p1.headOption map { scalaxb.fromXML[Tobject](_, scalaxb.ElemName(node) :: stack) }, | |
p2.headOption map { scalaxb.fromXML[KeyList](_, scalaxb.ElemName(node) :: stack) }, | |
p3 map { scalaxb.fromXML[Classifier](_, scalaxb.ElemName(node) :: stack) }, | |
p4.headOption map { scalaxb.fromXML[Byline](_, scalaxb.ElemName(node) :: stack) }, | |
p5.headOption map { scalaxb.fromXML[Dateline](_, scalaxb.ElemName(node) :: stack) }, | |
p6.headOption map { scalaxb.fromXML[Copyrite](_, scalaxb.ElemName(node) :: stack) }, | |
p7 map { scalaxb.fromXML[Abstract](_, scalaxb.ElemName(node) :: stack) }) }) ~ | |
safeRep((parseBlockContentGroup(node, scalaxb.ElemName(node) :: stack, true))) ~ | |
opt((opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "datasource"))) ^^ | |
{ case p1 => BlockSequence2(p1.headOption map { scalaxb.fromXML[Datasource](_, scalaxb.ElemName(node) :: stack) }) }) ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Block(p1, | |
p2, | |
p3, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Block, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Block, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(__obj.blocksequence1 map { scalaxb.toXML[BlockSequence1](_, None, Some("blocksequence1"), __scope, false) } getOrElse {Nil}, | |
__obj.blockoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }, | |
__obj.blocksequence2 map { scalaxb.toXML[BlockSequence2](_, None, Some("blocksequence2"), __scope, false) } getOrElse {Nil}) | |
} | |
trait Default_BlockSequence2Format extends scalaxb.XMLFormat[BlockSequence2] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, BlockSequence2] = Left("don't call me.") | |
def writes(__obj: BlockSequence2, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
__obj.datasource map { scalaxb.toXML[Datasource](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("datasource"), __scope, false) } getOrElse {Nil} | |
} | |
trait Default_BlockSequence1Format extends scalaxb.XMLFormat[BlockSequence1] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, BlockSequence1] = Left("don't call me.") | |
def writes(__obj: BlockSequence1, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
Seq.concat(__obj.tobject map { scalaxb.toXML[Tobject](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("tobject"), __scope, false) } getOrElse {Nil}, | |
__obj.keyList map { scalaxb.toXML[KeyList](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("key-list"), __scope, false) } getOrElse {Nil}, | |
__obj.classifier flatMap { scalaxb.toXML[Classifier](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("classifier"), __scope, false) }, | |
__obj.byline map { scalaxb.toXML[Byline](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("byline"), __scope, false) } getOrElse {Nil}, | |
__obj.dateline map { scalaxb.toXML[Dateline](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("dateline"), __scope, false) } getOrElse {Nil}, | |
__obj.copyrite map { scalaxb.toXML[Copyrite](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("copyrite"), __scope, false) } getOrElse {Nil}, | |
__obj.abstractValue flatMap { scalaxb.toXML[Abstract](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("abstract"), __scope, false) }) | |
} | |
trait Default_PFormat extends scalaxb.ElemNameParser[P] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[P] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "chron")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Chron](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "classifier")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Classifier](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "copyrite")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Copyrite](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "event")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Event](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "function")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[FunctionType](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "location")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Location](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "money")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Money](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "num")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "object.title")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[ObjectTitle](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "org")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Org](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "person")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Person](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "postaddr")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Postaddr](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "virtloc")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Virtloc](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "a")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[A](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "br")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Br](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "em")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Em](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "lang")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Lang](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "pronounce")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Pronounce](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "q")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Q](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
P(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@lede").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@lede" -> _ }, | |
(node \ "@summary").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@summary" -> _ }, | |
(node \ "@optional-text").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@optional-text" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: P, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@lede", _) => __obj.lede foreach { x => attr = scala.xml.Attribute(null, "lede", x.toString, attr) } | |
case ("@summary", _) => __obj.summary foreach { x => attr = scala.xml.Attribute(null, "summary", x.toString, attr) } | |
case ("@optional-text", _) => __obj.optionalText foreach { x => attr = scala.xml.Attribute(null, "optional-text", 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: P, __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) } | |
} | |
def build_AlignTypeFormat = new Default_AlignTypeFormat {} | |
trait Default_AlignTypeFormat extends scalaxb.XMLFormat[AlignType] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): AlignType = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("left")) => LeftTypeValue | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("center")) => CenterValue | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("right")) => RightTypeValue | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, AlignType] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: AlignType, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
def build_FrameFormat = new Default_FrameFormat {} | |
trait Default_FrameFormat extends scalaxb.XMLFormat[Frame] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): Frame = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("void")) => Void | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("above")) => Above | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("below")) => Below | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("hsides")) => Hsides | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("lhs")) => Lhs | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("rhs")) => Rhs | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("vsides")) => Vsides | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("box")) => Box | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("border")) => Border | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Frame] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: Frame, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
def build_RulesFormat = new Default_RulesFormat {} | |
trait Default_RulesFormat extends scalaxb.XMLFormat[Rules] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): Rules = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("none")) => NoneType | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("basic")) => Basic | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("rows")) => Rows | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("cols")) => Cols | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("all")) => AllType | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Rules] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: Rules, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
trait Default_TableFormat extends scalaxb.ElemNameParser[Table] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Table] = | |
phrase(opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "caption")) ~ | |
opt(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "col")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Col](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "colgroup")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Colgroup](x, scalaxb.ElemName(node) :: stack))))) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "thead")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "tfoot")) ~ | |
safeRep(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "tbody")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Tbody](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "tr")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Tr](x, scalaxb.ElemName(node) :: stack))))) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 ~ p5 => | |
Table(p1.headOption map { scalaxb.fromXML[Caption](_, scalaxb.ElemName(node) :: stack) }, | |
p2, | |
p3.headOption map { scalaxb.fromXML[Thead](_, scalaxb.ElemName(node) :: stack) }, | |
p4.headOption map { scalaxb.fromXML[Tfoot](_, scalaxb.ElemName(node) :: stack) }, | |
p5, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@tabletype").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@tabletype" -> _ }, | |
(node \ "@align").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[AlignType](x, scalaxb.ElemName(node) :: stack)) } map { "@align" -> _ }, | |
(node \ "@width").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@width" -> _ }, | |
(node \ "@cols").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@cols" -> _ }, | |
(node \ "@border").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@border" -> _ }, | |
(node \ "@frame").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Frame](x, scalaxb.ElemName(node) :: stack)) } map { "@frame" -> _ }, | |
(node \ "@rules").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Rules](x, scalaxb.ElemName(node) :: stack)) } map { "@rules" -> _ }, | |
(node \ "@cellspacing").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@cellspacing" -> _ }, | |
(node \ "@cellpadding").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@cellpadding" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Table, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@tabletype", _) => __obj.tabletype foreach { x => attr = scala.xml.Attribute(null, "tabletype", x.toString, attr) } | |
case ("@align", _) => __obj.align foreach { x => attr = scala.xml.Attribute(null, "align", x.toString, attr) } | |
case ("@width", _) => __obj.width foreach { x => attr = scala.xml.Attribute(null, "width", x.toString, attr) } | |
case ("@cols", _) => __obj.cols foreach { x => attr = scala.xml.Attribute(null, "cols", x.toString, attr) } | |
case ("@border", _) => __obj.border foreach { x => attr = scala.xml.Attribute(null, "border", x.toString, attr) } | |
case ("@frame", _) => __obj.frame foreach { x => attr = scala.xml.Attribute(null, "frame", x.toString, attr) } | |
case ("@rules", _) => __obj.rules foreach { x => attr = scala.xml.Attribute(null, "rules", x.toString, attr) } | |
case ("@cellspacing", _) => __obj.cellspacing foreach { x => attr = scala.xml.Attribute(null, "cellspacing", x.toString, attr) } | |
case ("@cellpadding", _) => __obj.cellpadding foreach { x => attr = scala.xml.Attribute(null, "cellpadding", 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: Table, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(__obj.caption map { scalaxb.toXML[Caption](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("caption"), __scope, false) } getOrElse {Nil}, | |
__obj.tableoption map { x => scalaxb.toXML[scalaxb.DataRecord[TableOption]](x, x.namespace, x.key, __scope, false) } getOrElse {Nil}, | |
__obj.thead map { scalaxb.toXML[Thead](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("thead"), __scope, false) } getOrElse {Nil}, | |
__obj.tfoot map { scalaxb.toXML[Tfoot](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("tfoot"), __scope, false) } getOrElse {Nil}, | |
__obj.tableoption2 flatMap { x => scalaxb.toXML[scalaxb.DataRecord[TableOption2]](x, x.namespace, x.key, __scope, false) }) | |
} | |
trait Default_MediaFormat extends scalaxb.ElemNameParser[Media] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Media] = | |
phrase(safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "media-metadata")) ~ | |
safeRep(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "media-reference")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "media-object"))) ^^ | |
{ case p1 ~ p2 => MediaSequence1(scalaxb.fromXML[MediaReference](p1, scalaxb.ElemName(node) :: stack), | |
p2.headOption map { scalaxb.fromXML[MediaObject](_, scalaxb.ElemName(node) :: stack) }) }) ~ | |
safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "media-caption")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "media-producer")) ^^ | |
{ case p1 ~ p2 ~ p3 ~ p4 => | |
Media(p1 map { scalaxb.fromXML[MediaMetadata](_, scalaxb.ElemName(node) :: stack) }, | |
p2, | |
p3 map { scalaxb.fromXML[MediaCaption](_, scalaxb.ElemName(node) :: stack) }, | |
p4.headOption map { scalaxb.fromXML[MediaProducer](_, scalaxb.ElemName(node) :: stack) }, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@media-type").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@media-type" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Media, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@media-type", _) => attr = scala.xml.Attribute(null, "media-type", __obj.mediaType.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: Media, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(__obj.mediaMetadata flatMap { scalaxb.toXML[MediaMetadata](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("media-metadata"), __scope, false) }, | |
__obj.mediasequence1 flatMap { scalaxb.toXML[MediaSequence1](_, None, Some("mediasequence1"), __scope, false) }, | |
__obj.mediaCaption flatMap { scalaxb.toXML[MediaCaption](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("media-caption"), __scope, false) }, | |
__obj.mediaProducer map { scalaxb.toXML[MediaProducer](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("media-producer"), __scope, false) } getOrElse {Nil}) | |
} | |
trait Default_MediaSequence1Format extends scalaxb.XMLFormat[MediaSequence1] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, MediaSequence1] = Left("don't call me.") | |
def writes(__obj: MediaSequence1, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
Seq.concat(scalaxb.toXML[MediaReference](__obj.mediaReference, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("media-reference"), __scope, false), | |
__obj.mediaObject map { scalaxb.toXML[MediaObject](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("media-object"), __scope, false) } getOrElse {Nil}) | |
} | |
def build_UnitsFormat = new Default_UnitsFormat {} | |
trait Default_UnitsFormat extends scalaxb.XMLFormat[Units] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): Units = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("pixels")) => Pixels | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Units] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: Units, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
def build_NoflowFormat = new Default_NoflowFormat {} | |
trait Default_NoflowFormat extends scalaxb.XMLFormat[Noflow] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): Noflow = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("noflow")) => NoflowValue | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Noflow] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: Noflow, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
trait Default_MediaReferenceFormat extends scalaxb.ElemNameParser[MediaReference] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[MediaReference] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
MediaReference(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@source" -> _ }, | |
(node \ "@name").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@name" -> _ }, | |
(node \ "@mime-type").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@mime-type" -> _ }, | |
(node \ "@coding").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@coding" -> _ }, | |
(node \ "@time").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@time" -> _ }, | |
(node \ "@time-unit-of-measure").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@time-unit-of-measure" -> _ }, | |
(node \ "@outcue").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@outcue" -> _ }, | |
(node \ "@source-credit").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@source-credit" -> _ }, | |
(node \ "@copyright").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@copyright" -> _ }, | |
(node \ "@alternate-text").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@alternate-text" -> _ }, | |
(node \ "@height").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@height" -> _ }, | |
(node \ "@width").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@width" -> _ }, | |
(node \ "@units").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Units](x, scalaxb.ElemName(node) :: stack)) } map { "@units" -> _ }, | |
(node \ "@imagemap").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@imagemap" -> _ }, | |
(node \ "@noflow").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Noflow](x, scalaxb.ElemName(node) :: stack)) } map { "@noflow" -> _ }, | |
(node \ "@data-location").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@data-location" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: MediaReference, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@source", _) => __obj.source foreach { x => attr = scala.xml.Attribute(null, "source", x.toString, attr) } | |
case ("@name", _) => __obj.name foreach { x => attr = scala.xml.Attribute(null, "name", x.toString, attr) } | |
case ("@mime-type", _) => __obj.mimeType foreach { x => attr = scala.xml.Attribute(null, "mime-type", x.toString, attr) } | |
case ("@coding", _) => __obj.coding foreach { x => attr = scala.xml.Attribute(null, "coding", x.toString, attr) } | |
case ("@time", _) => __obj.time foreach { x => attr = scala.xml.Attribute(null, "time", x.toString, attr) } | |
case ("@time-unit-of-measure", _) => __obj.timeUnitOfMeasure foreach { x => attr = scala.xml.Attribute(null, "time-unit-of-measure", x.toString, attr) } | |
case ("@outcue", _) => __obj.outcue foreach { x => attr = scala.xml.Attribute(null, "outcue", x.toString, attr) } | |
case ("@source-credit", _) => __obj.sourceCredit foreach { x => attr = scala.xml.Attribute(null, "source-credit", x.toString, attr) } | |
case ("@copyright", _) => __obj.copyright foreach { x => attr = scala.xml.Attribute(null, "copyright", x.toString, attr) } | |
case ("@alternate-text", _) => __obj.alternateText foreach { x => attr = scala.xml.Attribute(null, "alternate-text", x.toString, attr) } | |
case ("@height", _) => __obj.height foreach { x => attr = scala.xml.Attribute(null, "height", x.toString, attr) } | |
case ("@width", _) => __obj.width foreach { x => attr = scala.xml.Attribute(null, "width", x.toString, attr) } | |
case ("@units", _) => __obj.units foreach { x => attr = scala.xml.Attribute(null, "units", x.toString, attr) } | |
case ("@imagemap", _) => __obj.imagemap foreach { x => attr = scala.xml.Attribute(null, "imagemap", x.toString, attr) } | |
case ("@noflow", _) => __obj.noflow foreach { x => attr = scala.xml.Attribute(null, "noflow", x.toString, attr) } | |
case ("@data-location", _) => __obj.dataLocation foreach { x => attr = scala.xml.Attribute(null, "data-location", 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: MediaReference, __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 Default_MediaMetadataFormat extends scalaxb.XMLFormat[MediaMetadata] with scalaxb.CanWriteChildNodes[MediaMetadata] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, MediaMetadata] = seq match { | |
case node: scala.xml.Node => Right(MediaMetadata(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@name").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@name" -> _ }, | |
(node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: MediaMetadata, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@name", _) => attr = scala.xml.Attribute(null, "name", __obj.name.toString, attr) | |
case ("@value", _) => __obj.valueAttribute foreach { x => attr = scala.xml.Attribute(null, "value", 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: MediaMetadata, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_MediaObjectFormat extends scalaxb.ElemNameParser[MediaObject] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[MediaObject] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
MediaObject(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@encoding").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@encoding" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: MediaObject, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@encoding", _) => attr = scala.xml.Attribute(null, "encoding", __obj.encoding.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: MediaObject, __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 Default_MediaCaptionFormat extends scalaxb.ElemNameParser[MediaCaption] with _EnrichedTextGroupFormat with _BlockContentGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[MediaCaption] = | |
phrase(optTextRecord ~ | |
safeRep((parsemixedEnrichedTextGroup(node, scalaxb.ElemName(node) :: stack)) ||| | |
(parsemixedBlockContentGroup(node, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
MediaCaption(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: MediaCaption, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: MediaCaption, __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 Default_MediaProducerFormat extends scalaxb.ElemNameParser[MediaProducer] with _EnrichedTextGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[MediaProducer] = | |
phrase(optTextRecord ~ | |
safeRep((parsemixedEnrichedTextGroup(node, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
MediaProducer(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: MediaProducer, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: MediaProducer, __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 Default_OlFormat extends scalaxb.ElemNameParser[Ol] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Ol] = | |
phrase(safeRep(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "li"))) ^^ | |
{ case p1 => OlSequence1(scalaxb.fromXML[Li](p1, scalaxb.ElemName(node) :: stack)) }) ^^ | |
{ case p1 => | |
Ol(p1, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@seqnum").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@seqnum" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Ol, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@seqnum", _) => __obj.seqnum foreach { x => attr = scala.xml.Attribute(null, "seqnum", 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: Ol, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.olsequence1 flatMap { scalaxb.toXML[OlSequence1](_, None, Some("olsequence1"), __scope, false) }) | |
} | |
trait Default_OlSequence1Format extends scalaxb.XMLFormat[OlSequence1] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, OlSequence1] = Left("don't call me.") | |
def writes(__obj: OlSequence1, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
scalaxb.toXML[Li](__obj.li, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("li"), __scope, false) | |
} | |
trait Default_UlFormat extends scalaxb.ElemNameParser[Ul] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Ul] = | |
phrase(safeRep(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "li"))) ^^ | |
{ case p1 => UlSequence1(scalaxb.fromXML[Li](p1, scalaxb.ElemName(node) :: stack)) }) ^^ | |
{ case p1 => | |
Ul(p1, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Ul, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Ul, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.ulsequence1 flatMap { scalaxb.toXML[UlSequence1](_, None, Some("ulsequence1"), __scope, false) }) | |
} | |
trait Default_UlSequence1Format extends scalaxb.XMLFormat[UlSequence1] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, UlSequence1] = Left("don't call me.") | |
def writes(__obj: UlSequence1, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
scalaxb.toXML[Li](__obj.li, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("li"), __scope, false) | |
} | |
trait Default_LiFormat extends scalaxb.ElemNameParser[Li] with _EnrichedTextGroupFormat with _BlockContentGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Li] = | |
phrase(optTextRecord ~ | |
safeRep((parsemixedEnrichedTextGroup(node, scalaxb.ElemName(node) :: stack)) ||| | |
(parsemixedBlockContentGroup(node, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Li(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Li, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Li, __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 Default_DlFormat extends scalaxb.ElemNameParser[Dl] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Dl] = | |
phrase(safeRep(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "dt")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Dt](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "dd")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Dd](x, scalaxb.ElemName(node) :: stack))))) ^^ | |
{ case p1 => | |
Dl(p1, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Dl, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Dl, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.dloption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[DlOption]](x, x.namespace, x.key, __scope, false) }) | |
} | |
trait Default_DtFormat extends scalaxb.ElemNameParser[Dt] with _EnrichedTextGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Dt] = | |
phrase(optTextRecord ~ | |
safeRep((parsemixedEnrichedTextGroup(node, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Dt(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Dt, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Dt, __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 Default_DdFormat extends scalaxb.ElemNameParser[Dd] with _EnrichedTextGroupFormat with _BlockContentGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Dd] = | |
phrase(safeRep((parseEnrichedTextGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| | |
(parseBlockContentGroup(node, scalaxb.ElemName(node) :: stack, true)) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "block")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Block](x, scalaxb.ElemName(node) :: stack))))) ^^ | |
{ case p1 => | |
Dd(p1, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Dd, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Dd, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.ddoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }) | |
} | |
def build_NowrapFormat = new Default_NowrapFormat {} | |
trait Default_NowrapFormat extends scalaxb.XMLFormat[Nowrap] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): Nowrap = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("nowrap")) => NowrapValue | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Nowrap] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: Nowrap, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
trait Default_BqFormat extends scalaxb.ElemNameParser[Bq] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Bq] = | |
phrase(safeRep((safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "block")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "credit"))) ^^ | |
{ case p1 ~ p2 => BqSequence1(p1 map { scalaxb.fromXML[Block](_, scalaxb.ElemName(node) :: stack) }, | |
p2.headOption map { scalaxb.fromXML[Credit](_, scalaxb.ElemName(node) :: stack) }) }) ^^ | |
{ case p1 => | |
Bq(p1, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@nowrap").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Nowrap](x, scalaxb.ElemName(node) :: stack)) } map { "@nowrap" -> _ }, | |
(node \ "@quote-source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@quote-source" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Bq, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@nowrap", _) => __obj.nowrap foreach { x => attr = scala.xml.Attribute(null, "nowrap", x.toString, attr) } | |
case ("@quote-source", _) => __obj.quoteSource foreach { x => attr = scala.xml.Attribute(null, "quote-source", 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: Bq, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.bqsequence1 flatMap { scalaxb.toXML[BqSequence1](_, None, Some("bqsequence1"), __scope, false) }) | |
} | |
trait Default_BqSequence1Format extends scalaxb.XMLFormat[BqSequence1] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, BqSequence1] = Left("don't call me.") | |
def writes(__obj: BqSequence1, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
Seq.concat(__obj.block flatMap { scalaxb.toXML[Block](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("block"), __scope, false) }, | |
__obj.credit map { scalaxb.toXML[Credit](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("credit"), __scope, false) } getOrElse {Nil}) | |
} | |
trait Default_CreditFormat extends scalaxb.ElemNameParser[Credit] with _EnrichedTextGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Credit] = | |
phrase(optTextRecord ~ | |
safeRep((parsemixedEnrichedTextGroup(node, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Credit(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Credit, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Credit, __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 Default_FnFormat extends scalaxb.ElemNameParser[Fn] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Fn] = | |
phrase(safeRep(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "body.content"))) ^^ | |
{ case p1 => FnSequence1(scalaxb.fromXML[BodyContent](p1, scalaxb.ElemName(node) :: stack)) }) ^^ | |
{ case p1 => | |
Fn(p1, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Fn, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Fn, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.fnsequence1 flatMap { scalaxb.toXML[FnSequence1](_, None, Some("fnsequence1"), __scope, false) }) | |
} | |
trait Default_FnSequence1Format extends scalaxb.XMLFormat[FnSequence1] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, FnSequence1] = Left("don't call me.") | |
def writes(__obj: FnSequence1, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
scalaxb.toXML[BodyContent](__obj.bodyContent, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("body.content"), __scope, false) | |
} | |
trait Default_PreFormat extends scalaxb.ElemNameParser[Pre] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Pre] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
Pre(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Pre, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Pre, __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 Default_HrFormat extends scalaxb.XMLFormat[Hr] with scalaxb.CanWriteChildNodes[Hr] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Hr] = seq match { | |
case node: scala.xml.Node => Right(Hr(scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: Hr, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Hr, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_DatasourceFormat extends scalaxb.ElemNameParser[Datasource] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Datasource] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
Datasource(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Datasource, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: Datasource, __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) } | |
} | |
def build_AlignType2Format = new Default_AlignType2Format {} | |
trait Default_AlignType2Format extends scalaxb.XMLFormat[AlignType2] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): AlignType2 = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("top")) => TopValue | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("bottom")) => BottomValue | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("left")) => LeftTypeValue2 | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("right")) => RightTypeValue2 | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, AlignType2] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: AlignType2, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
trait Default_CaptionFormat extends scalaxb.ElemNameParser[Caption] with _EnrichedTextGroupFormat with _BlockContentGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Caption] = | |
phrase(optTextRecord ~ | |
safeRep((parsemixedEnrichedTextGroup(node, scalaxb.ElemName(node) :: stack)) ||| | |
(parsemixedBlockContentGroup(node, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Caption(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@align").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[AlignType2](x, scalaxb.ElemName(node) :: stack)) } map { "@align" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Caption, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@align", _) => __obj.align foreach { x => attr = scala.xml.Attribute(null, "align", 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: Caption, __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 Default_ColFormat extends scalaxb.XMLFormat[Col] with scalaxb.CanWriteChildNodes[Col] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Col] = seq match { | |
case node: scala.xml.Node => Right(Col(scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@span").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } orElse Some(scalaxb.DataRecord(None, None, scalaxb.fromXML[String](scala.xml.Text("1"), scalaxb.ElemName(node) :: stack))) map { "@span" -> _ }, | |
(node \ "@width").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@width" -> _ }, | |
(node \ "@align").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Align](x, scalaxb.ElemName(node) :: stack)) } map { "@align" -> _ }, | |
(node \ "@char").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@char" -> _ }, | |
(node \ "@charoff").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@charoff" -> _ }, | |
(node \ "@valign").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Valign](x, scalaxb.ElemName(node) :: stack)) } map { "@valign" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: Col, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@span", _) => if (__obj.span.toString != "1") attr = scala.xml.Attribute(null, "span", __obj.span.toString, attr) | |
case ("@width", _) => __obj.width foreach { x => attr = scala.xml.Attribute(null, "width", x.toString, attr) } | |
case ("@align", _) => __obj.align foreach { x => attr = scala.xml.Attribute(null, "align", x.toString, attr) } | |
case ("@char", _) => __obj.char foreach { x => attr = scala.xml.Attribute(null, "char", x.toString, attr) } | |
case ("@charoff", _) => __obj.charoff foreach { x => attr = scala.xml.Attribute(null, "charoff", x.toString, attr) } | |
case ("@valign", _) => __obj.valign foreach { x => attr = scala.xml.Attribute(null, "valign", 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: Col, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_ColgroupFormat extends scalaxb.ElemNameParser[Colgroup] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Colgroup] = | |
phrase(safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "col")) ^^ | |
{ case p1 => | |
Colgroup(p1 map { scalaxb.fromXML[Col](_, scalaxb.ElemName(node) :: stack) }, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@align").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Align](x, scalaxb.ElemName(node) :: stack)) } map { "@align" -> _ }, | |
(node \ "@char").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@char" -> _ }, | |
(node \ "@charoff").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@charoff" -> _ }, | |
(node \ "@valign").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Valign](x, scalaxb.ElemName(node) :: stack)) } map { "@valign" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Colgroup, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@align", _) => __obj.align foreach { x => attr = scala.xml.Attribute(null, "align", x.toString, attr) } | |
case ("@char", _) => __obj.char foreach { x => attr = scala.xml.Attribute(null, "char", x.toString, attr) } | |
case ("@charoff", _) => __obj.charoff foreach { x => attr = scala.xml.Attribute(null, "charoff", x.toString, attr) } | |
case ("@valign", _) => __obj.valign foreach { x => attr = scala.xml.Attribute(null, "valign", 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: Colgroup, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.col flatMap { scalaxb.toXML[Col](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("col"), __scope, false) }) | |
} | |
trait Default_TheadFormat extends scalaxb.ElemNameParser[Thead] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Thead] = | |
phrase(safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "tr")) ^^ | |
{ case p1 => | |
Thead(p1 map { scalaxb.fromXML[Tr](_, scalaxb.ElemName(node) :: stack) }, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@align").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Align](x, scalaxb.ElemName(node) :: stack)) } map { "@align" -> _ }, | |
(node \ "@char").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@char" -> _ }, | |
(node \ "@charoff").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@charoff" -> _ }, | |
(node \ "@valign").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Valign](x, scalaxb.ElemName(node) :: stack)) } map { "@valign" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Thead, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@align", _) => __obj.align foreach { x => attr = scala.xml.Attribute(null, "align", x.toString, attr) } | |
case ("@char", _) => __obj.char foreach { x => attr = scala.xml.Attribute(null, "char", x.toString, attr) } | |
case ("@charoff", _) => __obj.charoff foreach { x => attr = scala.xml.Attribute(null, "charoff", x.toString, attr) } | |
case ("@valign", _) => __obj.valign foreach { x => attr = scala.xml.Attribute(null, "valign", 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: Thead, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.tr flatMap { scalaxb.toXML[Tr](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("tr"), __scope, false) }) | |
} | |
trait Default_TbodyFormat extends scalaxb.ElemNameParser[Tbody] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Tbody] = | |
phrase(safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "tr")) ^^ | |
{ case p1 => | |
Tbody(p1 map { scalaxb.fromXML[Tr](_, scalaxb.ElemName(node) :: stack) }, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@align").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Align](x, scalaxb.ElemName(node) :: stack)) } map { "@align" -> _ }, | |
(node \ "@char").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@char" -> _ }, | |
(node \ "@charoff").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@charoff" -> _ }, | |
(node \ "@valign").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Valign](x, scalaxb.ElemName(node) :: stack)) } map { "@valign" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Tbody, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@align", _) => __obj.align foreach { x => attr = scala.xml.Attribute(null, "align", x.toString, attr) } | |
case ("@char", _) => __obj.char foreach { x => attr = scala.xml.Attribute(null, "char", x.toString, attr) } | |
case ("@charoff", _) => __obj.charoff foreach { x => attr = scala.xml.Attribute(null, "charoff", x.toString, attr) } | |
case ("@valign", _) => __obj.valign foreach { x => attr = scala.xml.Attribute(null, "valign", 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: Tbody, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.tr flatMap { scalaxb.toXML[Tr](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("tr"), __scope, false) }) | |
} | |
trait Default_TfootFormat extends scalaxb.ElemNameParser[Tfoot] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Tfoot] = | |
phrase(safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "tr")) ^^ | |
{ case p1 => | |
Tfoot(p1 map { scalaxb.fromXML[Tr](_, scalaxb.ElemName(node) :: stack) }, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@align").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Align](x, scalaxb.ElemName(node) :: stack)) } map { "@align" -> _ }, | |
(node \ "@char").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@char" -> _ }, | |
(node \ "@charoff").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@charoff" -> _ }, | |
(node \ "@valign").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Valign](x, scalaxb.ElemName(node) :: stack)) } map { "@valign" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Tfoot, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@align", _) => __obj.align foreach { x => attr = scala.xml.Attribute(null, "align", x.toString, attr) } | |
case ("@char", _) => __obj.char foreach { x => attr = scala.xml.Attribute(null, "char", x.toString, attr) } | |
case ("@charoff", _) => __obj.charoff foreach { x => attr = scala.xml.Attribute(null, "charoff", x.toString, attr) } | |
case ("@valign", _) => __obj.valign foreach { x => attr = scala.xml.Attribute(null, "valign", 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: Tfoot, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.tr flatMap { scalaxb.toXML[Tr](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("tr"), __scope, false) }) | |
} | |
trait Default_TrFormat extends scalaxb.ElemNameParser[Tr] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Tr] = | |
phrase(safeRep(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "th")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Th](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "td")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Td](x, scalaxb.ElemName(node) :: stack))))) ^^ | |
{ case p1 => | |
Tr(p1, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@align").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Align](x, scalaxb.ElemName(node) :: stack)) } map { "@align" -> _ }, | |
(node \ "@char").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@char" -> _ }, | |
(node \ "@charoff").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@charoff" -> _ }, | |
(node \ "@valign").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Valign](x, scalaxb.ElemName(node) :: stack)) } map { "@valign" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Tr, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@align", _) => __obj.align foreach { x => attr = scala.xml.Attribute(null, "align", x.toString, attr) } | |
case ("@char", _) => __obj.char foreach { x => attr = scala.xml.Attribute(null, "char", x.toString, attr) } | |
case ("@charoff", _) => __obj.charoff foreach { x => attr = scala.xml.Attribute(null, "charoff", x.toString, attr) } | |
case ("@valign", _) => __obj.valign foreach { x => attr = scala.xml.Attribute(null, "valign", 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: Tr, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.troption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[TrOption]](x, x.namespace, x.key, __scope, false) }) | |
} | |
def build_NowrapTypeFormat = new Default_NowrapTypeFormat {} | |
trait Default_NowrapTypeFormat extends scalaxb.XMLFormat[NowrapType] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): NowrapType = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("nowrap")) => NowrapValue2 | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, NowrapType] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: NowrapType, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
trait Default_ThFormat extends scalaxb.ElemNameParser[Th] with _EnrichedTextGroupFormat with _BlockContentGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Th] = | |
phrase(optTextRecord ~ | |
safeRep((parsemixedEnrichedTextGroup(node, scalaxb.ElemName(node) :: stack)) ||| | |
(parsemixedBlockContentGroup(node, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Th(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@axis").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@axis" -> _ }, | |
(node \ "@axes").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@axes" -> _ }, | |
(node \ "@nowrap").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[NowrapType](x, scalaxb.ElemName(node) :: stack)) } map { "@nowrap" -> _ }, | |
(node \ "@rowspan").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rowspan" -> _ }, | |
(node \ "@colspan").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@colspan" -> _ }, | |
(node \ "@align").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Align](x, scalaxb.ElemName(node) :: stack)) } map { "@align" -> _ }, | |
(node \ "@char").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@char" -> _ }, | |
(node \ "@charoff").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@charoff" -> _ }, | |
(node \ "@valign").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Valign](x, scalaxb.ElemName(node) :: stack)) } map { "@valign" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Th, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@axis", _) => __obj.axis foreach { x => attr = scala.xml.Attribute(null, "axis", x.toString, attr) } | |
case ("@axes", _) => __obj.axes foreach { x => attr = scala.xml.Attribute(null, "axes", x.toString, attr) } | |
case ("@nowrap", _) => __obj.nowrap foreach { x => attr = scala.xml.Attribute(null, "nowrap", x.toString, attr) } | |
case ("@rowspan", _) => __obj.rowspan foreach { x => attr = scala.xml.Attribute(null, "rowspan", x.toString, attr) } | |
case ("@colspan", _) => __obj.colspan foreach { x => attr = scala.xml.Attribute(null, "colspan", x.toString, attr) } | |
case ("@align", _) => __obj.align foreach { x => attr = scala.xml.Attribute(null, "align", x.toString, attr) } | |
case ("@char", _) => __obj.char foreach { x => attr = scala.xml.Attribute(null, "char", x.toString, attr) } | |
case ("@charoff", _) => __obj.charoff foreach { x => attr = scala.xml.Attribute(null, "charoff", x.toString, attr) } | |
case ("@valign", _) => __obj.valign foreach { x => attr = scala.xml.Attribute(null, "valign", 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: Th, __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) } | |
} | |
def build_NowrapType2Format = new Default_NowrapType2Format {} | |
trait Default_NowrapType2Format extends scalaxb.XMLFormat[NowrapType2] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): NowrapType2 = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("nowrap")) => NowrapValue3 | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, NowrapType2] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: NowrapType2, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
trait Default_TdFormat extends scalaxb.ElemNameParser[Td] with _EnrichedTextGroupFormat with _BlockContentGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Td] = | |
phrase(optTextRecord ~ | |
safeRep((parsemixedEnrichedTextGroup(node, scalaxb.ElemName(node) :: stack)) ||| | |
(parsemixedBlockContentGroup(node, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Td(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@axis").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@axis" -> _ }, | |
(node \ "@axes").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@axes" -> _ }, | |
(node \ "@nowrap").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[NowrapType2](x, scalaxb.ElemName(node) :: stack)) } map { "@nowrap" -> _ }, | |
(node \ "@rowspan").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rowspan" -> _ }, | |
(node \ "@colspan").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@colspan" -> _ }, | |
(node \ "@align").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Align](x, scalaxb.ElemName(node) :: stack)) } map { "@align" -> _ }, | |
(node \ "@char").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@char" -> _ }, | |
(node \ "@charoff").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@charoff" -> _ }, | |
(node \ "@valign").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Valign](x, scalaxb.ElemName(node) :: stack)) } map { "@valign" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Td, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@axis", _) => __obj.axis foreach { x => attr = scala.xml.Attribute(null, "axis", x.toString, attr) } | |
case ("@axes", _) => __obj.axes foreach { x => attr = scala.xml.Attribute(null, "axes", x.toString, attr) } | |
case ("@nowrap", _) => __obj.nowrap foreach { x => attr = scala.xml.Attribute(null, "nowrap", x.toString, attr) } | |
case ("@rowspan", _) => __obj.rowspan foreach { x => attr = scala.xml.Attribute(null, "rowspan", x.toString, attr) } | |
case ("@colspan", _) => __obj.colspan foreach { x => attr = scala.xml.Attribute(null, "colspan", x.toString, attr) } | |
case ("@align", _) => __obj.align foreach { x => attr = scala.xml.Attribute(null, "align", x.toString, attr) } | |
case ("@char", _) => __obj.char foreach { x => attr = scala.xml.Attribute(null, "char", x.toString, attr) } | |
case ("@charoff", _) => __obj.charoff foreach { x => attr = scala.xml.Attribute(null, "charoff", x.toString, attr) } | |
case ("@valign", _) => __obj.valign foreach { x => attr = scala.xml.Attribute(null, "valign", 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: Td, __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 Default_ChronFormat extends scalaxb.ElemNameParser[Chron] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Chron] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
Chron(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@norm").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@norm" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Chron, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@norm", _) => __obj.norm foreach { x => attr = scala.xml.Attribute(null, "norm", 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: Chron, __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 Default_EventFormat extends scalaxb.ElemNameParser[Event] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Event] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "alt-code")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[AltCode](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Event(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@start-date").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@start-date" -> _ }, | |
(node \ "@end-date").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@end-date" -> _ }, | |
(node \ "@idsrc").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@idsrc" -> _ }, | |
(node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Event, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@start-date", _) => __obj.startDate foreach { x => attr = scala.xml.Attribute(null, "start-date", x.toString, attr) } | |
case ("@end-date", _) => __obj.endDate foreach { x => attr = scala.xml.Attribute(null, "end-date", x.toString, attr) } | |
case ("@idsrc", _) => __obj.idsrc foreach { x => attr = scala.xml.Attribute(null, "idsrc", x.toString, attr) } | |
case ("@value", _) => __obj.valueAttribute foreach { x => attr = scala.xml.Attribute(null, "value", 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: Event, __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 Default_FunctionTypeFormat extends scalaxb.ElemNameParser[FunctionType] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[FunctionType] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "alt-code")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[AltCode](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
FunctionType(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@idsrc").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@idsrc" -> _ }, | |
(node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: FunctionType, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@idsrc", _) => __obj.idsrc foreach { x => attr = scala.xml.Attribute(null, "idsrc", x.toString, attr) } | |
case ("@value", _) => __obj.valueAttribute foreach { x => attr = scala.xml.Attribute(null, "value", 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: FunctionType, __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 Default_LocationFormat extends scalaxb.ElemNameParser[Location] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Location] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "sublocation")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Sublocation](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "city")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[City](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "state")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[State](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "region")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Region](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "country")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Country](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "alt-code")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[AltCode](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Location(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@location-code").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@location-code" -> _ }, | |
(node \ "@code-source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@code-source" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Location, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@location-code", _) => __obj.locationCode foreach { x => attr = scala.xml.Attribute(null, "location-code", x.toString, attr) } | |
case ("@code-source", _) => __obj.codeSource foreach { x => attr = scala.xml.Attribute(null, "code-source", 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: Location, __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 Default_SublocationFormat extends scalaxb.ElemNameParser[Sublocation] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Sublocation] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "alt-code")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[AltCode](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Sublocation(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@location-code").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@location-code" -> _ }, | |
(node \ "@code-source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@code-source" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Sublocation, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@location-code", _) => __obj.locationCode foreach { x => attr = scala.xml.Attribute(null, "location-code", x.toString, attr) } | |
case ("@code-source", _) => __obj.codeSource foreach { x => attr = scala.xml.Attribute(null, "code-source", 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: Sublocation, __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 Default_CityFormat extends scalaxb.ElemNameParser[City] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[City] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "alt-code")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[AltCode](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
City(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@city-code").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@city-code" -> _ }, | |
(node \ "@code-source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@code-source" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: City, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@city-code", _) => __obj.cityCode foreach { x => attr = scala.xml.Attribute(null, "city-code", x.toString, attr) } | |
case ("@code-source", _) => __obj.codeSource foreach { x => attr = scala.xml.Attribute(null, "code-source", 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: City, __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 Default_StateFormat extends scalaxb.ElemNameParser[State] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[State] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "alt-code")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[AltCode](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
State(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@state-code").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@state-code" -> _ }, | |
(node \ "@code-source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@code-source" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: State, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@state-code", _) => __obj.stateCode foreach { x => attr = scala.xml.Attribute(null, "state-code", x.toString, attr) } | |
case ("@code-source", _) => __obj.codeSource foreach { x => attr = scala.xml.Attribute(null, "code-source", 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: State, __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 Default_RegionFormat extends scalaxb.ElemNameParser[Region] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Region] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "alt-code")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[AltCode](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Region(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@region-code").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@region-code" -> _ }, | |
(node \ "@code-source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@code-source" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Region, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@region-code", _) => __obj.regionCode foreach { x => attr = scala.xml.Attribute(null, "region-code", x.toString, attr) } | |
case ("@code-source", _) => __obj.codeSource foreach { x => attr = scala.xml.Attribute(null, "code-source", 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: Region, __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 Default_CountryFormat extends scalaxb.ElemNameParser[Country] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Country] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "alt-code")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[AltCode](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Country(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@iso-cc").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@iso-cc" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Country, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@iso-cc", _) => __obj.isoCc foreach { x => attr = scala.xml.Attribute(null, "iso-cc", 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: Country, __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 Default_MoneyFormat extends scalaxb.ElemNameParser[Money] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Money] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
Money(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@unit").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@unit" -> _ }, | |
(node \ "@date").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@date" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Money, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@unit", _) => __obj.unit foreach { x => attr = scala.xml.Attribute(null, "unit", x.toString, attr) } | |
case ("@date", _) => __obj.date foreach { x => attr = scala.xml.Attribute(null, "date", 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: Money, __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 Default_NumFormat extends scalaxb.ElemNameParser[Num] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Num] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "frac")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Frac](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "sub")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Sub](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "sup")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Sup](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Num(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@units").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@units" -> _ }, | |
(node \ "@decimal-ch").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@decimal-ch" -> _ }, | |
(node \ "@thousands-ch").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@thousands-ch" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Num, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@units", _) => __obj.units foreach { x => attr = scala.xml.Attribute(null, "units", x.toString, attr) } | |
case ("@decimal-ch", _) => __obj.decimalCh foreach { x => attr = scala.xml.Attribute(null, "decimal-ch", x.toString, attr) } | |
case ("@thousands-ch", _) => __obj.thousandsCh foreach { x => attr = scala.xml.Attribute(null, "thousands-ch", 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: Num, __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 Default_FracFormat extends scalaxb.ElemNameParser[Frac] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Frac] = | |
phrase((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "numer")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "frac-sep")) ~ | |
(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "denom")) ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Frac(scalaxb.fromXML[Numer](p1, scalaxb.ElemName(node) :: stack), | |
p2.headOption map { scalaxb.fromXML[FracSep](_, scalaxb.ElemName(node) :: stack) }, | |
scalaxb.fromXML[Denom](p3, scalaxb.ElemName(node) :: stack), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Frac, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Frac, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(scalaxb.toXML[Numer](__obj.numer, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("numer"), __scope, false), | |
__obj.fracSep map { scalaxb.toXML[FracSep](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("frac-sep"), __scope, false) } getOrElse {Nil}, | |
scalaxb.toXML[Denom](__obj.denom, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("denom"), __scope, false)) | |
} | |
trait Default_NumerFormat extends scalaxb.ElemNameParser[Numer] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Numer] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
Numer(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Numer, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: Numer, __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 Default_FracSepFormat extends scalaxb.ElemNameParser[FracSep] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[FracSep] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
FracSep(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: FracSep, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: FracSep, __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 Default_DenomFormat extends scalaxb.ElemNameParser[Denom] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Denom] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
Denom(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Denom, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: Denom, __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 Default_SubFormat extends scalaxb.ElemNameParser[Sub] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Sub] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
Sub(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Sub, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Sub, __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 Default_SupFormat extends scalaxb.ElemNameParser[Sup] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Sup] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
Sup(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Sup, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Sup, __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 Default_ObjectTitleFormat extends scalaxb.ElemNameParser[ObjectTitle] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[ObjectTitle] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "alt-code")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[AltCode](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
ObjectTitle(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@idsrc").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@idsrc" -> _ }, | |
(node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: ObjectTitle, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@idsrc", _) => __obj.idsrc foreach { x => attr = scala.xml.Attribute(null, "idsrc", x.toString, attr) } | |
case ("@value", _) => __obj.valueAttribute foreach { x => attr = scala.xml.Attribute(null, "value", 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: ObjectTitle, __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 Default_OrgFormat extends scalaxb.ElemNameParser[Org] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Org] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "alt-code")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[AltCode](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Org(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@idsrc").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@idsrc" -> _ }, | |
(node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Org, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@idsrc", _) => __obj.idsrc foreach { x => attr = scala.xml.Attribute(null, "idsrc", x.toString, attr) } | |
case ("@value", _) => __obj.valueAttribute foreach { x => attr = scala.xml.Attribute(null, "value", 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: Org, __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 Default_AltCodeFormat extends scalaxb.XMLFormat[AltCode] with scalaxb.CanWriteChildNodes[AltCode] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, AltCode] = seq match { | |
case node: scala.xml.Node => Right(AltCode(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@idsrc").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@idsrc" -> _ }, | |
(node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: AltCode, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@idsrc", _) => attr = scala.xml.Attribute(null, "idsrc", __obj.idsrc.toString, attr) | |
case ("@value", _) => attr = scala.xml.Attribute(null, "value", __obj.valueAttribute.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: AltCode, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
def build_GenderFormat = new Default_GenderFormat {} | |
trait Default_GenderFormat extends scalaxb.XMLFormat[Gender] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): Gender = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("male")) => Male | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("female")) => Female | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Gender] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: Gender, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
trait Default_PersonFormat extends scalaxb.ElemNameParser[Person] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Person] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "name.given")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[NameGiven](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "name.family")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[NameFamily](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "function")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[FunctionType](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "alt-code")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[AltCode](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Person(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@idsrc").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@idsrc" -> _ }, | |
(node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ }, | |
(node \ "@gender").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Gender](x, scalaxb.ElemName(node) :: stack)) } map { "@gender" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Person, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@idsrc", _) => __obj.idsrc foreach { x => attr = scala.xml.Attribute(null, "idsrc", x.toString, attr) } | |
case ("@value", _) => __obj.valueAttribute foreach { x => attr = scala.xml.Attribute(null, "value", x.toString, attr) } | |
case ("@gender", _) => __obj.gender foreach { x => attr = scala.xml.Attribute(null, "gender", 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: Person, __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 Default_NameGivenFormat extends scalaxb.ElemNameParser[NameGiven] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[NameGiven] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
NameGiven(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: NameGiven, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: NameGiven, __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 Default_NameFamilyFormat extends scalaxb.ElemNameParser[NameFamily] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[NameFamily] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
NameFamily(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: NameFamily, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: NameFamily, __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 Default_PostaddrFormat extends scalaxb.ElemNameParser[Postaddr] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Postaddr] = | |
phrase((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "addressee")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "delivery.point")) ~ | |
safeRep(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "postcode")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Postcode](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "delivery.office")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[DeliveryOffice](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "region")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Region](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "country")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Country](x, scalaxb.ElemName(node) :: stack))))) ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Postaddr(scalaxb.fromXML[Addressee](p1, scalaxb.ElemName(node) :: stack), | |
p2.headOption map { scalaxb.fromXML[DeliveryPoint](_, scalaxb.ElemName(node) :: stack) }, | |
p3, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Postaddr, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Postaddr, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(scalaxb.toXML[Addressee](__obj.addressee, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("addressee"), __scope, false), | |
__obj.deliveryPoint map { scalaxb.toXML[DeliveryPoint](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("delivery.point"), __scope, false) } getOrElse {Nil}, | |
__obj.postaddroption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[PostaddrOption]](x, x.namespace, x.key, __scope, false) }) | |
} | |
trait Default_VirtlocFormat extends scalaxb.ElemNameParser[Virtloc] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Virtloc] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "alt-code")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[AltCode](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Virtloc(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@idsrc").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@idsrc" -> _ }, | |
(node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Virtloc, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@idsrc", _) => __obj.idsrc foreach { x => attr = scala.xml.Attribute(null, "idsrc", x.toString, attr) } | |
case ("@value", _) => __obj.valueAttribute foreach { x => attr = scala.xml.Attribute(null, "value", 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: Virtloc, __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 Default_AFormat extends scalaxb.ElemNameParser[A] with _EnrichedTextGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[A] = | |
phrase(optTextRecord ~ | |
safeRep((parsemixedEnrichedTextGroup(node, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
A(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@href").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@href" -> _ }, | |
(node \ "@name").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@name" -> _ }, | |
(node \ "@rel").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rel" -> _ }, | |
(node \ "@rev").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@rev" -> _ }, | |
(node \ "@title").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@title" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: A, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@href", _) => __obj.href foreach { x => attr = scala.xml.Attribute(null, "href", x.toString, attr) } | |
case ("@name", _) => __obj.name foreach { x => attr = scala.xml.Attribute(null, "name", x.toString, attr) } | |
case ("@rel", _) => __obj.rel foreach { x => attr = scala.xml.Attribute(null, "rel", x.toString, attr) } | |
case ("@rev", _) => __obj.rev foreach { x => attr = scala.xml.Attribute(null, "rev", x.toString, attr) } | |
case ("@title", _) => __obj.title foreach { x => attr = scala.xml.Attribute(null, "title", 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: A, __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 Default_BrFormat extends scalaxb.XMLFormat[Br] with scalaxb.CanWriteChildNodes[Br] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Br] = seq match { | |
case node: scala.xml.Node => Right(Br(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: Br, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: Br, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait Default_EmFormat extends scalaxb.ElemNameParser[Em] with _EnrichedTextGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Em] = | |
phrase(optTextRecord ~ | |
safeRep((parsemixedEnrichedTextGroup(node, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Em(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Em, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Em, __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 Default_LangFormat extends scalaxb.ElemNameParser[Lang] with _EnrichedTextGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Lang] = | |
phrase(optTextRecord ~ | |
safeRep((parsemixedEnrichedTextGroup(node, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Lang(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@idsrc").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@idsrc" -> _ }, | |
(node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Lang, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@idsrc", _) => __obj.idsrc foreach { x => attr = scala.xml.Attribute(null, "idsrc", x.toString, attr) } | |
case ("@value", _) => __obj.valueAttribute foreach { x => attr = scala.xml.Attribute(null, "value", 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: Lang, __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 Default_PronounceFormat extends scalaxb.ElemNameParser[Pronounce] with _EnrichedTextGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Pronounce] = | |
phrase(optTextRecord ~ | |
safeRep((parsemixedEnrichedTextGroup(node, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Pronounce(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@guide").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@guide" -> _ }, | |
(node \ "@phonetic").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@phonetic" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Pronounce, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@guide", _) => __obj.guide foreach { x => attr = scala.xml.Attribute(null, "guide", x.toString, attr) } | |
case ("@phonetic", _) => __obj.phonetic foreach { x => attr = scala.xml.Attribute(null, "phonetic", 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: Pronounce, __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 Default_QFormat extends scalaxb.ElemNameParser[Q] with _EnrichedTextGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Q] = | |
phrase(optTextRecord ~ | |
safeRep((parsemixedEnrichedTextGroup(node, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Q(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@quote-source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@quote-source" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Q, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@quote-source", _) => __obj.quoteSource foreach { x => attr = scala.xml.Attribute(null, "quote-source", 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: Q, __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 Default_AddresseeFormat extends scalaxb.ElemNameParser[Addressee] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Addressee] = | |
phrase((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "person")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "function")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "care.of")) ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Addressee(scalaxb.fromXML[Person](p1, scalaxb.ElemName(node) :: stack), | |
p2.headOption map { scalaxb.fromXML[FunctionType](_, scalaxb.ElemName(node) :: stack) }, | |
p3.headOption map { scalaxb.fromXML[CareOf](_, scalaxb.ElemName(node) :: stack) }, | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Addressee, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: Addressee, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(scalaxb.toXML[Person](__obj.person, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("person"), __scope, false), | |
__obj.function map { scalaxb.toXML[FunctionType](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("function"), __scope, false) } getOrElse {Nil}, | |
__obj.careOf map { scalaxb.toXML[CareOf](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("care.of"), __scope, false) } getOrElse {Nil}) | |
} | |
trait Default_CareOfFormat extends scalaxb.ElemNameParser[CareOf] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[CareOf] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
CareOf(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: CareOf, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: CareOf, __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 Default_DeliveryPointFormat extends scalaxb.ElemNameParser[DeliveryPoint] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[DeliveryPoint] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "br")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Br](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
DeliveryPoint(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@point-code").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@point-code" -> _ }, | |
(node \ "@code-source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@code-source" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: DeliveryPoint, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@point-code", _) => __obj.pointCode foreach { x => attr = scala.xml.Attribute(null, "point-code", x.toString, attr) } | |
case ("@code-source", _) => __obj.codeSource foreach { x => attr = scala.xml.Attribute(null, "code-source", 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: DeliveryPoint, __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 Default_PostcodeFormat extends scalaxb.ElemNameParser[Postcode] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Postcode] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
Postcode(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@code-source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@code-source" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Postcode, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@code-source", _) => __obj.codeSource foreach { x => attr = scala.xml.Attribute(null, "code-source", 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: Postcode, __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 Default_DeliveryOfficeFormat extends scalaxb.ElemNameParser[DeliveryOffice] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[DeliveryOffice] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "br")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Br](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
DeliveryOffice(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@office-code").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@office-code" -> _ }, | |
(node \ "@code-source").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@code-source" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: DeliveryOffice, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@office-code", _) => __obj.officeCode foreach { x => attr = scala.xml.Attribute(null, "office-code", x.toString, attr) } | |
case ("@code-source", _) => __obj.codeSource foreach { x => attr = scala.xml.Attribute(null, "code-source", 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: DeliveryOffice, __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 Default_BodyEndFormat extends scalaxb.ElemNameParser[BodyEnd] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[BodyEnd] = | |
phrase(opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "tagline")) ~ | |
opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "bibliography")) ^^ | |
{ case p1 ~ p2 => | |
BodyEnd(p1.headOption map { scalaxb.fromXML[Tagline](_, scalaxb.ElemName(node) :: stack) }, | |
p2.headOption map { scalaxb.fromXML[Bibliography](_, scalaxb.ElemName(node) :: stack) }, | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: BodyEnd, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: BodyEnd, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(__obj.tagline map { scalaxb.toXML[Tagline](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("tagline"), __scope, false) } getOrElse {Nil}, | |
__obj.bibliography map { scalaxb.toXML[Bibliography](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("bibliography"), __scope, false) } getOrElse {Nil}) | |
} | |
def build_TypeType3Format = new Default_TypeType3Format {} | |
trait Default_TypeType3Format extends scalaxb.XMLFormat[TypeType3] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): TypeType3 = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("std")) => StdValue | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("pa")) => PaValue | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("npa")) => NpaValue | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, TypeType3] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: TypeType3, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
trait Default_TaglineFormat extends scalaxb.ElemNameParser[Tagline] with _EnrichedTextGroupFormat { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Tagline] = | |
phrase(optTextRecord ~ | |
safeRep((parsemixedEnrichedTextGroup(node, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Tagline(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@type").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[TypeType3](x, scalaxb.ElemName(node) :: stack)) } orElse Some(scalaxb.DataRecord(None, None, scalaxb.fromXML[TypeType3](scala.xml.Text("std"), scalaxb.ElemName(node) :: stack))) map { "@type" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Tagline, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@type", _) => if (__obj.typeValue.toString != "std") attr = scala.xml.Attribute(null, "type", __obj.typeValue.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: Tagline, __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 Default_BibliographyFormat extends scalaxb.ElemNameParser[Bibliography] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Bibliography] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
Bibliography(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Bibliography, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: Bibliography, __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 Default_ClassifierFormat extends scalaxb.ElemNameParser[Classifier] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Classifier] = | |
phrase(optTextRecord ~ | |
safeRep(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "alt-code")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[AltCode](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) ~ | |
optTextRecord ^^ | |
{ case p1 ~ p2 ~ p3 => | |
Classifier(Seq.concat(p1.toList, | |
p2.flatten, | |
p3.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@type").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@type" -> _ }, | |
(node \ "@idsrc").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@idsrc" -> _ }, | |
(node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: Classifier, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@type", _) => __obj.typeValue foreach { x => attr = scala.xml.Attribute(null, "type", x.toString, attr) } | |
case ("@idsrc", _) => __obj.idsrc foreach { x => attr = scala.xml.Attribute(null, "idsrc", x.toString, attr) } | |
case ("@value", _) => __obj.valueAttribute foreach { x => attr = scala.xml.Attribute(null, "value", 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: Classifier, __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 Default_NitfTableFormat extends scalaxb.ElemNameParser[NitfTable] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[NitfTable] = | |
phrase((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "nitf-table-metadata")) ~ | |
(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "table")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Table](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "custom-table")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[CustomTable](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "table-reference")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[TableReference](x, scalaxb.ElemName(node) :: stack))))) ^^ | |
{ case p1 ~ p2 => | |
NitfTable(scalaxb.fromXML[NitfTableMetadata](p1, scalaxb.ElemName(node) :: stack), | |
p2, | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: NitfTable, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", 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: NitfTable, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(scalaxb.toXML[NitfTableMetadata](__obj.nitfTableMetadata, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("nitf-table-metadata"), __scope, false), | |
(Some(__obj.nitftableoption) map {x => scalaxb.toXML[scalaxb.DataRecord[NitfTableOption]](x, x.namespace, x.key, __scope, false)}).get) | |
} | |
trait Default_CustomTableFormat extends scalaxb.ElemNameParser[CustomTable] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
override def isMixed: Boolean = true | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[CustomTable] = | |
phrase(optTextRecord ^^ | |
{ case p1 => | |
CustomTable(Seq.concat(p1.toList), | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: CustomTable, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: CustomTable, __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 Default_TableReferenceFormat extends scalaxb.XMLFormat[TableReference] with scalaxb.CanWriteChildNodes[TableReference] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, TableReference] = seq match { | |
case node: scala.xml.Node => Right(TableReference(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@idref").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@idref" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: TableReference, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@idref", _) => attr = scala.xml.Attribute(null, "idref", __obj.idref.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: TableReference, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
def build_StatusFormat = new Default_StatusFormat {} | |
trait Default_StatusFormat extends scalaxb.XMLFormat[Status] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): Status = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("pre")) => PreValue | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("snap-shot")) => SnapShot | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("interim")) => Interim | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("final")) => Final | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("official")) => Official | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, Status] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: Status, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
trait Default_NitfTableMetadataFormat extends scalaxb.ElemNameParser[NitfTableMetadata] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[NitfTableMetadata] = | |
phrase(opt(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "nitf-table-summary")) ~ | |
safeRep(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "nitf-colgroup")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[NitfColgroup](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "nitf-col")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[NitfCol](x, scalaxb.ElemName(node) :: stack))))) ^^ | |
{ case p1 ~ p2 => | |
NitfTableMetadata(p1.headOption map { scalaxb.fromXML[NitfTableSummary](_, scalaxb.ElemName(node) :: stack) }, | |
p2, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ }, | |
(node \ "@subclass").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@subclass" -> _ }, | |
(node \ "@idsrc").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@idsrc" -> _ }, | |
(node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ }, | |
(node \ "@status").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[Status](x, scalaxb.ElemName(node) :: stack)) } map { "@status" -> _ }, | |
(node \ "@column-count").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@column-count" -> _ }, | |
(node \ "@row-count").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@row-count" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: NitfTableMetadata, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
case ("@subclass", _) => __obj.subclass foreach { x => attr = scala.xml.Attribute(null, "subclass", x.toString, attr) } | |
case ("@idsrc", _) => __obj.idsrc foreach { x => attr = scala.xml.Attribute(null, "idsrc", x.toString, attr) } | |
case ("@value", _) => __obj.valueAttribute foreach { x => attr = scala.xml.Attribute(null, "value", x.toString, attr) } | |
case ("@status", _) => __obj.status foreach { x => attr = scala.xml.Attribute(null, "status", x.toString, attr) } | |
case ("@column-count", _) => __obj.columnCount foreach { x => attr = scala.xml.Attribute(null, "column-count", x.toString, attr) } | |
case ("@row-count", _) => __obj.rowCount foreach { x => attr = scala.xml.Attribute(null, "row-count", 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: NitfTableMetadata, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Seq.concat(__obj.nitfTableSummary map { scalaxb.toXML[NitfTableSummary](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("nitf-table-summary"), __scope, false) } getOrElse {Nil}, | |
__obj.nitftablemetadataoption flatMap { x => scalaxb.toXML[scalaxb.DataRecord[NitfTableMetadataOption]](x, x.namespace, x.key, __scope, false) }) | |
} | |
trait Default_NitfTableSummaryFormat extends scalaxb.ElemNameParser[NitfTableSummary] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[NitfTableSummary] = | |
phrase(safeRep(scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "p")) ^^ | |
{ case p1 => | |
NitfTableSummary(p1 map { scalaxb.fromXML[P](_, scalaxb.ElemName(node) :: stack) }, | |
scala.collection.immutable.ListMap(List( | |
(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[String](x, scalaxb.ElemName(node) :: stack)) } map { "@class" -> _ }, | |
(node \ "@style").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@style" -> _ }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@{http://www.w3.org/XML/1998/namespace}lang" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: NitfTableSummary, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@class", _) => __obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
case ("@style", _) => __obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
case ("@{http://www.w3.org/XML/1998/namespace}lang", _) => __obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", 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: NitfTableSummary, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.p flatMap { scalaxb.toXML[P](_, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("p"), __scope, false) }) | |
} | |
trait Default_NitfColgroupFormat extends scalaxb.ElemNameParser[NitfColgroup] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def parser(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[NitfColgroup] = | |
phrase(safeRep(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "nitf-col"))) ^^ | |
{ case p1 => NitfColgroupSequence1(scalaxb.fromXML[NitfCol](p1, scalaxb.ElemName(node) :: stack)) }) ^^ | |
{ case p1 => | |
NitfColgroup(p1, | |
scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@idsrc").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@idsrc" -> _ }, | |
(node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ }, | |
(node \ "@occurrences").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@occurrences" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*)) }) | |
override def writesAttribute(__obj: NitfColgroup, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@idsrc", _) => __obj.idsrc foreach { x => attr = scala.xml.Attribute(null, "idsrc", x.toString, attr) } | |
case ("@value", _) => __obj.valueAttribute foreach { x => attr = scala.xml.Attribute(null, "value", x.toString, attr) } | |
case ("@occurrences", _) => __obj.occurrences foreach { x => attr = scala.xml.Attribute(null, "occurrences", 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: NitfColgroup, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
(__obj.nitfcolgroupsequence1 flatMap { scalaxb.toXML[NitfColgroupSequence1](_, None, Some("nitfcolgroupsequence1"), __scope, false) }) | |
} | |
trait Default_NitfColgroupSequence1Format extends scalaxb.XMLFormat[NitfColgroupSequence1] { | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, NitfColgroupSequence1] = Left("don't call me.") | |
def writes(__obj: NitfColgroupSequence1, __namespace: Option[String], __elementLabel: Option[String], | |
__scope: scala.xml.NamespaceBinding, __typeAttribute: Boolean): scala.xml.NodeSeq = | |
scalaxb.toXML[NitfCol](__obj.nitfCol, Some("http://iptc.org/std/NITF/2006-10-18/"), Some("nitf-col"), __scope, false) | |
} | |
def build_DataTypeFormat = new Default_DataTypeFormat {} | |
trait Default_DataTypeFormat extends scalaxb.XMLFormat[DataType] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def fromString(value: String, scope: scala.xml.NamespaceBinding): DataType = scalaxb.fromXML[String](scala.xml.Text(value)) match { | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("text")) => Text | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("number")) => Number | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("graphic")) => Graphic | |
case x: String if x == scalaxb.fromXML[String](scala.xml.Text("other")) => OtherValue3 | |
} | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, DataType] = seq match { | |
case elem: scala.xml.Elem => Right(fromString(elem.text, elem.scope)) | |
case _ => Right(fromString(seq.text, scala.xml.TopScope)) | |
} | |
def writes(__obj: DataType, __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 { sys.error("missing element label.") }, | |
scala.xml.Null, __scope, true, scala.xml.Text(__obj.toString)) | |
} | |
trait Default_NitfColFormat extends scalaxb.XMLFormat[NitfCol] with scalaxb.CanWriteChildNodes[NitfCol] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
import scalaxb.ElemName._ | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, NitfCol] = seq match { | |
case node: scala.xml.Node => Right(NitfCol(scala.collection.immutable.ListMap(List( | |
(node \ "@id").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@id" -> _ }, | |
(node \ "@idsrc").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@idsrc" -> _ }, | |
(node \ "@value").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@value" -> _ }, | |
(node \ "@occurrences").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@occurrences" -> _ }, | |
(node \ "@data-type").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[DataType](x, scalaxb.ElemName(node) :: stack)) } map { "@data-type" -> _ }, | |
(node \ "@data-format").headOption map { x => scalaxb.DataRecord(x, node, scalaxb.fromXML[String](x, scalaxb.ElemName(node) :: stack)) } map { "@data-format" -> _ } | |
).flatten[(String, scalaxb.DataRecord[Any])]: _*))) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
override def writesAttribute(__obj: NitfCol, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = scala.xml.Null | |
__obj.attributes.toList map { | |
case ("@id", _) => __obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
case ("@idsrc", _) => __obj.idsrc foreach { x => attr = scala.xml.Attribute(null, "idsrc", x.toString, attr) } | |
case ("@value", _) => __obj.valueAttribute foreach { x => attr = scala.xml.Attribute(null, "value", x.toString, attr) } | |
case ("@occurrences", _) => __obj.occurrences foreach { x => attr = scala.xml.Attribute(null, "occurrences", x.toString, attr) } | |
case ("@data-type", _) => __obj.dataType foreach { x => attr = scala.xml.Attribute(null, "data-type", x.toString, attr) } | |
case ("@data-format", _) => __obj.dataFormat foreach { x => attr = scala.xml.Attribute(null, "data-format", 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: NitfCol, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] = | |
Nil | |
} | |
trait _BlockContentGroupFormat extends scalaxb.AnyElemNameParser { | |
def parseBlockContentGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[scalaxb.DataRecord[BlockContentOption]] = | |
(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "p")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[P](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "hl2")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Hl2](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "table")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Table](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "nitf-table")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[NitfTable](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "media")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Media](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "ol")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ol](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "ul")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ul](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "dl")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Dl](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "bq")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Bq](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "fn")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Fn](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "note")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Note](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "pre")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Pre](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "hr")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Hr](x, scalaxb.ElemName(node) :: stack))))) | |
def parseBlockContentGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName], wrap: Boolean): Parser[scalaxb.DataRecord[BlockContentOption]] = | |
(((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "p")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[P](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "hl2")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Hl2](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "table")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Table](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "nitf-table")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[NitfTable](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "media")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Media](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "ol")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ol](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "ul")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ul](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "dl")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Dl](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "bq")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Bq](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "fn")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Fn](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "note")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Note](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "pre")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Pre](x, scalaxb.ElemName(node) :: stack)))) | | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "hr")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Hr](x, scalaxb.ElemName(node) :: stack))))) | |
def parsemixedBlockContentGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Seq[scalaxb.DataRecord[Any]]] = | |
(((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "p")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[P](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "hl2")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Hl2](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "table")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Table](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "nitf-table")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[NitfTable](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "media")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Media](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "ol")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ol](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "ul")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Ul](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "dl")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Dl](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "bq")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Bq](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "fn")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Fn](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "note")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Note](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "pre")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Pre](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "hr")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Hr](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) | |
} | |
trait _EnrichedTextGroupFormat extends scalaxb.AnyElemNameParser { | |
def parseEnrichedTextGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[scalaxb.DataRecord[Any]] = | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "chron")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Chron](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "classifier")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Classifier](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "copyrite")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Copyrite](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "event")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Event](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "function")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[FunctionType](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "location")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Location](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "money")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Money](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "num")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "object.title")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[ObjectTitle](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "org")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Org](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "person")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Person](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "postaddr")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Postaddr](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "virtloc")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Virtloc](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "a")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[A](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "br")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Br](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "em")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Em](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "lang")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Lang](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "pronounce")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Pronounce](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "q")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Q](x, scalaxb.ElemName(node) :: stack))))) | | |
((any(_.namespace != Some("http://iptc.org/std/NITF/2006-10-18/")) ^^ (scalaxb.fromXML[scalaxb.DataRecord[Any]](_, scalaxb.ElemName(node) :: stack))))) | |
def parseEnrichedTextGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName], wrap: Boolean): Parser[scalaxb.DataRecord[Any]] = | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "chron")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Chron](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "classifier")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Classifier](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "copyrite")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Copyrite](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "event")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Event](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "function")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[FunctionType](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "location")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Location](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "money")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Money](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "num")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "object.title")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[ObjectTitle](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "org")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Org](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "person")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Person](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "postaddr")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Postaddr](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "virtloc")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Virtloc](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "a")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[A](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "br")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Br](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "em")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Em](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "lang")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Lang](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "pronounce")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Pronounce](x, scalaxb.ElemName(node) :: stack)))) ||| | |
((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "q")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Q](x, scalaxb.ElemName(node) :: stack))))) | | |
((any(_.namespace != Some("http://iptc.org/std/NITF/2006-10-18/")) ^^ (scalaxb.fromXML[scalaxb.DataRecord[Any]](_, scalaxb.ElemName(node) :: stack))))) | |
def parsemixedEnrichedTextGroup(node: scala.xml.Node, stack: List[scalaxb.ElemName]): Parser[Seq[scalaxb.DataRecord[Any]]] = | |
((((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "chron")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Chron](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "classifier")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Classifier](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "copyrite")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Copyrite](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "event")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Event](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "function")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[FunctionType](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "location")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Location](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "money")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Money](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "num")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Num](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "object.title")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[ObjectTitle](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "org")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Org](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "person")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Person](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "postaddr")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Postaddr](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "virtloc")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Virtloc](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "a")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[A](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "br")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Br](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "em")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Em](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "lang")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Lang](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "pronounce")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Pronounce](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) }) ||| | |
((((scalaxb.ElemName(Some("http://iptc.org/std/NITF/2006-10-18/"), "q")) ^^ | |
(x => scalaxb.DataRecord(x.namespace, Some(x.name), scalaxb.fromXML[Q](x, scalaxb.ElemName(node) :: stack)))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), | |
p2.toList) })) | | |
(((any(_.namespace != Some("http://iptc.org/std/NITF/2006-10-18/")) ^^ (scalaxb.fromXML[scalaxb.DataRecord[Any]](_, scalaxb.ElemName(node) :: stack))) ~ | |
optTextRecord) ^^ | |
{ case p1 ~ p2 => Seq.concat(Seq(p1), p2.toList) })) | |
} | |
trait Default_CellVAlignFormat extends scalaxb.AttributeGroupFormat[CellVAlign] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, CellVAlign] = seq match { | |
case node: scala.xml.Node => Right(CellVAlign((node \ "@valign").headOption map { scalaxb.fromXML[Valign](_, scalaxb.ElemName(node) :: stack) })) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
def toAttribute(__obj: CellVAlign, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = __attr | |
__obj.valign foreach { x => attr = scala.xml.Attribute(null, "valign", x.toString, attr) } | |
attr | |
} | |
} | |
trait Default_CommonNITFAttributesFormat extends scalaxb.AttributeGroupFormat[CommonNITFAttributes] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, CommonNITFAttributes] = seq match { | |
case node: scala.xml.Node => Right(CommonNITFAttributes((node \ "@id").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) }, | |
(node \ "@class").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) }, | |
(node \ "@style").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) }, | |
(node \ "@{http://www.w3.org/XML/1998/namespace}lang").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) })) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
def toAttribute(__obj: CommonNITFAttributes, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = __attr | |
__obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
__obj.classValue foreach { x => attr = scala.xml.Attribute(null, "class", x.toString, attr) } | |
__obj.style foreach { x => attr = scala.xml.Attribute(null, "style", x.toString, attr) } | |
__obj.xmllang foreach { x => attr = scala.xml.Attribute(__scope.getPrefix("http://www.w3.org/XML/1998/namespace"), "lang", x.toString, attr) } | |
attr | |
} | |
} | |
trait Default_GlobalNITFAttributesFormat extends scalaxb.AttributeGroupFormat[GlobalNITFAttributes] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, GlobalNITFAttributes] = seq match { | |
case node: scala.xml.Node => Right(GlobalNITFAttributes((node \ "@id").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) })) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
def toAttribute(__obj: GlobalNITFAttributes, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = __attr | |
__obj.id foreach { x => attr = scala.xml.Attribute(null, "id", x.toString, attr) } | |
attr | |
} | |
} | |
trait Default_CellAlignFormat extends scalaxb.AttributeGroupFormat[CellAlign] { | |
val targetNamespace: Option[String] = Some("http://iptc.org/std/NITF/2006-10-18/") | |
def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, CellAlign] = seq match { | |
case node: scala.xml.Node => Right(CellAlign((node \ "@align").headOption map { scalaxb.fromXML[Align](_, scalaxb.ElemName(node) :: stack) }, | |
(node \ "@char").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) }, | |
(node \ "@charoff").headOption map { scalaxb.fromXML[String](_, scalaxb.ElemName(node) :: stack) })) | |
case _ => Left("reads failed: seq must be scala.xml.Node") | |
} | |
def toAttribute(__obj: CellAlign, __attr: scala.xml.MetaData, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = { | |
var attr: scala.xml.MetaData = __attr | |
__obj.align foreach { x => attr = scala.xml.Attribute(null, "align", x.toString, attr) } | |
__obj.char foreach { x => attr = scala.xml.Attribute(null, "char", x.toString, attr) } | |
__obj.charoff foreach { x => attr = scala.xml.Attribute(null, "charoff", x.toString, attr) } | |
attr | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment