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/
2021-05-31 16:22:30 +00:00
package custom_properties ;import (_d "encoding/xml";_da "fmt";_ef "github.com/unidoc/unioffice";_b "github.com/unidoc/unioffice/schema/soo/ofc/docPropsVTypes";_bc "github.com/unidoc/unioffice/schema/soo/ofc/sharedTypes";_ff "strconv";_e "time";);
2020-12-17 22:07:08 +00:00
2021-03-16 20:51:18 +00:00
// ValidateWithPath validates the CT_Properties and its children, prefixing error messages with path
2021-05-31 16:22:30 +00:00
func (_ge *CT_Properties )ValidateWithPath (path string )error {for _bf ,_gd :=range _ge .Property {if _bd :=_gd .ValidateWithPath (_da .Sprintf ("\u0025s\u002fP\u0072\u006f\u0070\u0065\u0072\u0074\u0079\u005b\u0025\u0064\u005d",path ,_bf ));_bd !=nil {return _bd ;};};return nil ;};func NewCT_Properties ()*CT_Properties {_g :=&CT_Properties {};return _g };func (_de *CT_Properties )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {e .EncodeToken (start );if _de .Property !=nil {_fa :=_d .StartElement {Name :_d .Name {Local :"\u0070\u0072\u006f\u0070\u0065\u0072\u0074\u0079"}};for _ ,_ee :=range _de .Property {e .EncodeElement (_ee ,_fa );};};e .EncodeToken (_d .EndElement {Name :start .Name });return nil ;};
2021-01-04 16:11:39 +00:00
2021-03-16 20:51:18 +00:00
// Validate validates the CT_Properties and its children
2021-05-31 16:22:30 +00:00
func (_cc *CT_Properties )Validate ()error {return _cc .ValidateWithPath ("\u0043\u0054\u005f\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073");};type Properties struct{CT_Properties };
2021-03-16 20:51:18 +00:00
// Validate validates the CT_Property and its children
2021-05-31 16:22:30 +00:00
func (_bcg *CT_Property )Validate ()error {return _bcg .ValidateWithPath ("C\u0054\u005f\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079");};func NewCT_Property ()*CT_Property {_fd :=&CT_Property {};_fd .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 _fd ;};func (_agg *CT_Property )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_agg .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";for _ ,_ccec :=range start .Attr {if _ccec .Name .Local =="\u0070\u0069\u0064"{_dg ,_dfa :=_ff .ParseInt (_ccec .Value ,10,32);if _dfa !=nil {return _dfa ;};_agg .PidAttr =int32 (_dg );continue ;};if _ccec .Name .Local =="\u006c\u0069\u006e\u006b\u0054\u0061\u0072\u0067\u0065\u0074"{_ea ,_aae :=_ccec .Value ,error (nil );if _aae !=nil {return _aae ;};_agg .LinkTargetAttr =&_ea ;continue ;};if _ccec .Name .Local =="\u006e\u0061\u006d\u0065"{_ecc ,_bfa :=_ccec .Value ,error (nil );if _bfa !=nil {return _bfa ;};_agg .NameAttr =&_ecc ;continue ;};if _ccec .Name .Local =="\u0066\u006d\u0074i\u0064"{_ace ,_ga :=_ccec .Value ,error (nil );if _ga !=nil {return _ga ;};_agg .FmtidAttr =_ace ;continue ;};};_bbg :for {_geb ,_gceg :=d .Token ();if _gceg !=nil {return _gceg ;};switch _cbf :=_geb .(type ){case _d .StartElement :switch _cbf .Name {case _d .Name {Space :"\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",Local :"\u0076\u0065\u0063\u0074\u006f\u0072"},_d .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0070\u0075\u0072l\u002e\u006f\u0063l\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006f\u0078\u006dl\u002f\u006f\u0066\u0066\u0069ce\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0064\u006f\u0063\u0050\u0072\u006f\u0070\u0073\u0056\u0054\u0079\u0070\u0065\u0073",Local :"\u0076\u0065\u0063\u0074\u006f\u0072"}:_agg .Vector =_b .NewVector ();if _acb :=d .DecodeElement (_agg .Vector ,&_cbf );_acb !=nil {return _acb ;};case _d .Name {Space :"\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",Local :"\u0061\u0072\u0072a\u0079"},_d .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0070\u0075\u0072l\u002e\u006f\u0063l\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006f\u0078\u006dl\u002f\u006f\u0066\u0066\u0069ce\u0044\u006f\u0063\u0075\u006d\u0065\u006e\u0074\u002f\u0064\u006f\u0063\u0050\u0072\u006f\u0070\u0073\u0056\u0054\u0079\u0070\u0065\u0073",Local :"\u0061\u0072\u0072a\u0079"}:_agg .Array =_b .NewArray ();if _dbf :=d .DecodeElement (_agg .Array ,&_cbf );_dbf !=nil {return _dbf ;};case _d .Name {Space :"\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",Local :"\u0062\u006c\u006f\u0062"},_d .Name {Space :"\u0068\u0074\u0074\u0070\u003a\u002f/\u0070\u0075\u0072l\u002e\u006f\u0063l\u0063\u002e\u006f\u0072\u0067\u002f\u006f\u006f\u0078\u006dl\u002f\u006f\u0066\u0066\u00
2021-04-23 20:00:00 +00:00
// Validate validates the Properties and its children
2021-05-31 16:22:30 +00:00
func (_acd *Properties )Validate ()error {return _acd .ValidateWithPath ("\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0069\u0065\u0073");};type CT_Property struct{FmtidAttr string ;PidAttr int32 ;NameAttr *string ;LinkTargetAttr *string ;Vector *_b .Vector ;Array *_b .Array ;Blob *string ;Oblob *string ;Empty *_b .Empty ;Null *_b .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 *_e .Time ;Filetime *_e .Time ;Bool *bool ;Cy *string ;Error *string ;Stream *string ;Ostream *string ;Storage *string ;Ostorage *string ;Vstream *_b .Vstream ;Clsid *string ;};type CT_Properties struct{Property []*CT_Property ;};
// ValidateWithPath validates the Properties and its children, prefixing error messages with path
func (_bde *Properties )ValidateWithPath (path string )error {if _ebe :=_bde .CT_Properties .ValidateWithPath (path );_ebe !=nil {return _ebe ;};return nil ;};func (_fcfa *Properties )UnmarshalXML (d *_d .Decoder ,start _d .StartElement )error {_fcfa .CT_Properties =*NewCT_Properties ();_gdd :for {_eec ,_af :=d .Token ();if _af !=nil {return _af ;};switch _afg :=_eec .(type ){case _d .StartElement :switch _afg .Name {case _d .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"}:_eae :=NewCT_Property ();if _bfd :=d .DecodeElement (_eae ,&_afg );_bfd !=nil {return _bfd ;};_fcfa .Property =append (_fcfa .Property ,_eae );default:_ef .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",_afg .Name );if _bgg :=d .Skip ();_bgg !=nil {return _bgg ;};};case _d .EndElement :break _gdd ;case _d .CharData :};};return nil ;};
// ValidateWithPath validates the CT_Property and its children, prefixing error messages with path
func (_dcb *CT_Property )ValidateWithPath (path string )error {if !_bc .ST_GuidPatternRe .MatchString (_dcb .FmtidAttr ){return _da .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 ,_bc .ST_GuidPatternRe ,_dcb .FmtidAttr );};if _dcb .Vector !=nil {if _dbb :=_dcb .Vector .ValidateWithPath (path +"\u002fV\u0065\u0063\u0074\u006f\u0072");_dbb !=nil {return _dbb ;};};if _dcb .Array !=nil {if _dcd :=_dcb .Array .ValidateWithPath (path +"\u002f\u0041\u0072\u0072\u0061\u0079");_dcd !=nil {return _dcd ;};};if _dcb .Empty !=nil {if _cfc :=_dcb .Empty .ValidateWithPath (path +"\u002f\u0045\u006d\u0070\u0074\u0079");_cfc !=nil {return _cfc ;};};if _dcb .Null !=nil {if _fdd :=_dcb .Null .ValidateWithPath (path +"\u002f\u004e\u0075l\u006c");_fdd !=nil {return _fdd ;};};if _dcb .Cy !=nil {if !_b .ST_CyPatternRe .MatchString (*_dcb .Cy ){return _da .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 ,_b .ST_CyPatternRe ,*_dcb .Cy );};};if _dcb .Error !=nil {if !_b .ST_ErrorPatternRe .MatchString (*_dcb .Error ){return _da .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 ,_b .ST_ErrorPatternRe ,*_dcb .Error );};};if _dcb .Vstream !=nil {if _fgb :=_dcb .Vstream .ValidateWithPath (path +"\u002f\u0056\u0073\u0074\u0072\u0065\u0061\u006d");_fgb !=nil {return _fgb ;};};if _dcb .Clsid !=nil {if !_bc .ST_GuidPatternRe .MatchString (*_dcb .Clsid ){return _da .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 ,_bc .ST_GuidPatternRe ,*_dcb .Clsid );};};return nil ;};func (_gdbd *Properties )MarshalXML (e *_d .Encoder ,start _d .StartElement )error {start .Attr =append (start .Attr ,_d .Attr {Name :_d .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 ,_d .Attr {Name :_d .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 ,_d .Attr {Name :_d .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 ,_d .Attr {Name :_d .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 _gdbd .CT_Properties .MarshalXML (e ,start );};func init (){_ef .RegisterConstructo