public static void PrepareByOptionAttribute(ResourceApi resource, HttpActionDescriptor actionDescriptor) { var parameters = actionDescriptor.GetParameters(); foreach (var p in parameters) { var attributes = p.GetCustomAttributes<SwaggerOptionsAttribute>(); if (attributes.Count > 0) { var att = attributes[0] as SwaggerOptionsAttribute; if (!String.IsNullOrWhiteSpace(att.Name)) { resource.path = resource.path.Replace( String.Format(CultureInfo.InvariantCulture, "{{{0}}}", p.ParameterName), String.Format(CultureInfo.InvariantCulture, "{{{0}}}", att.Name)); } } } }
public RemoveIntersightResourceReservation() { ApiInstance = new ResourceApi(Config); MethodName = "DeleteResourceReservationWithHttpInfo"; }
public virtual string GetURI(ResourceApi resourceAPI) { throw new NotImplementedException(); }
public virtual List <string> ToSearchGraphTriples(ResourceApi pResourceApi) { throw new NotImplementedException(); }
public virtual KeyValuePair <Guid, string> ToAcidData(ResourceApi resourceAPI) { throw new NotImplementedException(); }
public virtual List <string> ToOntologyGnossTriples(ResourceApi pResourceApi) { throw new NotImplementedException(); }
public override string GetURI(ResourceApi resourceAPI) { return($"{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}"); }
public override List <string> ToSearchGraphTriples(ResourceApi resourceAPI) { List <string> list = new List <string>(); list.Add($"<http://gnoss/{ResourceID}> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> \"movie\" . "); list.Add($"<http://gnoss/{ResourceID}> <http://gnoss/type> \"http://schema.org/Movie\" . "); list.Add($"<http://gnoss/{ResourceID}> <http://gnoss/hasfechapublicacion> 20201203112307 . "); list.Add($"<http://gnoss/{ResourceID}> <http://gnoss/hastipodoc> \"5\" . "); list.Add($"<http://gnoss/{ResourceID}> <http://gnoss/hasfechamodificacion> 20201203112307 . "); list.Add($"<http://gnoss/{ResourceID}> <http://gnoss/hasnumeroVisitas> 0 . "); list.Add($"<http://gnoss/{ResourceID}> <http://gnoss/hasprivacidadCom> \"publico\" . "); list.Add($"<http://gnoss/{ResourceID}> <http://xmlns.com/foaf/0.1/firstName> \"{this.Schema_name.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); list.Add($"<http://gnoss/{ResourceID}> <http://gnoss/hasnombrecompleto> \"{this.Schema_name.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); string search = $"\"{this.Schema_name.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}"; if (!string.IsNullOrEmpty(this.Schema_description)) { search += $"{this.Schema_description.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}"; list.Add($"<http://gnoss/{ResourceID}> <http://gnoss/search> {search}\" . "); } foreach (var item in this.Schema_rating) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/rating> <{resourceAPI.GraphsUrl}items/rating_{ResourceID}_{item.ArticleID}> . "); list.Add($"<{resourceAPI.GraphsUrl}items/rating_{ResourceID}_{item.ArticleID}> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Rating> . "); list.Add($"<{resourceAPI.GraphsUrl}items/rating_{ResourceID}_{item.ArticleID}> <http://www.w3.org/2000/01/rdf-schema#label> \"http://schema.org/Rating\" . "); list.Add($"<{resourceAPI.GraphsUrl}{ResourceID}> <http://gnoss/hasEntidad> <{resourceAPI.GraphsUrl}items/rating_{ResourceID}_{item.ArticleID}> . "); if (item.Schema_ratingSource != null) { list.Add($"<{resourceAPI.GraphsUrl}items/rating_{ResourceID}_{item.ArticleID}> <http://schema.org/ratingSource> \"{item.Schema_ratingSource.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } if (item.Schema_ratingValue != null) { list.Add($"<{resourceAPI.GraphsUrl}items/rating_{ResourceID}_{item.ArticleID}> <http://schema.org/ratingValue> {item.Schema_ratingValue.ToString()} . "); } } if (this.Schema_author != null) { foreach (var item in this.Schema_author) { list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/author> <{item}> . "); } } if (this.Schema_director != null) { foreach (var item in this.Schema_director) { list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/director> <{item}> . "); } } if (this.Schema_actor != null) { foreach (var item in this.Schema_actor) { list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/actor> <{item}> . "); } } if (this.Schema_genre != null) { foreach (var item in this.Schema_genre) { list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/genre> \"{item.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } } if (this.Schema_url != null) { foreach (var item in this.Schema_url) { list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/url> \"{item.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } } if (this.Schema_aggregateRating != null) { foreach (var item in this.Schema_aggregateRating) { list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/aggregaterating> \"{item.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } } if (this.Schema_productionCompany != null) { foreach (var item in this.Schema_productionCompany) { list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/productioncompany> \"{item.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } } if (this.Schema_recordedAt != null) { foreach (var item in this.Schema_recordedAt) { // list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/recordedat> {item.Value.ToString()} . "); list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/recordedat> {item.ToString()} . "); } } if (this.Schema_countryOfOrigin != null) { foreach (var item in this.Schema_countryOfOrigin) { list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/countryoforigin> \"{item.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } } if (this.Schema_duration != null) { foreach (var item in this.Schema_duration) { //list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/duration> {item.Value.ToString()} . "); list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/duration> {item.ToString()} . "); } } if (this.Schema_inLanguage != null) { foreach (var item in this.Schema_inLanguage) { list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/inlanguage> \"{item.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } } if (this.Schema_award != null) { foreach (var item in this.Schema_award) { list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/award> \"{item.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } } if (this.Schema_description != null) { list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/description> \"{this.Schema_description.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } if (this.Schema_image != null) { list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/image> \"{this.Schema_image.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } if (this.Schema_name != null) { list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/name> \"{this.Schema_name.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } if (this.Schema_datePublished != null) { list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/datepublished> \"{this.Schema_datePublished.ToString("yyyyMMddHHmmss")}\" . "); } if (this.Schema_contentRating != null) { list.Add($"<http://gnoss/{ResourceID}> <http://schema.org/contentrating> \"{this.Schema_contentRating.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } return(list); }
public override List <string> ToOntologyGnossTriples(ResourceApi resourceAPI) { List <string> list = new List <string>(); list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Movie> . "); list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://www.w3.org/2000/01/rdf-schema#label> \"http://schema.org/Movie\" . "); list.Add($"<{resourceAPI.GraphsUrl}{ResourceID}> <http://gnoss/hasEntidad> <{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> . "); foreach (var item in this.Schema_rating) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/rating> <{resourceAPI.GraphsUrl}items/Rating_{ResourceID}_{item.ArticleID}> . "); list.Add($"<{resourceAPI.GraphsUrl}items/Rating_{ResourceID}_{item.ArticleID}> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Rating> . "); list.Add($"<{resourceAPI.GraphsUrl}items/Rating_{ResourceID}_{item.ArticleID}> <http://www.w3.org/2000/01/rdf-schema#label> \"http://schema.org/Rating\" . "); list.Add($"<{resourceAPI.GraphsUrl}{ResourceID}> <http://gnoss/hasEntidad> <{resourceAPI.GraphsUrl}items/Rating_{ResourceID}_{item.ArticleID}> . "); if (item.Schema_ratingSource != null) { list.Add($"<{resourceAPI.GraphsUrl}items/Rating_{ResourceID}_{item.ArticleID}> <http://schema.org/ratingSource> \"{item.Schema_ratingSource.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } if (item.Schema_ratingValue != null) { list.Add($"<{resourceAPI.GraphsUrl}items/Rating_{ResourceID}_{item.ArticleID}> <http://schema.org/ratingValue> {item.Schema_ratingValue.ToString()} . "); } } if (this.Schema_author != null) { foreach (var item in this.Schema_author) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/author> <{item}> . "); } } if (this.Schema_director != null) { foreach (var item in this.Schema_director) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/director> <{item}> . "); } } if (this.Schema_actor != null) { foreach (var item in this.Schema_actor) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/actor> <{item}> . "); } } if (this.Schema_genre != null) { foreach (var item in this.Schema_genre) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/genre> \"{item.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } } if (this.Schema_url != null) { foreach (var item in this.Schema_url) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/url> \"{item.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } } if (this.Schema_aggregateRating != null) { foreach (var item in this.Schema_aggregateRating) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/aggregateRating> \"{item.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } } if (this.Schema_productionCompany != null) { foreach (var item in this.Schema_productionCompany) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/productionCompany> \"{item.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } } if (this.Schema_recordedAt != null) { foreach (var item in this.Schema_recordedAt) { //list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/recordedAt> {item.Value.ToString()} . "); list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/recordedAt> {item.ToString()} . "); } } if (this.Schema_countryOfOrigin != null) { foreach (var item in this.Schema_countryOfOrigin) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/countryOfOrigin> \"{item.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } } if (this.Schema_duration != null) { foreach (var item in this.Schema_duration) { //list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/duration> {item.Value.ToString()} . "); list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/duration> {item.ToString()} . "); } } if (this.Schema_inLanguage != null) { foreach (var item in this.Schema_inLanguage) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/inLanguage> \"{item.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } } if (this.Schema_award != null) { foreach (var item in this.Schema_award) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/award> \"{item.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } } if (this.Schema_description != null) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/description> \"{this.Schema_description.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } if (this.Schema_image != null) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/image> \"{this.Schema_image.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } if (this.Schema_name != null) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/name> \"{this.Schema_name.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } if (this.Schema_datePublished != null) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/datePublished> \"{this.Schema_datePublished.ToString("yyyyMMddHHmmss")}\" . "); } if (this.Schema_contentRating != null) { list.Add($"<{resourceAPI.GraphsUrl}items/PeliculaOntology_{ResourceID}_{ArticleID}> <http://schema.org/contentRating> \"{this.Schema_contentRating.Replace("\r\n", " ").Replace("\n", " ").Replace("\"", "\"\"")}\" . "); } return(list); }
public virtual ComplexOntologyResource ToGnossApiResource(ResourceApi resourceAPI, List <string> listaDeCategorias) { return(ToGnossApiResource(resourceAPI, listaDeCategorias, Guid.Empty, Guid.Empty)); }