ResourceObject.cs 1.86 KB
Newer Older
1
using Coscine.ApiCommons.ReturnObjects;
2
using Newtonsoft.Json.Linq;
3
using System;
4
using System.Collections.Generic;
5
6
7
8

namespace Coscine.Api.Project.ReturnObjects
{
    [Serializable]
9
    public class ResourceObject : IReturnObject
10
11
    {
        public Guid Id { get; set; }
12
        public string PID { get { return Program.Configuration.GetStringAndWait("coscine/global/epic/prefix") + "/" + Id.ToString(); } }
13
        public string DisplayName { get; set; }
14
        public string ResourceName { get; set; }
15
        public string Description { get; set; }
16
17
        public string Keywords { get; set; }
        public string UsageRights { get; set; }
18
        public ResourceTypeObject Type { get; set; }
19
20
21
22
        public IEnumerable<DisciplineObject> Disciplines { get; set; }
        public VisibilityObject Visibility { get; set; }
        public LicenseObject License { get; set; }
        public JObject ResourceTypeOption { get; set; }
23
24
        public string ApplicationProfile { get; set; }
        public JToken FixedValues { get; set; }
25

26
        public ResourceObject(Guid id,  string displayName, string resourceName, string description, string keywords, string usageRights, ResourceTypeObject type, IEnumerable<DisciplineObject> disciplines, VisibilityObject visibility, LicenseObject license, JObject resourceTypeOption, string applicationProfile, JToken fixedValues)
27
28
        {
            Id = id;
29

30
            DisplayName = displayName;
31
            ResourceName = resourceName;
32
            Description = description;
33
34
35
            Keywords = keywords;
            UsageRights = usageRights;
            
36
            Type = type;
37
38
39
40
41
            Disciplines = disciplines;
            Visibility = visibility;
            License = license;

            ResourceTypeOption = resourceTypeOption;
42
43
44

            ApplicationProfile = applicationProfile;
            FixedValues = fixedValues;
45
46
47
        }
    }
}