unioffice/schema/soo/ofc/custom_properties/custom_properties.go

30 lines
49 KiB
Go
Raw Normal View History

2020-08-23 14:15:53 +00:00
//
// Copyright 2020 FoxyUtils ehf. All rights reserved.
//
// This is a commercial product and requires a license to operate.
// A trial license can be obtained at https://unidoc.io
//
// DO NOT EDIT: generated by unitwist Go source code obfuscator.
//
// Use of this source code is governed by the UniDoc End User License Agreement
// terms that can be accessed at https://unidoc.io/eula/
2020-12-17 22:07:08 +00:00
package custom_properties ;import (_c "encoding/xml";_cb "fmt";_b "github.com/unidoc/unioffice";_f "github.com/unidoc/unioffice/schema/soo/ofc/docPropsVTypes";_eb "github.com/unidoc/unioffice/schema/soo/ofc/sharedTypes";_d "strconv";_ed "time";);func NewProperties ()*Properties {_bf :=&Properties {};_bf .CT_Properties =*NewCT_Properties ();return _bf ;};type CT_Property struct{FmtidAttr string ;PidAttr int32 ;NameAttr *string ;LinkTargetAttr *string ;Vector *_f .Vector ;Array *_f .Array ;Blob *string ;Oblob *string ;Empty *_f .Empty ;Null *_f .Null ;I1 *int8 ;I2 *int16 ;I4 *int32 ;I8 *int64 ;Int *int32 ;Ui1 *uint8 ;Ui2 *uint16 ;Ui4 *uint32 ;Ui8 *uint64 ;Uint *uint32 ;R4 *float32 ;R8 *float64 ;Decimal *float64 ;Lpstr *string ;Lpwstr *string ;Bstr *string ;Date *_ed .Time ;Filetime *_ed .Time ;Bool *bool ;Cy *string ;Error *string ;Stream *string ;Ostream *string ;Storage *string ;Ostorage *string ;Vstream *_f .Vstream ;Clsid *string ;};func (_a *CT_Properties )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_dc :for {_cf ,_ge :=d .Token ();if _ge !=nil {return _ge ;};switch _bg :=_cf .(type ){case _c .StartElement :switch _bg .Name {case _c .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063h\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u006f\u0066f\u0069\u0063e\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036/c\u0075\u0073\u0074\u006f\u006d\u002d\u0070\u0072\u006fp\u0065\u0072\u0074\u0069\u0065\u0073",Local :"\u0070\u0072\u006f\u0070\u0065\u0072\u0074\u0079"}:_gg :=NewCT_Property ();if _gd :=d .DecodeElement (_gg ,&_bg );_gd !=nil {return _gd ;};_a .Property =append (_a .Property ,_gg );default:_b .Log ("\u0073\u006b\u0069\u0070\u0070\u0069\u006e\u0067 \u0075\u006e\u0073up\u0070\u006f\u0072\u0074\u0065\u0064 \u0065\u006c\u0065\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0043\u0054\u005f\u0050r\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073 \u0025\u0076",_bg .Name );if _ee :=d .Skip ();_ee !=nil {return _ee ;};};case _c .EndElement :break _dc ;case _c .CharData :};};return nil ;};
2020-08-31 22:58:25 +00:00
// ValidateWithPath validates the Properties and its children, prefixing error messages with path
2020-12-17 22:07:08 +00:00
func (_fdb *Properties )ValidateWithPath (path string )error {if _bgfa :=_fdb .CT_Properties .ValidateWithPath (path );_bgfa !=nil {return _bgfa ;};return nil ;};
2020-11-09 01:00:18 +00:00
// Validate validates the Properties and its children
2020-12-17 22:07:08 +00:00
func (_cgg *Properties )Validate ()error {return _cgg .ValidateWithPath ("\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073");};func (_dae *Properties )UnmarshalXML (d *_c .Decoder ,start _c .StartElement )error {_dae .CT_Properties =*NewCT_Properties ();_aee :for {_dec ,_cfc :=d .Token ();if _cfc !=nil {return _cfc ;};switch _gea :=_dec .(type ){case _c .StartElement :switch _gea .Name {case _c .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063h\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u006f\u0066f\u0069\u0063e\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036/c\u0075\u0073\u0074\u006f\u006d\u002d\u0070\u0072\u006fp\u0065\u0072\u0074\u0069\u0065\u0073",Local :"\u0070\u0072\u006f\u0070\u0065\u0072\u0074\u0079"}:_bec :=NewCT_Property ();if _fea :=d .DecodeElement (_bec ,&_gea );_fea !=nil {return _fea ;};_dae .Property =append (_dae .Property ,_bec );default:_b .Log ("\u0073k\u0069\u0070p\u0069\u006e\u0067 \u0075\u006e\u0073\u0075\u0070\u0070\u006fr\u0074\u0065\u0064\u0020\u0065\u006ce\u006d\u0065\u006e\u0074\u0020\u006f\u006e\u0020\u0050\u0072\u006fp\u0065\u0072\u0074\u0069\u0065\u0073\u0020\u0025\u0076",_gea .Name );if _bee :=d .Skip ();_bee !=nil {return _bee ;};};case _c .EndElement :break _aee ;case _c .CharData :};};return nil ;};func NewCT_Property ()*CT_Property {_cba :=&CT_Property {};_cba .FmtidAttr ="\u007b\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u0030\u002d\u0030\u0030\u0030\u0030\u002d\u0030\u0030\u0030\u0030\u002d\u0030\u0030\u0030\u0030-\u0030\u0030\u0030\u0030\u00300\u0030\u00300\u0030\u0030\u0030\u007d";return _cba ;};func NewCT_Properties ()*CT_Properties {_g :=&CT_Properties {};return _g };
2020-11-09 01:00:18 +00:00
// Validate validates the CT_Properties and its children
2020-12-17 22:07:08 +00:00
func (_bd *CT_Properties )Validate ()error {return _bd .ValidateWithPath ("\u0043\u0054\u005f\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073");};
// ValidateWithPath validates the CT_Property and its children, prefixing error messages with path
func (_cde *CT_Property )ValidateWithPath (path string )error {if !_eb .ST_GuidPatternRe .MatchString (_cde .FmtidAttr ){return _cb .Errorf ("%\u0073\u002f\u006d\u002e\u0046\u006d\u0074\u0069\u0064\u0041\u0074\u0074\u0072\u0020\u006d\u0075\u0073\u0074 \u006d\u0061\u0074\u0063\u0068\u0020\u0027\u0025\u0073\u0027 (\u0068\u0061\u0076e\u0020%\u0076\u0029",path ,_eb .ST_GuidPatternRe ,_cde .FmtidAttr );};if _cde .Vector !=nil {if _fc :=_cde .Vector .ValidateWithPath (path +"\u002fV\u0065\u0063\u0074\u006f\u0072");_fc !=nil {return _fc ;};};if _cde .Array !=nil {if _cdf :=_cde .Array .ValidateWithPath (path +"\u002f\u0041\u0072\u0072\u0061\u0079");_cdf !=nil {return _cdf ;};};if _cde .Empty !=nil {if _fec :=_cde .Empty .ValidateWithPath (path +"\u002f\u0045\u006d\u0070\u0074\u0079");_fec !=nil {return _fec ;};};if _cde .Null !=nil {if _bef :=_cde .Null .ValidateWithPath (path +"\u002f\u004e\u0075l\u006c");_bef !=nil {return _bef ;};};if _cde .Cy !=nil {if !_f .ST_CyPatternRe .MatchString (*_cde .Cy ){return _cb .Errorf ("\u0025\u0073\u002f\u006d\u002e\u0043y\u0020\u006d\u0075\u0073\u0074\u0020\u006d\u0061\u0074\u0063\u0068\u0020\u0027%\u0073\u0027\u0020\u0028\u0068\u0061\u0076e\u0020\u0025\u0076\u0029",path ,_f .ST_CyPatternRe ,*_cde .Cy );};};if _cde .Error !=nil {if !_f .ST_ErrorPatternRe .MatchString (*_cde .Error ){return _cb .Errorf ("\u0025\u0073/m\u002e\u0045\u0072r\u006f\u0072\u0020\u006dust\u0020ma\u0074\u0063\u0068\u0020\u0027\u0025\u0073' \u0028\u0068\u0061\u0076\u0065\u0020\u0025v\u0029",path ,_f .ST_ErrorPatternRe ,*_cde .Error );};};if _cde .Vstream !=nil {if _ecd :=_cde .Vstream .ValidateWithPath (path +"\u002f\u0056\u0073\u0074\u0072\u0065\u0061\u006d");_ecd !=nil {return _ecd ;};};if _cde .Clsid !=nil {if !_eb .ST_GuidPatternRe .MatchString (*_cde .Clsid ){return _cb .Errorf ("\u0025\u0073/m\u002e\u0043\u006cs\u0069\u0064\u0020\u006dust\u0020ma\u0074\u0063\u0068\u0020\u0027\u0025\u0073' \u0028\u0068\u0061\u0076\u0065\u0020\u0025v\u0029",path ,_eb .ST_GuidPatternRe ,*_cde .Clsid );};};return nil ;};type CT_Properties struct{Property []*CT_Property ;};func (_fd *CT_Property )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0066\u006d\u0074i\u0064"},Value :_cb .Sprintf ("\u0025\u0076",_fd .FmtidAttr )});start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0070\u0069\u0064"},Value :_cb .Sprintf ("\u0025\u0076",_fd .PidAttr )});if _fd .NameAttr !=nil {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u006e\u0061\u006d\u0065"},Value :_cb .Sprintf ("\u0025\u0076",*_fd .NameAttr )});};if _fd .LinkTargetAttr !=nil {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u006c\u0069\u006e\u006b\u0054\u0061\u0072\u0067\u0065\u0074"},Value :_cb .Sprintf ("\u0025\u0076",*_fd .LinkTargetAttr )});};e .EncodeToken (start );if _fd .Vector !=nil {_ae :=_c .StartElement {Name :_c .Name {Local :"\u0076t\u003a\u0076\u0065\u0063\u0074\u006fr"}};e .EncodeElement (_fd .Vector ,_ae );};if _fd .Array !=nil {_ff :=_c .StartElement {Name :_c .Name {Local :"\u0076\u0074\u003a\u0061\u0072\u0072\u0061\u0079"}};e .EncodeElement (_fd .Array ,_ff );};if _fd .Blob !=nil {_gf :=_c .StartElement {Name :_c .Name {Local :"\u0076t\u003a\u0062\u006c\u006f\u0062"}};_b .AddPreserveSpaceAttr (&_gf ,*_fd .Blob );e .EncodeElement (_fd .Blob ,_gf );};if _fd .Oblob !=nil {_bgd :=_c .StartElement {Name :_c .Name {Local :"\u0076\u0074\u003a\u006f\u0062\u006c\u006f\u0062"}};_b .AddPreserveSpaceAttr (&_bgd ,*_fd .Oblob );e .EncodeElement (_fd .Oblob ,_bgd );};if _fd .Empty !=nil {_cg :=_c .StartElement {Name :_c .Name {Local :"\u0076\u0074\u003a\u0065\u006d\u0070\u0074\u0079"}};e .EncodeElement (_fd .Empty ,_cg );};if _fd .Null !=nil {_cd :=_c .StartElement {Name :_c .Name {Local :"\u0076t\u003a\u006e\u0075\u006c\u006c"}};e .EncodeElement (_fd .Null ,_cd );};if _fd .I1 !=nil {_ef :=_c .StartElement {Name :_c .Name {Local :"\u0076\u0074\u003ai\u0031"}};e .EncodeElement (_fd .I1 ,_ef );};if _fd .I2 !=nil {_gda :=_c .StartElement {Name
// Validate validates the CT_Property and its children
func (_eda *CT_Property )Validate ()error {return _eda .ValidateWithPath ("C\u0054\u005f\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079");};
// ValidateWithPath validates the CT_Properties and its children, prefixing error messages with path
func (_gge *CT_Properties )ValidateWithPath (path string )error {for _ag ,_bdb :=range _gge .Property {if _fb :=_bdb .ValidateWithPath (_cb .Sprintf ("\u0025s\u002fP\u0072\u006f\u0070\u0065\u0072\u0074\u0079\u005b\u0025\u0064\u005d",path ,_ag ));_fb !=nil {return _fb ;};};return nil ;};func (_ggg *Properties )MarshalXML (e *_c .Encoder ,start _c .StartElement )error {start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0078\u006d\u006cn\u0073"},Value :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063h\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u006f\u0066f\u0069\u0063e\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036/c\u0075\u0073\u0074\u006f\u006d\u002d\u0070\u0072\u006fp\u0065\u0072\u0074\u0069\u0065\u0073"});start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0073"},Value :"\u0068\u0074\u0074\u0070\u003a/\u002f\u0073\u0063\u0068\u0065m\u0061s\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u006f\u0066\u0066\u0069\u0063\u0065\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036\u002f\u0073\u0068\u0061\u0072e\u0064\u0054\u0079\u0070\u0065\u0073"});start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0078\u006d\u006c\u006e\u0073\u003a\u0076\u0074"},Value :"\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063\u0068\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078m\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067\u002f\u006f\u0066\u0066\u0069\u0063\u0065\u0044\u006fc\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036\u002f\u0064\u006f\u0063P\u0072\u006f\u0070s\u0056\u0054\u0079\u0070\u0065\u0073"});start .Attr =append (start .Attr ,_c .Attr {Name :_c .Name {Local :"\u0078m\u006c\u006e\u0073\u003a\u0078\u006dl"},Value :"\u0068\u0074tp\u003a\u002f\u002fw\u0077\u0077\u002e\u00773.o\u0072g/\u0058\u004d\u004c\u002f\u0031\u0039\u00398/\u006e\u0061\u006d\u0065\u0073\u0070\u0061c\u0065"});start .Name .Local ="\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073";return _ggg .CT_Properties .MarshalXML (e ,start );};func init (){_b .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063h\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u006f\u0066f\u0069\u0063e\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036/c\u0075\u0073\u0074\u006f\u006d\u002d\u0070\u0072\u006fp\u0065\u0072\u0074\u0069\u0065\u0073","\u0043\u0054\u005f\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073",NewCT_Properties );_b .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063h\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u006f\u0066f\u0069\u0063e\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036/c\u0075\u0073\u0074\u006f\u006d\u002d\u0070\u0072\u006fp\u0065\u0072\u0074\u0069\u0065\u0073","C\u0054\u005f\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079",NewCT_Property );_b .RegisterConstructor ("\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0073\u0063h\u0065\u006d\u0061\u0073\u002e\u006f\u0070\u0065\u006e\u0078\u006d\u006c\u0066\u006f\u0072\u006d\u0061\u0074\u0073\u002e\u006f\u0072\u0067/\u006f\u0066f\u0069\u0063e\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0032\u0030\u0030\u0036/c\u0075\u0073\u0074\u006f\u006d\u002d\u0070\u0072\u006fp\u0065\u0072\u0074\u0069\u0065\u0073","\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073",NewProperties );};