public string Resolve(Taxonomy source, TaxonomyResultDTO destination, string destMember, ResolutionContext context) { string prefLabel = source.Properties.GetValueOrNull(Graph.Metadata.Constants.SKOS.PrefLabel, true); string rdfLabel = source.Properties.GetValueOrNull(Graph.Metadata.Constants.RDFS.Label, true); string entityType = source.Properties.GetValueOrNull(Graph.Metadata.Constants.RDF.Type, true); switch (entityType) { case COLID.Graph.Metadata.Constants.PidUriTemplate.Type: var flatPidUriTemplate = _pidUriTemplateService.GetFlatPidUriTemplateByPidUriTemplate(source); return(_pidUriTemplateService.FormatPidUriTemplateName(flatPidUriTemplate)); } return(prefLabel ?? rdfLabel); }
public string Resolve(Entity source, BaseEntityResultDTO destination, string destMember, ResolutionContext context) { string label = source?.Properties.GetValueOrNull(Graph.Metadata.Constants.RDFS.Label, true); if (!string.IsNullOrWhiteSpace(label)) { return(label); } string entityType = source?.Properties.GetValueOrNull(Graph.Metadata.Constants.RDF.Type, true); switch (entityType) { case COLID.Graph.Metadata.Constants.PidUriTemplate.Type: var flatPidUriTemplate = _pidUriTemplateService.GetFlatPidUriTemplateByPidUriTemplate(source); return(_pidUriTemplateService.FormatPidUriTemplateName(flatPidUriTemplate)); } return(string.Empty); }
public string Resolve(PidUriTemplate source, PidUriTemplateResultDTO destination, string destMember, ResolutionContext context) { var flatPidUriTemplate = _pidUriTemplateService.GetFlatPidUriTemplateByPidUriTemplate(source); return(_pidUriTemplateService.FormatPidUriTemplateName(flatPidUriTemplate)); }