protected ObjectPropertyAxiom( IOntology ontology, IObjectPropertyExpression objectPropertyExpression ) : base(ontology) { _objectPropertyExpression = objectPropertyExpression; }
protected Axiom( IOntology ontology ) { _ontology = ontology; _ontology?.Axioms.Add(this); }
protected Entity( IOntology ontology, string localName ) : base(ontology) { _localName = localName; }
public DisjointClasses( IOntology ontology, params IClassExpression[] classExpressions ) : base(ontology) { _classExpressions = classExpressions; }
protected DataPropertyAxiom( IOntology ontology, IDataPropertyExpression dataPropertyExpression ) : base(ontology) { _dataPropertyExpression = dataPropertyExpression; }
public EquivalentClasses( IOntology ontology, params IClassExpression[] classExpressions ) : base(ontology) { _classExpressions = classExpressions; }
public static IDictionary <object, ILookup <IPropertyExpression, ISubClassOf> > Validate( this IOntology ontology, IDictionary <object, ISet <IClass> > classifications ) { var evaluator = new ClassMembershipEvaluator( ontology, classifications); return(( from keyValuePair in classifications let individual = keyValuePair.Key from classExpression in keyValuePair.Value from subClassOf in ontology.Get <ISubClassOf>() from annotation in subClassOf.Annotations where subClassOf.SubClassExpression == classExpression && subClassOf.SuperClassExpression is IPropertyRestriction && annotation.Property.Iri == "Validation.Restriction" && !subClassOf.SuperClassExpression.Evaluate( evaluator, individual) group subClassOf by individual into errorsGroupedByIndividual select errorsGroupedByIndividual ).ToDictionary( group => group.Key, group => group.ToLookup( g => ((IPropertyRestriction)g.SuperClassExpression).PropertyExpression))); }
/// <summary>Adds another built in ontology into this provider instance.</summary> /// <param name="ontologies">Ontologiesto be included in this instance.</param> /// <returns>This instance of the default ontologies provider.</returns> public DefaultOntologiesProvider Include(BuiltInOntologies ontologies) { foreach (BuiltInOntologies ontology in Enum.GetValues(typeof(BuiltInOntologies))) { if (((ontologies & ontology) == ontology) && (!_includedOntologies.Contains(ontology))) { string resourceName = System.String.Format("{0}.{1}.", typeof(DefaultOntologiesProvider).Namespace, ontology.ToString()); resourceName = (from manifestResourceName in GetType().GetTypeInfo().Assembly.GetManifestResourceNames() where manifestResourceName.StartsWith(resourceName) select manifestResourceName).FirstOrDefault(); if (System.String.IsNullOrEmpty(resourceName)) { throw new System.IO.FileNotFoundException(System.String.Format("No embedded ontology stream found for '{0}'.", ontology.ToString())); } IOntology ontologyInstance = _ontologyFactory.Create( GetType().GetTypeInfo().Assembly.GetManifestResourceStream(resourceName), "application/" + (resourceName.EndsWith(".owl") ? "owl" : "rdf") + "+xml"); if (ontologyInstance != null) { _includedOntologies.Add(ontology); _ontologies.Add(ontologyInstance); } } } return(this); }
public AnnotationProperty( IOntology ontology, string localName ) : base( ontology, localName) { }
public Datatype( IOntology ontology, string localName ) : base( ontology, localName) { }
public Class( IOntology ontology, string localName ) : base( ontology, localName) { }
public static IObjectPropertyExpression DeclareObjectProperty <T, TProperty>( this IOntology ontology, string localName, Func <T, IEnumerable <TProperty> > property ) => new ObjectProperty <T, TProperty>( ontology, localName, property);
public NamedIndividual( IOntology ontology, string localName ) : base( ontology, localName) { }
public ClassAssertion( IOntology ontology, IClassExpression classExpression, INamedIndividual namedIndividual ) : base(ontology) { _classExpression = classExpression; _namedIndividual = namedIndividual; }
/// <summary>Creates a new instance of <see cref="OntologyAccessor"/>.</summary> internal OntologyAccessor(Entity entity, IOntology ontology, INodeConverter nodeConverter, IResultTransformerCatalog resultTransformers) { _tripleStore = entity.Context.Store; _entity = entity; _ontology = ontology; _resultTransformers = resultTransformers; _nodeConverter = nodeConverter; _context = entity.Context; }
protected PropertyAssertion( IOntology ontology, IPropertyExpression propertyExpression, INamedIndividual sourceIndividual ) : base(ontology) { _propertyExpression = propertyExpression; _sourceIndividual = sourceIndividual; }
public SubClassOf( IOntology ontology, IClassExpression subClassExpression, IClassExpression superClassExpression ) : base(ontology) { _subClassExpression = subClassExpression; _superClassExpression = superClassExpression; }
public HasKey( IOntology ontology, IClassExpression classExpression, params IDataPropertyExpression[] dataPropertyExpressions ) : base(ontology) { _classExpression = classExpression; _dataPropertyExpressions = dataPropertyExpressions; }
public ObjectPropertyDomain( IOntology ontology, IObjectPropertyExpression objectPropertyExpression, IClassExpression domain ) : base( ontology, objectPropertyExpression) { _domain = domain; }
public FunctionalObjectProperty( IOntology ontology, string localName, Func <T, TProperty> property ) : base( ontology, localName, property) { }
public DataProperty( IOntology ontology, string localName, Func <T, IEnumerable <TProperty> > property ) : base( ontology, localName, property) { }
public ObjectPropertyRange( IOntology ontology, IObjectPropertyExpression objectPropertyExpression, IClassExpression range ) : base( ontology, objectPropertyExpression) { _range = range; }
public DataPropertyDomain( IOntology ontology, IDataPropertyExpression dataPropertyExpression, IClassExpression domain ) : base( ontology, dataPropertyExpression) { _domain = domain; }
protected FunctionalProperty( IOntology ontology, string localName, Func <T, TProperty> property ) : base( ontology, localName) { _property = property; }
public DataPropertyRange( IOntology ontology, IDataPropertyExpression dataPropertyExpression, IDataRange range ) : base( ontology, dataPropertyExpression) { _range = range; }
protected Property( IOntology ontology, string localName, Func <T, IEnumerable <TProperty> > property ) : base( ontology, localName) { _property = property; }
public DataPropertyAssertion( IOntology ontology, IDataPropertyExpression dataPropertyExpression, INamedIndividual sourceIndividual, object targetValue ) : base( ontology, dataPropertyExpression, sourceIndividual) { _dataPropertyExpression = dataPropertyExpression; _targetValue = targetValue; }
public ObjectPropertyAssertion( IOntology ontology, IObjectPropertyExpression objectPropertyExpression, INamedIndividual sourceIndividual, object targetIndividual ) : base( ontology, objectPropertyExpression, sourceIndividual) { _objectPropertyExpression = objectPropertyExpression; _targetIndividual = targetIndividual; }
/// <summary>Creates an ontology from given stream.</summary> /// <param name="fileStream">Stream containing a serialized ontology data.</param> /// <param name="contentType">Explicitly passed content type of the data stored in the given stream.</param> /// <returns>Ontology beeing an object representation of given data.</returns> public IOntology Create(Stream fileStream, string contentType) { IOntologyLoader ontologyFactory = GetOntologyFactory(contentType); if (ontologyFactory == null) { throw new NotSupportedException(System.String.Format("MIME type of '{0}' is not supported.", contentType)); } IOntology result = ontologyFactory.Create(fileStream); fileStream.Dispose(); return(result); }
public static OntologyState Create(IOntology ontology) { if (ontology == null) { throw new ArgumentNullException("ontology"); } return(new OntologyState(ontology.Id) { CanAction = ontology.CanAction, CanCommand = ontology.CanCommand, CanEvent = ontology.CanEvent, Code = ontology.Code, CreateOn = ontology.CreateOn, DispatcherLoadCount = ontology.DispatcherLoadCount, DispatcherSleepTimeSpan = ontology.DispatcherSleepTimeSpan, EntityDatabaseId = ontology.EntityDatabaseId, EntityProviderId = ontology.EntityProviderId, EntitySchemaName = ontology.EntitySchemaName, EntityTableName = ontology.EntityTableName, ExecutorLoadCount = ontology.ExecutorLoadCount, ExecutorSleepTimeSpan = ontology.ExecutorSleepTimeSpan, Icon = ontology.Icon, IsEnabled = ontology.IsEnabled, IsLogicalDeletionEntity = ontology.IsLogicalDeletionEntity, IsCataloguedEntity = ontology.IsCataloguedEntity, IsSystem = ontology.IsSystem, MessageDatabaseId = ontology.MessageDatabaseId, MessageProviderId = ontology.MessageProviderId, MessageSchemaName = ontology.MessageSchemaName, Name = ontology.Name, ReceivedMessageBufferSize = ontology.ReceivedMessageBufferSize, ServiceIsAlive = ontology.ServiceIsAlive, SortCode = ontology.SortCode, Triggers = ontology.Triggers }); }