Exemple #1
0
        /// <summary>Creates an empty KnowledgeBase.</summary>
        /// <param name="tripleStoreFactory">A TripleStoreFactory that the KnowledgeBase should use to create any new TripleStores</param>
        /// <param name="parserFactory">A ParserFactory that the KnowledgeBase should use to create new RDF parsers</param>
        public KnowledgeBase(TripleStoreFactory tripleStoreFactory, ParserFactory parserFactory)
        {
            itsTripleStoreFactory = tripleStoreFactory;
            itsParserFactory      = parserFactory;

            itsAssertions = itsTripleStoreFactory.MakeTripleStore();
            itsInferences = itsTripleStoreFactory.MakeTripleStore();
            itsSchemas    = itsTripleStoreFactory.MakeTripleStore();


            itsResourceFactory  = tripleStoreFactory.MakeResourceFactory();
            itsStatementFactory = new StatementFactory();
            itsDereferencer     = itsParserFactory.GetDereferencer();
        }