Exemple #1
0
        private OntologyProperty TranslateType(OntologyProperty p)
        {
            string newtype;

            switch (p.Range)
            {
            case "integer":
                newtype = "int";
                break;

            case "Literal":
                newtype = "string";
                break;

            case "Thing":
                newtype = "LinqToRdf.OwlInstanceSupertype";
                break;

            default:
                newtype = p.Range;
                break;
            }
            return(new OntologyProperty
            {
                IsObjectProp = p.IsObjectProp,
                Name = p.Name,
                Range = newtype,
                RangeUri = p.RangeUri,
                Uri = p.Uri
            });
        }
Exemple #2
0
 private bool NamespaceMatches(OntologyProperty p)
 {
     if (string.IsNullOrEmpty(opts.OntologyNamespace))
     {
         return(true);
     }
     return(p.Uri.StartsWith(opts.OntologyNamespace));
 }
 private bool NamespaceMatches(OntologyProperty p)
 {
     if (string.IsNullOrEmpty(opts.OntologyNamespace))
     {
         return true;
     }
     return p.Uri.StartsWith(opts.OntologyNamespace);
 }
 private OntologyProperty TranslateType(OntologyProperty p)
 {
     string newtype;
     switch (p.Range)
     {
         case "integer":
             newtype = "int";
             break;
         case "Literal":
             newtype = "string";
             break;
         case "Thing":
             newtype = "LinqToRdf.OwlInstanceSupertype";
             break;
         default:
             newtype = p.Range;
             break;
     }
     return new OntologyProperty
                {
                    IsObjectProp = p.IsObjectProp,
                    Name = p.Name,
                    Range = newtype,
                    RangeUri = p.RangeUri,
                    Uri = p.Uri
                };
 }