<commit_before>/*
 * Copyright (c) Contributors, http://opensimulator.org/
 * See CONTRIBUTORS.TXT for a full list of copyright holders.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the OpenSimulator Project nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

using System;
using OpenMetaverse;

namespace OpenSim.Framework
{
    /// <summary>
    /// Inventory Item - contains all the properties associated with an individual inventory piece.
    /// </summary>
    public class InventoryItemBase : InventoryNodeBase, ICloneable
    {
        /// <value>
        /// The inventory type of the item.  This is slightly different from the asset type in some situations.
        /// </value>
        public int InvType 
        { 
            get
            {
                return m_invType;
            }
            
            set
            {
                m_invType = value;
            }
        }
        protected int m_invType;

        /// <value>
        /// The folder this item is contained in
        /// </value>
        public UUID Folder 
        { 
            get
            {
                return m_folder;
            }
            
            set
            {
                m_folder = value;
            }
        }
        protected UUID m_folder;

        /// <value>
        /// The creator of this item
        /// </value>
        public string CreatorId 
        { 
            get
            {
                return m_creatorId; 
            }
            
            set
            {
                m_creatorId = value;
            }
        }
        protected string m_creatorId;

        /// <value>
        /// The UUID for the creator.  This may be different from the canonical CreatorId.  This property is used
        /// for communication with the client over the Second Life protocol, since that protocol can only understand
        /// UUIDs.  As this is a basic framework class, this means that both the string creator id and the uuid
        /// reference have to be settable separately
        ///
        /// Database plugins don't need to set this, it will be set by
        /// upstream code (or set by the get accessor if left unset).
        ///
        /// XXX: An alternative to having a separate uuid property would be to hash the CreatorId appropriately
        /// every time there was communication with a UUID-only client.  This may be much more expensive.
        /// </value>
        public UUID CreatorIdAsUuid 
        {
            get
            {
                if (UUID.Zero == m_creatorIdAsUuid)
                {
                    UUID.TryParse(CreatorId, out m_creatorIdAsUuid);
                }

                return m_creatorIdAsUuid;
            }
            
            set
            {
                m_creatorIdAsUuid = value;
            }
        }
        protected UUID m_creatorIdAsUuid = UUID.Zero;

        protected string m_creatorData;
        public string CreatorData // = <profile url>;<name>
        {
            get { return m_creatorData; }
            set { m_creatorData = value; }
        }

        /// <summary>
        /// Used by the DB layer to retrieve / store the entire user identification.
        /// The identification can either be a simple UUID or a string of the form
        /// uuid[;profile_url[;name]]
        /// </summary><commit_msg>Initialize InventoryItemBase.creatorData properly. Could throw.<commit_after>/*
 * Copyright (c) Contributors, http://opensimulator.org/
 * See CONTRIBUTORS.TXT for a full list of copyright holders.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the OpenSimulator Project nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

using System;
using OpenMetaverse;

namespace OpenSim.Framework
{
    /// <summary>
    /// Inventory Item - contains all the properties associated with an individual inventory piece.
    /// </summary>
    public class InventoryItemBase : InventoryNodeBase, ICloneable
    {
        /// <value>
        /// The inventory type of the item.  This is slightly different from the asset type in some situations.
        /// </value>
        public int InvType 
        { 
            get
            {
                return m_invType;
            }
            
            set
            {
                m_invType = value;
            }
        }
        protected int m_invType;

        /// <value>
        /// The folder this item is contained in
        /// </value>
        public UUID Folder 
        { 
            get
            {
                return m_folder;
            }
            
            set
            {
                m_folder = value;
            }
        }
        protected UUID m_folder;

        /// <value>
        /// The creator of this item
        /// </value>
        public string CreatorId 
        { 
            get
            {
                return m_creatorId; 
            }
            
            set
            {
                m_creatorId = value;
            }
        }
        protected string m_creatorId;

        /// <value>
        /// The UUID for the creator.  This may be different from the canonical CreatorId.  This property is used
        /// for communication with the client over the Second Life protocol, since that protocol can only understand
        /// UUIDs.  As this is a basic framework class, this means that both the string creator id and the uuid
        /// reference have to be settable separately
        ///
        /// Database plugins don't need to set this, it will be set by
        /// upstream code (or set by the get accessor if left unset).
        ///
        /// XXX: An alternative to having a separate uuid property would be to hash the CreatorId appropriately
        /// every time there was communication with a UUID-only client.  This may be much more expensive.
        /// </value>
        public UUID CreatorIdAsUuid 
        {
            get
            {
                if (UUID.Zero == m_creatorIdAsUuid)
                {
                    UUID.TryParse(CreatorId, out m_creatorIdAsUuid);
                }

                return m_creatorIdAsUuid;
            }
            
            set
            {
                m_creatorIdAsUuid = value;
            }
        }
        protected UUID m_creatorIdAsUuid = UUID.Zero;

        protected string m_creatorData = string.Empty;
        public string CreatorData // = <profile url>;<name>
        {
            get { return m_creatorData; }
            set { m_creatorData = value; }
        }

        /// <summary>
        /// Used by the DB layer to retrieve / store the entire user identification.
        /// The identification can either be a simple UUID or a string of the form
        /// uuid[;profile_url[;name]]
        /// </summary>
{'fraction_non_alphanumeric': 0.06391881996024688, 'fraction_numerical': 0.0, 'mean_word_length': 1.7120567375886524, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6255517', 'n_tokens_mistral': 2386, 'n_tokens_neox': 2227, 'n_words': 990}