public static LicenseInfo FromMetadata(Dictionary<string, string> properties) { if(!properties.ContainsKey("rights (en)")) throw new ApplicationException("A license property is required in order to make a Custom License from metadata."); var license = new CustomLicense(); license.RightsStatement = properties["rights (en)"]; return license; }
public static LicenseInfo FromMetadata(Dictionary <string, string> properties) { if (!properties.ContainsKey("rights (en)")) { throw new ApplicationException("A license property is required in order to make a Custom License from metadata."); } var license = new CustomLicense(); license.RightsStatement = properties["rights (en)"]; return(license); }
public static LicenseInfo FromXmp(Dictionary <string, string> properties) { if (properties.ContainsKey("license") && properties["license"].Contains("creativecommons")) { return(CreativeCommonsLicense.FromMetadata(properties)); } else if (properties.ContainsKey("rights (en)")) { return(CustomLicense.FromMetadata(properties)); } return(new NullLicense()); }