public GenericDistributionProfileAction(JToken node) : base(node)
 {
     if (node["protocol"] != null)
     {
         this._Protocol = (DistributionProtocol)ParseEnum(typeof(DistributionProtocol), node["protocol"].Value <string>());
     }
     if (node["serverUrl"] != null)
     {
         this._ServerUrl = node["serverUrl"].Value <string>();
     }
     if (node["serverPath"] != null)
     {
         this._ServerPath = node["serverPath"].Value <string>();
     }
     if (node["username"] != null)
     {
         this._Username = node["username"].Value <string>();
     }
     if (node["password"] != null)
     {
         this._Password = node["password"].Value <string>();
     }
     if (node["ftpPassiveMode"] != null)
     {
         this._FtpPassiveMode = ParseBool(node["ftpPassiveMode"].Value <string>());
     }
     if (node["httpFieldName"] != null)
     {
         this._HttpFieldName = node["httpFieldName"].Value <string>();
     }
     if (node["httpFileName"] != null)
     {
         this._HttpFileName = node["httpFileName"].Value <string>();
     }
 }
Пример #2
0
 public bool ShowMaplink()
 {
     if (!string.IsNullOrWhiteSpace(DistributionProtocol) && (DistributionProtocol.Contains("OGC:WMS") /*|| DistributionProtocol.Contains("OGC:WFS") || DistributionProtocol.Contains("OGC:WCS")*/) && (Type == "service" || Type == "servicelayer") && !string.IsNullOrWhiteSpace(DownloadUrl) || DatasetServicesWithShowMapLink.Any())
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #3
0
 public bool DownloadLink()
 {
     if (!string.IsNullOrWhiteSpace(DistributionProtocol) && (DistributionProtocol.Contains("WWW:DOWNLOAD") || DistributionProtocol.Contains("GEONORGE:FILEDOWNLOAD")) && (Type == "dataset" || Type == "series") && !string.IsNullOrWhiteSpace(DownloadUrl))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
        public bool DownloadService()
        {
            if (System.Web.Configuration.WebConfigurationManager.AppSettings["DownloadServiceEnabled"] == "true")
            {
                if (DistributionProtocol != null && DistributionProtocol.Contains("GEONORGE:DOWNLOAD"))
                {
                    return(true);
                }
            }

            return(false);
        }
Пример #5
0
        public GenericDistributionProfileAction(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "protocol":
                    this._Protocol = (DistributionProtocol)ParseEnum(typeof(DistributionProtocol), propertyNode.InnerText);
                    continue;

                case "serverUrl":
                    this._ServerUrl = propertyNode.InnerText;
                    continue;

                case "serverPath":
                    this._ServerPath = propertyNode.InnerText;
                    continue;

                case "username":
                    this._Username = propertyNode.InnerText;
                    continue;

                case "password":
                    this._Password = propertyNode.InnerText;
                    continue;

                case "ftpPassiveMode":
                    this._FtpPassiveMode = ParseBool(propertyNode.InnerText);
                    continue;

                case "httpFieldName":
                    this._HttpFieldName = propertyNode.InnerText;
                    continue;

                case "httpFileName":
                    this._HttpFileName = propertyNode.InnerText;
                    continue;
                }
            }
        }
Пример #6
0
        public FtpDistributionProfile(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "protocol":
                    this._Protocol = (DistributionProtocol)ParseEnum(typeof(DistributionProtocol), propertyNode.InnerText);
                    continue;

                case "host":
                    this._Host = propertyNode.InnerText;
                    continue;

                case "port":
                    this._Port = ParseInt(propertyNode.InnerText);
                    continue;

                case "basePath":
                    this._BasePath = propertyNode.InnerText;
                    continue;

                case "username":
                    this._Username = propertyNode.InnerText;
                    continue;

                case "password":
                    this._Password = propertyNode.InnerText;
                    continue;

                case "passphrase":
                    this._Passphrase = propertyNode.InnerText;
                    continue;

                case "sftpPublicKey":
                    this._SftpPublicKey = propertyNode.InnerText;
                    continue;

                case "sftpPrivateKey":
                    this._SftpPrivateKey = propertyNode.InnerText;
                    continue;

                case "disableMetadata":
                    this._DisableMetadata = ParseBool(propertyNode.InnerText);
                    continue;

                case "metadataXslt":
                    this._MetadataXslt = propertyNode.InnerText;
                    continue;

                case "metadataFilenameXslt":
                    this._MetadataFilenameXslt = propertyNode.InnerText;
                    continue;

                case "flavorAssetFilenameXslt":
                    this._FlavorAssetFilenameXslt = propertyNode.InnerText;
                    continue;

                case "thumbnailAssetFilenameXslt":
                    this._ThumbnailAssetFilenameXslt = propertyNode.InnerText;
                    continue;

                case "assetFilenameXslt":
                    this._AssetFilenameXslt = propertyNode.InnerText;
                    continue;

                case "asperaPublicKey":
                    this._AsperaPublicKey = propertyNode.InnerText;
                    continue;

                case "asperaPrivateKey":
                    this._AsperaPrivateKey = propertyNode.InnerText;
                    continue;

                case "sendMetadataAfterAssets":
                    this._SendMetadataAfterAssets = ParseBool(propertyNode.InnerText);
                    continue;
                }
            }
        }
Пример #7
0
 public GenericDistributionProviderAction(JToken node) : base(node)
 {
     if (node["id"] != null)
     {
         this._Id = ParseInt(node["id"].Value <string>());
     }
     if (node["createdAt"] != null)
     {
         this._CreatedAt = ParseInt(node["createdAt"].Value <string>());
     }
     if (node["updatedAt"] != null)
     {
         this._UpdatedAt = ParseInt(node["updatedAt"].Value <string>());
     }
     if (node["genericDistributionProviderId"] != null)
     {
         this._GenericDistributionProviderId = ParseInt(node["genericDistributionProviderId"].Value <string>());
     }
     if (node["action"] != null)
     {
         this._Action = (DistributionAction)ParseEnum(typeof(DistributionAction), node["action"].Value <string>());
     }
     if (node["status"] != null)
     {
         this._Status = (GenericDistributionProviderStatus)ParseEnum(typeof(GenericDistributionProviderStatus), node["status"].Value <string>());
     }
     if (node["resultsParser"] != null)
     {
         this._ResultsParser = (GenericDistributionProviderParser)ParseEnum(typeof(GenericDistributionProviderParser), node["resultsParser"].Value <string>());
     }
     if (node["protocol"] != null)
     {
         this._Protocol = (DistributionProtocol)ParseEnum(typeof(DistributionProtocol), node["protocol"].Value <string>());
     }
     if (node["serverAddress"] != null)
     {
         this._ServerAddress = node["serverAddress"].Value <string>();
     }
     if (node["remotePath"] != null)
     {
         this._RemotePath = node["remotePath"].Value <string>();
     }
     if (node["remoteUsername"] != null)
     {
         this._RemoteUsername = node["remoteUsername"].Value <string>();
     }
     if (node["remotePassword"] != null)
     {
         this._RemotePassword = node["remotePassword"].Value <string>();
     }
     if (node["editableFields"] != null)
     {
         this._EditableFields = node["editableFields"].Value <string>();
     }
     if (node["mandatoryFields"] != null)
     {
         this._MandatoryFields = node["mandatoryFields"].Value <string>();
     }
     if (node["mrssTransformer"] != null)
     {
         this._MrssTransformer = node["mrssTransformer"].Value <string>();
     }
     if (node["mrssValidator"] != null)
     {
         this._MrssValidator = node["mrssValidator"].Value <string>();
     }
     if (node["resultsTransformer"] != null)
     {
         this._ResultsTransformer = node["resultsTransformer"].Value <string>();
     }
 }
Пример #8
0
        public GenericDistributionProviderAction(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "id":
                    this._Id = ParseInt(propertyNode.InnerText);
                    continue;

                case "createdAt":
                    this._CreatedAt = ParseInt(propertyNode.InnerText);
                    continue;

                case "updatedAt":
                    this._UpdatedAt = ParseInt(propertyNode.InnerText);
                    continue;

                case "genericDistributionProviderId":
                    this._GenericDistributionProviderId = ParseInt(propertyNode.InnerText);
                    continue;

                case "action":
                    this._Action = (DistributionAction)ParseEnum(typeof(DistributionAction), propertyNode.InnerText);
                    continue;

                case "status":
                    this._Status = (GenericDistributionProviderStatus)ParseEnum(typeof(GenericDistributionProviderStatus), propertyNode.InnerText);
                    continue;

                case "resultsParser":
                    this._ResultsParser = (GenericDistributionProviderParser)ParseEnum(typeof(GenericDistributionProviderParser), propertyNode.InnerText);
                    continue;

                case "protocol":
                    this._Protocol = (DistributionProtocol)ParseEnum(typeof(DistributionProtocol), propertyNode.InnerText);
                    continue;

                case "serverAddress":
                    this._ServerAddress = propertyNode.InnerText;
                    continue;

                case "remotePath":
                    this._RemotePath = propertyNode.InnerText;
                    continue;

                case "remoteUsername":
                    this._RemoteUsername = propertyNode.InnerText;
                    continue;

                case "remotePassword":
                    this._RemotePassword = propertyNode.InnerText;
                    continue;

                case "editableFields":
                    this._EditableFields = propertyNode.InnerText;
                    continue;

                case "mandatoryFields":
                    this._MandatoryFields = propertyNode.InnerText;
                    continue;

                case "mrssTransformer":
                    this._MrssTransformer = propertyNode.InnerText;
                    continue;

                case "mrssValidator":
                    this._MrssValidator = propertyNode.InnerText;
                    continue;

                case "resultsTransformer":
                    this._ResultsTransformer = propertyNode.InnerText;
                    continue;
                }
            }
        }
Пример #9
0
 public FtpDistributionProfile(JToken node) : base(node)
 {
     if (node["protocol"] != null)
     {
         this._Protocol = (DistributionProtocol)ParseEnum(typeof(DistributionProtocol), node["protocol"].Value <string>());
     }
     if (node["host"] != null)
     {
         this._Host = node["host"].Value <string>();
     }
     if (node["port"] != null)
     {
         this._Port = ParseInt(node["port"].Value <string>());
     }
     if (node["basePath"] != null)
     {
         this._BasePath = node["basePath"].Value <string>();
     }
     if (node["username"] != null)
     {
         this._Username = node["username"].Value <string>();
     }
     if (node["password"] != null)
     {
         this._Password = node["password"].Value <string>();
     }
     if (node["passphrase"] != null)
     {
         this._Passphrase = node["passphrase"].Value <string>();
     }
     if (node["sftpPublicKey"] != null)
     {
         this._SftpPublicKey = node["sftpPublicKey"].Value <string>();
     }
     if (node["sftpPrivateKey"] != null)
     {
         this._SftpPrivateKey = node["sftpPrivateKey"].Value <string>();
     }
     if (node["disableMetadata"] != null)
     {
         this._DisableMetadata = ParseBool(node["disableMetadata"].Value <string>());
     }
     if (node["metadataXslt"] != null)
     {
         this._MetadataXslt = node["metadataXslt"].Value <string>();
     }
     if (node["metadataFilenameXslt"] != null)
     {
         this._MetadataFilenameXslt = node["metadataFilenameXslt"].Value <string>();
     }
     if (node["flavorAssetFilenameXslt"] != null)
     {
         this._FlavorAssetFilenameXslt = node["flavorAssetFilenameXslt"].Value <string>();
     }
     if (node["thumbnailAssetFilenameXslt"] != null)
     {
         this._ThumbnailAssetFilenameXslt = node["thumbnailAssetFilenameXslt"].Value <string>();
     }
     if (node["assetFilenameXslt"] != null)
     {
         this._AssetFilenameXslt = node["assetFilenameXslt"].Value <string>();
     }
     if (node["asperaPublicKey"] != null)
     {
         this._AsperaPublicKey = node["asperaPublicKey"].Value <string>();
     }
     if (node["asperaPrivateKey"] != null)
     {
         this._AsperaPrivateKey = node["asperaPrivateKey"].Value <string>();
     }
     if (node["sendMetadataAfterAssets"] != null)
     {
         this._SendMetadataAfterAssets = ParseBool(node["sendMetadataAfterAssets"].Value <string>());
     }
 }
        public HuluDistributionProfile(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "sftpHost":
                    this._SftpHost = propertyNode.InnerText;
                    continue;

                case "sftpLogin":
                    this._SftpLogin = propertyNode.InnerText;
                    continue;

                case "sftpPass":
                    this._SftpPass = propertyNode.InnerText;
                    continue;

                case "seriesChannel":
                    this._SeriesChannel = propertyNode.InnerText;
                    continue;

                case "seriesPrimaryCategory":
                    this._SeriesPrimaryCategory = propertyNode.InnerText;
                    continue;

                case "seriesAdditionalCategories":
                    this._SeriesAdditionalCategories = new List <String>();
                    foreach (XmlElement arrayNode in propertyNode.ChildNodes)
                    {
                        this._SeriesAdditionalCategories.Add(ObjectFactory.Create <String>(arrayNode));
                    }
                    continue;

                case "seasonNumber":
                    this._SeasonNumber = propertyNode.InnerText;
                    continue;

                case "seasonSynopsis":
                    this._SeasonSynopsis = propertyNode.InnerText;
                    continue;

                case "seasonTuneInInformation":
                    this._SeasonTuneInInformation = propertyNode.InnerText;
                    continue;

                case "videoMediaType":
                    this._VideoMediaType = propertyNode.InnerText;
                    continue;

                case "disableEpisodeNumberCustomValidation":
                    this._DisableEpisodeNumberCustomValidation = ParseBool(propertyNode.InnerText);
                    continue;

                case "protocol":
                    this._Protocol = (DistributionProtocol)ParseEnum(typeof(DistributionProtocol), propertyNode.InnerText);
                    continue;

                case "asperaHost":
                    this._AsperaHost = propertyNode.InnerText;
                    continue;

                case "asperaLogin":
                    this._AsperaLogin = propertyNode.InnerText;
                    continue;

                case "asperaPass":
                    this._AsperaPass = propertyNode.InnerText;
                    continue;

                case "port":
                    this._Port = ParseInt(propertyNode.InnerText);
                    continue;

                case "passphrase":
                    this._Passphrase = propertyNode.InnerText;
                    continue;

                case "asperaPublicKey":
                    this._AsperaPublicKey = propertyNode.InnerText;
                    continue;

                case "asperaPrivateKey":
                    this._AsperaPrivateKey = propertyNode.InnerText;
                    continue;
                }
            }
        }
 public HuluDistributionProfile(JToken node) : base(node)
 {
     if (node["sftpHost"] != null)
     {
         this._SftpHost = node["sftpHost"].Value <string>();
     }
     if (node["sftpLogin"] != null)
     {
         this._SftpLogin = node["sftpLogin"].Value <string>();
     }
     if (node["sftpPass"] != null)
     {
         this._SftpPass = node["sftpPass"].Value <string>();
     }
     if (node["seriesChannel"] != null)
     {
         this._SeriesChannel = node["seriesChannel"].Value <string>();
     }
     if (node["seriesPrimaryCategory"] != null)
     {
         this._SeriesPrimaryCategory = node["seriesPrimaryCategory"].Value <string>();
     }
     if (node["seriesAdditionalCategories"] != null)
     {
         this._SeriesAdditionalCategories = new List <String>();
         foreach (var arrayNode in node["seriesAdditionalCategories"].Children())
         {
             this._SeriesAdditionalCategories.Add(ObjectFactory.Create <String>(arrayNode));
         }
     }
     if (node["seasonNumber"] != null)
     {
         this._SeasonNumber = node["seasonNumber"].Value <string>();
     }
     if (node["seasonSynopsis"] != null)
     {
         this._SeasonSynopsis = node["seasonSynopsis"].Value <string>();
     }
     if (node["seasonTuneInInformation"] != null)
     {
         this._SeasonTuneInInformation = node["seasonTuneInInformation"].Value <string>();
     }
     if (node["videoMediaType"] != null)
     {
         this._VideoMediaType = node["videoMediaType"].Value <string>();
     }
     if (node["disableEpisodeNumberCustomValidation"] != null)
     {
         this._DisableEpisodeNumberCustomValidation = ParseBool(node["disableEpisodeNumberCustomValidation"].Value <string>());
     }
     if (node["protocol"] != null)
     {
         this._Protocol = (DistributionProtocol)ParseEnum(typeof(DistributionProtocol), node["protocol"].Value <string>());
     }
     if (node["asperaHost"] != null)
     {
         this._AsperaHost = node["asperaHost"].Value <string>();
     }
     if (node["asperaLogin"] != null)
     {
         this._AsperaLogin = node["asperaLogin"].Value <string>();
     }
     if (node["asperaPass"] != null)
     {
         this._AsperaPass = node["asperaPass"].Value <string>();
     }
     if (node["port"] != null)
     {
         this._Port = ParseInt(node["port"].Value <string>());
     }
     if (node["passphrase"] != null)
     {
         this._Passphrase = node["passphrase"].Value <string>();
     }
     if (node["asperaPublicKey"] != null)
     {
         this._AsperaPublicKey = node["asperaPublicKey"].Value <string>();
     }
     if (node["asperaPrivateKey"] != null)
     {
         this._AsperaPrivateKey = node["asperaPrivateKey"].Value <string>();
     }
 }
 public bool ShowWebsiteLink()
 {
     if (!string.IsNullOrWhiteSpace(DistributionProtocol) && !string.IsNullOrWhiteSpace(DownloadUrl) && DistributionProtocol.Contains("WWW:LINK") && Type == "software")
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #13
0
        public string GetInnholdstype()
        {
            string t = HierarchyLevel;

            if (HierarchyLevel == "dataset")
            {
                t = "Datasett";
            }
            else if (HierarchyLevel == "software")
            {
                t = "Programvare";
            }
            else if (HierarchyLevel == "service" && (!string.IsNullOrWhiteSpace(ParentIdentifier)) && DistributionProtocol != null && DistributionProtocol.Contains("WFS"))
            {
                t = "WFS-lag";
            }
            else if (HierarchyLevel == "service" && (!string.IsNullOrWhiteSpace(ParentIdentifier)))
            {
                t = "WMS-lag";
            }
            else if (HierarchyLevel == "service")
            {
                t = "Tjeneste";
            }
            else if (HierarchyLevel == "series")
            {
                t = "Datasettserie";
            }

            return(t);
        }