Example #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
            });
        }
Example #2
0
 private bool NamespaceMatches(OntologyProperty p)
 {
     if (string.IsNullOrEmpty(opts.OntologyNamespace))
     {
         return(true);
     }
     return(p.Uri.StartsWith(opts.OntologyNamespace));
 }
Example #3
0
 private bool NamespaceMatches(OntologyProperty p)
 {
     if (string.IsNullOrEmpty(opts.OntologyNamespace))
     {
         return true;
     }
     return p.Uri.StartsWith(opts.OntologyNamespace);
 }
Example #4
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
                };
 }