2
* Version: MPL 1.1 / GPLv2+ / LGPLv2+
4
* The contents of this file are subject to the Mozilla Public License Version
5
* 1.1 (the "License"); you may not use this file except in compliance with
6
* the License or as specified alternatively below. You may obtain a copy of
7
* the License at http://www.mozilla.org/MPL/
9
* Software distributed under the License is distributed on an "AS IS" basis,
10
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11
* for the specific language governing rights and limitations under the
14
* Major Contributor(s):
15
* Copyright (C) 2013 Cao Cuong Ngo <cao.cuong.ngo@gmail.com>
18
* All Rights Reserved.
20
* For minor contributions see the git repository.
22
* Alternatively, the contents of this file may be used under the terms of
23
* either the GNU General Public License Version 2 or later (the "GPLv2+"), or
24
* the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
25
* in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
26
* instead of those above.
29
#include "gdrive-property.hxx"
30
#include "property-type.hxx"
31
#include "gdrive-utils.hxx"
34
using namespace libcmis;
36
GDriveProperty::GDriveProperty( )
40
GDriveProperty::~GDriveProperty( )
44
GDriveProperty::GDriveProperty( const string& key, Json json ):
47
PropertyTypePtr propertyType( new PropertyType( ) );
48
string convertedKey = GdriveUtils::toCmisKey( key );
49
propertyType->setId( convertedKey );
50
propertyType->setLocalName( convertedKey );
51
propertyType->setLocalNamespace( convertedKey );
52
propertyType->setQueryName( convertedKey );
53
propertyType->setDisplayName( key );
54
propertyType->setTypeFromJsonType( json.getStrType( ) );
55
propertyType->setUpdatable( GdriveUtils::checkUpdatable( key ) );
56
propertyType->setMultiValued( GdriveUtils::checkMultiValued( key ) );
58
setPropertyType( propertyType );
60
vector< string > values = GdriveUtils::parseGdriveProperty( key, json );
64
GDriveProperty::GDriveProperty( const GDriveProperty& copy ) :
65
libcmis::Property( copy )
69
GDriveProperty& GDriveProperty::operator=( const GDriveProperty& copy )
73
libcmis::Property::operator=( copy );