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-08-31 22:58:25 +00:00
package custom_properties ;import (_b "encoding/xml";_f "fmt";_a "github.com/unidoc/unioffice";_ed "github.com/unidoc/unioffice/schema/soo/ofc/docPropsVTypes";_bb "github.com/unidoc/unioffice/schema/soo/ofc/sharedTypes";_d "strconv";_g "time";);
2020-08-23 14:15:53 +00:00
2020-08-31 22:58:25 +00:00
// Validate validates the CT_Properties and its children
func (_aea *CT_Properties )Validate ()error {return _aea .ValidateWithPath ("\u0043\u0054\u005f\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073");};func (_gfed *Properties )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {start .Attr =append (start .Attr ,_b .Attr {Name :_b .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 ,_b .Attr {Name :_b .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 ,_b .Attr {Name :_b .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 ,_b .Attr {Name :_b .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 _gfed .CT_Properties .MarshalXML (e ,start );};type CT_Properties struct{Property []*CT_Property ;};func (_ad *CT_Properties )UnmarshalXML (d *_b .Decoder ,start _b .StartElement )error {_ae :for {_edf ,_dc :=d .Token ();if _dc !=nil {return _dc ;};switch _eb :=_edf .(type ){case _b .StartElement :switch _eb .Name {case _b .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"}:_aec :=NewCT_Property ();if _da :=d .DecodeElement (_aec ,&_eb );_da !=nil {return _da ;};_ad .Property =append (_ad .Property ,_aec );default:_a .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",_eb .Name );if _bc :=d .Skip ();_bc !=nil {return _bc ;};};case _b .EndElement :break _ae ;case _b .CharData :};};return nil ;};func (_af *CT_Properties )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {e .EncodeToken (start );if _af .Property !=nil {_ff :=_b .StartElement {Name :_b .Name {Local :"\u0070\u0072\u006f\u0070\u0065\u0072\u0074\u0079"}};for _ ,_ec :=range _af .Property {e .EncodeElement (_ec ,_ff );};};e .EncodeToken (_b .EndElement {Name :start .Name });return nil ;};type CT_Property struct{FmtidAttr string ;PidAttr int32 ;NameAttr *string ;LinkTargetAttr *string ;Vector *_ed .Vector ;Array *_ed .Array ;Blob *string ;Oblob *string ;Empty *_ed .Empty ;Null *_ed .Null ;I1 *int8 ;I2 *int16 ;I4 *int32 ;I8 *int64 ;Int *int32 ;Ui1 *uint8
2020-08-23 14:15:53 +00:00
// ValidateWithPath validates the CT_Property and its children, prefixing error messages with path
2020-08-31 22:58:25 +00:00
func (_ge *CT_Property )ValidateWithPath (path string )error {if !_bb .ST_GuidPatternRe .MatchString (_ge .FmtidAttr ){return _f .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 ,_bb .ST_GuidPatternRe ,_ge .FmtidAttr );};if _ge .Vector !=nil {if _ef :=_ge .Vector .ValidateWithPath (path +"\u002fV\u0065\u0063\u0074\u006f\u0072");_ef !=nil {return _ef ;};};if _ge .Array !=nil {if _eba :=_ge .Array .ValidateWithPath (path +"\u002f\u0041\u0072\u0072\u0061\u0079");_eba !=nil {return _eba ;};};if _ge .Empty !=nil {if _fcf :=_ge .Empty .ValidateWithPath (path +"\u002f\u0045\u006d\u0070\u0074\u0079");_fcf !=nil {return _fcf ;};};if _ge .Null !=nil {if _bd :=_ge .Null .ValidateWithPath (path +"\u002f\u004e\u0075l\u006c");_bd !=nil {return _bd ;};};if _ge .Cy !=nil {if !_ed .ST_CyPatternRe .MatchString (*_ge .Cy ){return _f .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 ,_ed .ST_CyPatternRe ,*_ge .Cy );};};if _ge .Error !=nil {if !_ed .ST_ErrorPatternRe .MatchString (*_ge .Error ){return _f .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 ,_ed .ST_ErrorPatternRe ,*_ge .Error );};};if _ge .Vstream !=nil {if _bba :=_ge .Vstream .ValidateWithPath (path +"\u002f\u0056\u0073\u0074\u0072\u0065\u0061\u006d");_bba !=nil {return _bba ;};};if _ge .Clsid !=nil {if !_bb .ST_GuidPatternRe .MatchString (*_ge .Clsid ){return _f .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 ,_bb .ST_GuidPatternRe ,*_ge .Clsid );};};return nil ;};
2020-08-23 14:15:53 +00:00
// ValidateWithPath validates the CT_Properties and its children, prefixing error messages with path
2020-08-31 22:58:25 +00:00
func (_c *CT_Properties )ValidateWithPath (path string )error {for _cd ,_gg :=range _c .Property {if _cb :=_gg .ValidateWithPath (_f .Sprintf ("\u0025s\u002fP\u0072\u006f\u0070\u0065\u0072\u0074\u0079\u005b\u0025\u0064\u005d",path ,_cd ));_cb !=nil {return _cb ;};};return nil ;};
2020-08-23 14:15:53 +00:00
2020-08-31 22:58:25 +00:00
// Validate validates the Properties and its children
func (_bfce *Properties )Validate ()error {return _bfce .ValidateWithPath ("\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073");};
// ValidateWithPath validates the Properties and its children, prefixing error messages with path
func (_cfa *Properties )ValidateWithPath (path string )error {if _dea :=_cfa .CT_Properties .ValidateWithPath (path );_dea !=nil {return _dea ;};return nil ;};
2020-08-23 14:15:53 +00:00
// Validate validates the CT_Property and its children
2020-08-31 22:58:25 +00:00
func (_dga *CT_Property )Validate ()error {return _dga .ValidateWithPath ("C\u0054\u005f\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079");};func NewProperties ()*Properties {_efc :=&Properties {};_efc .CT_Properties =*NewCT_Properties ();return _efc ;};func (_ca *CT_Property )MarshalXML (e *_b .Encoder ,start _b .StartElement )error {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u0066\u006d\u0074i\u0064"},Value :_f .Sprintf ("\u0025\u0076",_ca .FmtidAttr )});start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u0070\u0069\u0064"},Value :_f .Sprintf ("\u0025\u0076",_ca .PidAttr )});if _ca .NameAttr !=nil {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u006e\u0061\u006d\u0065"},Value :_f .Sprintf ("\u0025\u0076",*_ca .NameAttr )});};if _ca .LinkTargetAttr !=nil {start .Attr =append (start .Attr ,_b .Attr {Name :_b .Name {Local :"\u006c\u0069\u006e\u006b\u0054\u0061\u0072\u0067\u0065\u0074"},Value :_f .Sprintf ("\u0025\u0076",*_ca .LinkTargetAttr )});};e .EncodeToken (start );if _ca .Vector !=nil {_fc :=_b .StartElement {Name :_b .Name {Local :"\u0076t\u003a\u0076\u0065\u0063\u0074\u006fr"}};e .EncodeElement (_ca .Vector ,_fc );};if _ca .Array !=nil {_cda :=_b .StartElement {Name :_b .Name {Local :"\u0076\u0074\u003a\u0061\u0072\u0072\u0061\u0079"}};e .EncodeElement (_ca .Array ,_cda );};if _ca .Blob !=nil {_ab :=_b .StartElement {Name :_b .Name {Local :"\u0076t\u003a\u0062\u006c\u006f\u0062"}};_a .AddPreserveSpaceAttr (&_ab ,*_ca .Blob );e .EncodeElement (_ca .Blob ,_ab );};if _ca .Oblob !=nil {_ce :=_b .StartElement {Name :_b .Name {Local :"\u0076\u0074\u003a\u006f\u0062\u006c\u006f\u0062"}};_a .AddPreserveSpaceAttr (&_ce ,*_ca .Oblob );e .EncodeElement (_ca .Oblob ,_ce );};if _ca .Empty !=nil {_gd :=_b .StartElement {Name :_b .Name {Local :"\u0076\u0074\u003a\u0065\u006d\u0070\u0074\u0079"}};e .EncodeElement (_ca .Empty ,_gd );};if _ca .Null !=nil {_ea :=_b .StartElement {Name :_b .Name {Local :"\u0076t\u003a\u006e\u0075\u006c\u006c"}};e .EncodeElement (_ca .Null ,_ea );};if _ca .I1 !=nil {_df :=_b .StartElement {Name :_b .Name {Local :"\u0076\u0074\u003ai\u0031"}};e .EncodeElement (_ca .I1 ,_df );};if _ca .I2 !=nil {_be :=_b .StartElement {Name :_b .Name {Local :"\u0076\u0074\u003ai\u0032"}};e .EncodeElement (_ca .I2 ,_be );};if _ca .I4 !=nil {_bf :=_b .StartElement {Name :_b .Name {Local :"\u0076\u0074\u003ai\u0034"}};e .EncodeElement (_ca .I4 ,_bf );};if _ca .I8 !=nil {_gdc :=_b .StartElement {Name :_b .Name {Local :"\u0076\u0074\u003ai\u0038"}};e .EncodeElement (_ca .I8 ,_gdc );};if _ca .Int !=nil {_gfe :=_b .StartElement {Name :_b .Name {Local :"\u0076\u0074\u003a\u0069\u006e\u0074"}};e .EncodeElement (_ca .Int ,_gfe );};if _ca .Ui1 !=nil {_cg :=_b .StartElement {Name :_b .Name {Local :"\u0076\u0074\u003a\u0075\u0069\u0031"}};e .EncodeElement (_ca .Ui1 ,_cg );};if _ca .Ui2 !=nil {_eg :=_b .StartElement {Name :_b .Name {Local :"\u0076\u0074\u003a\u0075\u0069\u0032"}};e .EncodeElement (_ca .Ui2 ,_eg );};if _ca .Ui4 !=nil {_dg :=_b .StartElement {Name :_b .Name {Local :"\u0076\u0074\u003a\u0075\u0069\u0034"}};e .EncodeElement (_ca .Ui4 ,_dg );};if _ca .Ui8 !=nil {_add :=_b .StartElement {Name :_b .Name {Local :"\u0076\u0074\u003a\u0075\u0069\u0038"}};e .EncodeElement (_ca .Ui8 ,_add );};if _ca .Uint !=nil {_bcc :=_b .StartElement {Name :_b .Name {Local :"\u0076t\u003a\u0075\u0069\u006e\u0074"}};e .EncodeElement (_ca .Uint ,_bcc );};if _ca .R4 !=nil {_ebd :=_b .StartElement {Name :_b .Name {Local :"\u0076\u0074\u003ar\u0034"}};e .EncodeElement (_ca .R4 ,_ebd );};if _ca .R8 !=nil {_dff :=_b .StartElement {Name :_b .Name {Local :"\u0076\u0074\u003ar\u0038"}};e .EncodeElement (_ca .R8 ,_dff );};if _ca .Decimal !=nil {_cge :=_b .StartElement {Name :_b .Name {Local :"\u0076\u0074\u003a\u0064\u0065\u0063\u0069\u006d\u0061\u006c"}};e .EncodeElement (_ca .Decimal ,_cge );};if _ca .Lpstr !=nil {_fce :=_b .StartElement {Name :_b .Name {Local :"\u0076\u0074\u003a\u006c\u0070\u0073\u0074\u0072"}};_a .AddPreserveSpaceAttr (&_fce ,*_ca .Lpstr );e .EncodeElement (_ca .Lpst