/// <summary>
 /// Default-ctor to build an empty ontology data metadata
 /// </summary>
 internal RDFOntologyDataMetadata()
 {
     this.ClassType     = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Data);
     this.SameAs        = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Data);
     this.DifferentFrom = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Data);
     this.Assertions    = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Data);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Builds a new difference taxonomy from this taxonomy and a given one
        /// </summary>
        internal RDFOntologyTaxonomy DifferenceWith(RDFOntologyTaxonomy taxonomy)
        {
            var result = new RDFOntologyTaxonomy(this.Category);

            if (taxonomy != null)
            {
                //Add difference entries
                foreach (var te in this)
                {
                    if (!taxonomy.ContainsEntry(te))
                    {
                        result.AddEntry(te);
                    }
                }
            }
            else
            {
                //Add entries from this taxonomy
                foreach (var te in this)
                {
                    result.AddEntry(te);
                }
            }
            return(result);
        }
 /// <summary>
 /// Default-ctor to build an empty ontology property model metadata
 /// </summary>
 internal RDFOntologyPropertyModelMetadata()
 {
     this.SubPropertyOf      = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Model);
     this.EquivalentProperty = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Model);
     this.InverseOf          = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Model);
     this.CustomRelations    = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Model);
 }
 /// <summary>
 /// Default-ctor to build an empty ontology class model metadata
 /// </summary>
 internal RDFOntologyClassModelMetadata()
 {
     this.SubClassOf      = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Model);
     this.EquivalentClass = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Model);
     this.DisjointWith    = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Model);
     this.OneOf           = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Model);
     this.IntersectionOf  = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Model);
     this.UnionOf         = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Model);
     this.CustomRelations = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Model);
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Gets a taxonomy with the entries having the specified ontology resource as object
        /// </summary>
        public RDFOntologyTaxonomy SelectEntriesByObject(RDFOntologyResource objectResource)
        {
            var resultTaxonomy = new RDFOntologyTaxonomy(this.Category);

            if (objectResource != null)
            {
                foreach (var te   in this.Where(tEntry => tEntry.TaxonomyObject.Equals(objectResource)))
                {
                    resultTaxonomy.AddEntry(te);
                }
            }
            return(resultTaxonomy);
        }
 /// <summary>
 /// Default-ctor to build an empty ontology annotations metadata
 /// </summary>
 internal RDFOntologyAnnotationsMetadata()
 {
     this.VersionInfo            = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Generic);
     this.VersionIRI             = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Generic);
     this.TermStatus             = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Generic);
     this.Comment                = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Generic);
     this.Label                  = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Generic);
     this.SeeAlso                = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Generic);
     this.IsDefinedBy            = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Generic);
     this.PriorVersion           = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Generic);
     this.BackwardCompatibleWith = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Generic);
     this.IncompatibleWith       = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Generic);
     this.Imports                = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Generic);
     this.CustomAnnotations      = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Generic);
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Builds a new intersection taxonomy from this taxonomy and a given one
        /// </summary>
        internal RDFOntologyTaxonomy IntersectWith(RDFOntologyTaxonomy taxonomy)
        {
            var result = new RDFOntologyTaxonomy(this.Category);

            if (taxonomy != null)
            {
                //Add intersection triples
                foreach (var te in this)
                {
                    if (taxonomy.ContainsEntry(te))
                    {
                        result.AddEntry(te);
                    }
                }
            }
            return(result);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Builds a new union taxonomy from this taxonomy and a given one
        /// </summary>
        internal RDFOntologyTaxonomy UnionWith(RDFOntologyTaxonomy taxonomy)
        {
            var result = new RDFOntologyTaxonomy(this.Category);

            //Add entries from this taxonomy
            foreach (var te in this)
            {
                result.AddEntry(te);
            }

            //Manage the given taxonomy
            if (taxonomy != null)
            {
                //Add entries from the given taxonomy
                foreach (var te in taxonomy)
                {
                    result.AddEntry(te);
                }
            }
            return(result);
        }
 /// <summary>
 /// Default-ctor to build an empty ontology metadata
 /// </summary>
 internal RDFOntologyMetadata()
 {
     this.CustomRelations = new RDFOntologyTaxonomy(RDFSemanticsEnums.RDFOntologyTaxonomyCategory.Generic);
 }