/* * Copyright (C) 2013-2015, 2019 by the Konclude Developer Team. * * This file is part of the reasoning system Konclude. * For details and support, see . * * Konclude is free software: you can redistribute it and/or modify * it under the terms of version 3 of the GNU Lesser General Public * License (LGPLv3) as published by the Free Software Foundation. * * Konclude is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU (Lesser) General Public License for more details. * * You should have received a copy of the GNU (Lesser) General Public * License along with Konclude. If not, see . * */ #ifndef KONCLUDE_REASONER_GENERATOR_CCONCRETEONTOLOGYBASEMENTBUILDER_H #define KONCLUDE_REASONER_GENERATOR_CCONCRETEONTOLOGYBASEMENTBUILDER_H // Libraries includes #include #include #include #include // Namespace includes #include "CExpressionSplitter.h" #include "CExpressionHasher.h" // Other includes #include "Reasoner/Ontology/CConcreteOntology.h" #include "Reasoner/Ontology/CConcept.h" #include "Reasoner/Ontology/CTBox.h" #include "Reasoner/Ontology/CABox.h" #include "Reasoner/Ontology/CRBox.h" #include "Reasoner/Ontology/CAbbreviatedIRIName.h" #include "Reasoner/Ontology/CIRIName.h" // Logger includes #include "Logger/CLogger.h" namespace Konclude { using namespace Utilities; using namespace Utilities::Memory; using namespace Parser; namespace Reasoner { using namespace Ontology; namespace Generator { /*! * * \class CConcreteOntologyBasementBuilder * \author Andreas Steigmiller * \version 0.1 * \brief TODO * */ class CConcreteOntologyBasementBuilder { public: CConcreteOntologyBasementBuilder(CConcreteOntology* basementBuildConcreteOntology); virtual ~CConcreteOntologyBasementBuilder(); virtual bool initializeBuilding(); virtual bool completeBuilding(); virtual bool buildOntologyBasement(); bool addNameAbbreviation(const QString &name, const QString &abbreviatedName); // protected functions protected: bool updateName(CNamedItem* item, const QString& name); bool createDatatype(const QString& datatypeIRI); // protected variables protected: CConcreteOntology* mOnto; COntologyStringMapping* mOntoStrings; COntologyDataBoxes* mOntoData; COntologyBuildData* mOntoBuild; CTBox* tBox; CABox* aBox; CRBox* rBox; CMemoryAllocationManager* mMemManager; CActiveEntityCountVector* mActiveEntityCountVector; // contains also previous ontology data CONTOLOGYAXIOMSET* mTellAxiomSet; CONTOLOGYAXIOMSET* mRetractAxiomSet; // contains only updated data CONTOLOGYAXIOMSET* mTellUpdatedAxiomSet; CONTOLOGYAXIOMSET* mRetractUpdatedAxiomSet; CBUILDHASH* mUpdateClassAxiomHash; CBUILDHASH* mUpdateObjectPropertyAxiomHash; // contains also previous ontology data CBUILDSET< QPair >* mClassTermClassAxiomSet; CBUILDHASH* mClassTermClassAxiomHash; CBUILDSET< QPair >* mObjPropTermObjPropAxiomSet; CBUILDHASH* mObjPropTermObjPropAxiomHash; CBUILDSET* mTopRebuildClassTermExpressionsSet; CBUILDSET* mTopRebuildObjectPropertyTermExpressionsSet; CBUILDHASH* mDatatypeBuildHash; CClassTermExpression* mTopClassExpression; CClassTermExpression* mBottomClassExpression; CObjectPropertyTermExpression* mTopObjPropExpression; CObjectPropertyTermExpression* mBottomObjPropExpression; CDataPropertyTermExpression* mTopDataPropExpression; CDataPropertyTermExpression* mBottomDataPropExpression; CBUILDLIST* mExpressionBuildContainerList; CBUILDHASH* mClassTermConceptHash; CBUILDHASH* mConceptClassTermHash; CBUILDHASH* mDataRangeTermConceptHash; CBUILDHASH* mConceptDataRangeTermHash; CBUILDHASH* mObjPropTermRoleHash; CBUILDHASH* mRoleObjPropTermHash; CBUILDHASH* mDataPropTermRoleHash; CBUILDHASH* mRoleDataPropTermHash; CBUILDHASH* mDatatypeExpDatatypeHash; CBUILDHASH* mDatatypeDatatypeExpHash; CBUILDHASH* mObjPropTermRoleChainHash; CBUILDHASH* mRoleChainObjPropTermHash; CBUILDHASH* mIndividulTermIndiHash; CBUILDHASH* mIndiIndividulTermHash; CBUILDHASH* mInverseObjectPropertyHash; // contains also previous ontology data, // exact build expression identification CBUILDHASH* mExpressionBuildHash; CBUILDHASH* mClassBuildHash; CBUILDHASH* mObjectPropertyBuildHash; CBUILDHASH* mIndividualBuildHash; CBUILDHASH* mDataPropertyBuildHash; // contains also previous ontology data, // name prefixes CMAPPINGHASH* mAbbreviatedNamePrefixMapHash; CMAPPINGHASH* mNamePrefixMapHash; }; }; // end namespace Generator }; // end namespace Reasoner }; // end namespace Konclude #endif // end KONCLUDE_REASONER_GENERATOR_CCONCRETEONTOLOGYBASEMENTBUILDER_H