public static IUriNode GetRestrictionProperty(this OntologyClass oClass)
 {
     if (!oClass.HasRestrictionProperty())
     {
         throw new RdfException($"Ontology class {oClass} does not have a restriction property.");
     }
     IUriNode onProperty = oClass.Graph.CreateUriNode(VocabularyHelper.OWL.onProperty);
     return oClass.GetNodesViaProperty(onProperty).UriNodes().First(node => node.IsOntologyProperty());
 }
Exemplo n.º 2
0
        public static bool HasRestrictionProperty(this OntologyClass oClass)
        {
            IUriNode onProperty = oClass.Graph.CreateUriNode(VocabularyHelper.OWL.onProperty);

            return(oClass.GetNodesViaProperty(onProperty).UriNodes().Any(node => node.IsOntologyProperty()));
        }