/// <summary> /// Returns all annotations contained in the manager as DLAnnotationAxiom. /// </summary> /// <param name="pfx2ns">If not null, it will be used to transform each prefix found to the full namespace.</param> /// <returns></returns> public Dictionary <ARS.EntityKind, List <DL.DLAnnotationAxiom> > getDLAnnotationAxioms(Func <string, string> pfx2ns = null) { var dlAnnotatedAxioms = new Dictionary <ARS.EntityKind, List <DL.DLAnnotationAxiom> >(); foreach (var annotKv in _annotatedElements) { var kind = ParseSubjectKind(subjectType[annotKv.Key]); if (!dlAnnotatedAxioms.ContainsKey(kind)) { dlAnnotatedAxioms.Add(kind, new List <DL.DLAnnotationAxiom>()); } var dlSubj = CNLTools.DLToFullUri(annotKv.Key, kind, pfx2ns); foreach (var annotEl in annotKv.Value) { var nameToUse = annotEl.Type; dlAnnotatedAxioms[kind].Add(new DL.DLAnnotationAxiom(null, dlSubj, subjectType[annotKv.Key], CNLTools.DLToFullUri(annotEl.Type, ARS.EntityKind.Role, pfx2ns), annotEl.Language, (string)annotEl.Value)); } } return(dlAnnotatedAxioms); }
string applyFullUri(string nm) { return(CNLTools.DLToFullUri(nm, ARS.EntityKind.Instance, pfx2ns, _defaultNs)); }