func NewChannelExt(manager extension.Manager) *Channel { c := Channel{ Title: NewBasicElementExt(manager), Link: NewBasicElementExt(manager), Description: NewUnescapedContentExt(manager), Language: NewBasicElementExt(manager), Copyright: NewBasicElementExt(manager), ManagingEditor: NewBasicElementExt(manager), Webmaster: NewBasicElementExt(manager), PubDate: NewDateExt(manager), LastBuildDate: NewDateExt(manager), Generator: NewBasicElementExt(manager), Docs: NewBasicElementExt(manager), Cloud: NewCloudExt(manager), Ttl: NewBasicElementExt(manager), Image: NewImageExt(manager), Rating: NewBasicElementExt(manager), SkipHours: NewBasicElementExt(manager), SkipDays: NewBasicElementExt(manager), depth: xmlutils.NewDepthWatcher(), } c.init() c.Extension = extension.InitExtension("channel", manager) return &c }
func NewLink() *Link { l := Link{depth: xmlutils.NewDepthWatcher()} l.Href = xmlutils.NewElement("href", "", IsValidIRI) l.Href.SetOccurence(xmlutils.NewOccurence("href", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated))) l.Rel = xmlutils.NewElement("rel", "alternate", xmlutils.Nop) l.Rel.SetOccurence(xmlutils.NewOccurence("rel", xmlutils.UniqueValidator(AttributeDuplicated))) l.Type = xmlutils.NewElement("type", "", IsValidMIME) l.Type.SetOccurence(xmlutils.NewOccurence("type", xmlutils.UniqueValidator(AttributeDuplicated))) l.HrefLang = xmlutils.NewElement("hreflang", "", xmlutils.Nop) l.HrefLang.SetOccurence(xmlutils.NewOccurence("hreflang", xmlutils.UniqueValidator(AttributeDuplicated))) l.Title = xmlutils.NewElement("title", "", xmlutils.Nop) l.Title.SetOccurence(xmlutils.NewOccurence("title", xmlutils.UniqueValidator(AttributeDuplicated))) l.Length = xmlutils.NewElement("length", "", IsValidLength) l.Length.SetOccurence(xmlutils.NewOccurence("length", xmlutils.UniqueValidator(AttributeDuplicated))) l.InitCommonAttributes() return &l }
func NewChannel() *Channel { c := Channel{ Title: NewBasicElement(), Link: NewBasicElement(), Description: NewUnescapedContent(), Language: NewBasicElement(), Copyright: NewBasicElement(), ManagingEditor: NewBasicElement(), Webmaster: NewBasicElement(), PubDate: NewDate(), LastBuildDate: NewDate(), Generator: NewBasicElement(), Docs: NewBasicElement(), Cloud: NewCloud(), Ttl: NewBasicElement(), Image: NewImage(), Rating: NewBasicElement(), SkipHours: NewBasicElement(), SkipDays: NewBasicElement(), depth: xmlutils.NewDepthWatcher(), } c.init() return &c }
func NewDate() *Date { d := Date{depth: xmlutils.NewDepthWatcher()} d.depth.SetMaxDepth(1) d.InitCommonAttributes() return &d }
func NewCategory() *Category { c := Category{depth: xmlutils.NewDepthWatcher()} c.Domain = xmlutils.NewElement("domain", "", xmlutils.Nop) c.Domain.SetOccurence(xmlutils.NewOccurence("domain", xmlutils.UniqueValidator(AttributeDuplicated))) return &c }
func NewGuid() *Guid { g := Guid{depth: xmlutils.NewDepthWatcher()} g.IsPermalink = xmlutils.NewElement("isPermalink", "true", xmlutils.Nop) g.IsPermalink.SetOccurence(xmlutils.NewOccurence("isPermalink", xmlutils.UniqueValidator(AttributeDuplicated))) return &g }
func NewBasicElement(parent xmlutils.Visitor) *BasicElement { b := BasicElement{Parent: parent, depth: xmlutils.NewDepthWatcher()} b.depth.SetMaxDepth(1) b.InitCommonAttributes() return &b }
func NewSource() *Source { s := Source{depth: xmlutils.NewDepthWatcher()} s.Url = xmlutils.NewElement("url", "", xmlutils.Nop) s.Url.SetOccurence(xmlutils.NewOccurence("url", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated))) return &s }
func NewIcon() *Icon { i := Icon{depth: xmlutils.NewDepthWatcher()} i.Iri = xmlutils.NewElement("iri", "", IsValidIRI) i.InitCommonAttributes() i.depth.SetMaxDepth(1) return &i }
func NewId() *Id { i := Id{depth: xmlutils.NewDepthWatcher()} i.Content = xmlutils.NewElement("iri", "", IsAbsoluteIRI) i.InitCommonAttributes() i.depth.SetMaxDepth(1) return &i }
func NewLogo() *Logo { l := Logo{depth: xmlutils.NewDepthWatcher()} l.Iri = xmlutils.NewElement("iri", "", IsValidIRI) l.InitCommonAttributes() l.depth.SetMaxDepth(1) return &l }
func NewPerson() *Person { p := Person{depth: xmlutils.NewDepthWatcher()} p.Name = NewBasicElement(&p) p.Uri = NewBasicElement(&p) p.Email = NewBasicElement(&p) p.init() return &p }
func NewOutOfLineContent() *OutOfLineContent { o := OutOfLineContent{depth: xmlutils.NewDepthWatcher()} o.Type = xmlutils.NewElement("type", "", outOfLineTypeIsValid) o.Type.SetOccurence(xmlutils.NewOccurence("type", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated))) o.Src = xmlutils.NewElement("src", "", IsValidIRI) o.Src.SetOccurence(xmlutils.NewOccurence("src", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated))) o.depth.SetMaxDepth(1) return &o }
func NewPersonExt(manager extension.Manager) *Person { p := Person{depth: xmlutils.NewDepthWatcher()} p.Name = NewBasicElementExt(&p, manager) p.Uri = NewBasicElementExt(&p, manager) p.Email = NewBasicElementExt(&p, manager) p.Extension = extension.InitExtension("person", manager) p.init() return &p }
func NewImage() *Image { i := Image{depth: xmlutils.NewDepthWatcher()} i.Url = NewBasicElement() i.Title = NewBasicElement() i.Link = NewBasicElement() i.Width = NewBasicElement() i.Height = NewBasicElement() i.Description = NewBasicElement() i.init() return &i }
func NewEnclosure() *Enclosure { e := Enclosure{depth: xmlutils.NewDepthWatcher()} e.Url = xmlutils.NewElement("url", "", xmlutils.Nop) e.Url.SetOccurence(xmlutils.NewOccurence("url", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated))) e.Length = xmlutils.NewElement("length", "", xmlutils.Nop) e.Length.SetOccurence(xmlutils.NewOccurence("length", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated))) e.Type = xmlutils.NewElement("type", "", xmlutils.Nop) e.Type.SetOccurence(xmlutils.NewOccurence("type", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated))) return &e }
func NewGenerator() *Generator { g := Generator{depth: xmlutils.NewDepthWatcher()} g.Uri = xmlutils.NewElement("uri", "", IsValidIRI) g.Uri.SetOccurence(xmlutils.NewOccurence("uri", xmlutils.UniqueValidator(AttributeDuplicated))) g.Version = xmlutils.NewElement("version", "", xmlutils.Nop) g.Version.SetOccurence(xmlutils.NewOccurence("version", xmlutils.UniqueValidator(AttributeDuplicated))) g.InitCommonAttributes() g.depth.SetMaxDepth(1) return &g }
func NewImageExt(manager extension.Manager) *Image { i := Image{depth: xmlutils.NewDepthWatcher()} i.Url = NewBasicElementExt(manager) i.Title = NewBasicElementExt(manager) i.Link = NewBasicElementExt(manager) i.Width = NewBasicElementExt(manager) i.Height = NewBasicElementExt(manager) i.Description = NewBasicElementExt(manager) i.init() i.Extension = extension.InitExtension("image", manager) return &i }
func NewCategory() *Category { c := Category{depth: xmlutils.NewDepthWatcher()} c.Term = xmlutils.NewElement("term", "", xmlutils.Nop) c.Term.SetOccurence(xmlutils.NewOccurence("term", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated))) c.Scheme = xmlutils.NewElement("scheme", "", IsValidIRI) c.Scheme.SetOccurence(xmlutils.NewOccurence("scheme", xmlutils.UniqueValidator(AttributeDuplicated))) c.Label = xmlutils.NewElement("label", "", xmlutils.Nop) c.Label.SetOccurence(xmlutils.NewOccurence("label", xmlutils.UniqueValidator(AttributeDuplicated))) c.InitCommonAttributes() return &c }
func newInReplyTo() *InReplyTo { i := InReplyTo{depth: xmlutils.NewDepthWatcher()} i.Ref = xmlutils.NewElement("ref", "", atom.IsAbsoluteIRI) i.Ref.SetOccurence(xmlutils.NewOccurence("ref", xmlutils.ExistsAndUniqueValidator(atom.MissingAttribute, atom.AttributeDuplicated))) i.Href = xmlutils.NewElement("href", "", atom.IsValidIRI) i.Href.SetOccurence(xmlutils.NewOccurence("href", xmlutils.UniqueValidator(atom.AttributeDuplicated))) i.Type = xmlutils.NewElement("type", "", xmlutils.Nop) i.Type.SetOccurence(xmlutils.NewOccurence("type", xmlutils.UniqueValidator(atom.AttributeDuplicated))) i.Source = xmlutils.NewElement("source", "", atom.IsValidIRI) i.Source.SetOccurence(xmlutils.NewOccurence("source", xmlutils.UniqueValidator(atom.AttributeDuplicated))) return &i }
func NewSource() *Source { s := Source{ Generator: NewGenerator(), Icon: NewIcon(), Id: NewId(), Logo: NewLogo(), Rights: NewTextConstruct(), Subtitle: NewTextConstruct(), Title: NewTextConstruct(), Updated: NewDate(), depth: xmlutils.NewDepthWatcher(), } s.init() return &s }
func NewFeed() *Feed { f := Feed{ Generator: NewGenerator(), Icon: NewIcon(), Id: NewId(), Logo: NewLogo(), Rights: NewTextConstruct(), Subtitle: NewTextConstruct(), Title: NewTextConstruct(), Updated: NewDate(), depth: xmlutils.NewDepthWatcher(), } f.init() return &f }
func NewEntry() *Entry { e := Entry{ Content: NewContent(), Id: NewId(), Published: NewDate(), Rights: NewTextConstruct(), Source: NewSource(), Summary: NewTextConstruct(), Title: NewTextConstruct(), Updated: NewDate(), depth: xmlutils.NewDepthWatcher(), } e.init() return &e }
func NewFeedExt(manager extension.Manager) *Feed { f := Feed{ Generator: NewGeneratorExt(manager), Icon: NewIconExt(manager), Id: NewIdExt(manager), Logo: NewLogoExt(manager), Rights: NewTextConstructExt(manager), Subtitle: NewTextConstructExt(manager), Title: NewTextConstructExt(manager), Updated: NewDateExt(manager), depth: xmlutils.NewDepthWatcher(), } f.init() f.Extension = extension.InitExtension("feed", manager) return &f }
func NewEntryExt(manager extension.Manager) *Entry { e := Entry{ Content: NewContentExt(manager), Id: NewIdExt(manager), Published: NewDateExt(manager), Rights: NewTextConstructExt(manager), Source: NewSourceExt(manager), Summary: NewTextConstructExt(manager), Title: NewTextConstructExt(manager), Updated: NewDateExt(manager), depth: xmlutils.NewDepthWatcher(), } e.init() e.Extension = extension.InitExtension("entry", manager) return &e }
func NewSourceExt(manager extension.Manager) *Source { s := Source{ Generator: NewGeneratorExt(manager), Icon: NewIconExt(manager), Id: NewIdExt(manager), Logo: NewLogoExt(manager), Rights: NewTextConstructExt(manager), Subtitle: NewTextConstructExt(manager), Title: NewTextConstructExt(manager), Updated: NewDateExt(manager), depth: xmlutils.NewDepthWatcher(), } s.init() s.Extension = extension.InitExtension("source", manager) return &s }
func NewItem() *Item { i := Item{ Title: NewBasicElement(), Link: NewBasicElement(), Description: NewUnescapedContent(), Author: NewBasicElement(), Comments: NewBasicElement(), Enclosure: NewEnclosure(), Guid: NewGuid(), PubDate: NewDate(), Source: NewSource(), depth: xmlutils.NewDepthWatcher(), } i.init() return &i }
func NewCloud() *Cloud { c := Cloud{depth: xmlutils.NewDepthWatcher()} c.Domain = xmlutils.NewElement("domain", "", xmlutils.Nop) c.Domain.SetOccurence(xmlutils.NewOccurence("domain", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated))) c.Port = xmlutils.NewElement("port", "", xmlutils.Nop) c.Port.SetOccurence(xmlutils.NewOccurence("port", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated))) c.Path = xmlutils.NewElement("path", "", xmlutils.Nop) c.Path.SetOccurence(xmlutils.NewOccurence("path", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated))) c.RegisterProcedure = xmlutils.NewElement("registerProcedure", "", xmlutils.Nop) c.RegisterProcedure.SetOccurence(xmlutils.NewOccurence("registerProcedure", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated))) c.Protocol = xmlutils.NewElement("protocol", "", xmlutils.Nop) c.Protocol.SetOccurence(xmlutils.NewOccurence("protocol", xmlutils.ExistsAndUniqueValidator(MissingAttribute, AttributeDuplicated))) return &c }
func NewItemExt(manager extension.Manager) *Item { i := Item{ Title: NewBasicElementExt(manager), Link: NewBasicElementExt(manager), Description: NewUnescapedContentExt(manager), Author: NewBasicElementExt(manager), Comments: NewBasicElementExt(manager), Enclosure: NewEnclosureExt(manager), Guid: NewGuidExt(manager), PubDate: NewDateExt(manager), Source: NewSourceExt(manager), depth: xmlutils.NewDepthWatcher(), } i.init() i.Extension = extension.InitExtension("item", manager) return &i }
func NewInlineXHTMLContent() *InlineXHTMLContent { i := InlineXHTMLContent{depth: xmlutils.NewDepthWatcher(), completed: false} i.Content = &bytes.Buffer{} i.Encoder = xml.NewEncoder(i.Content) return &i }