29 #include <MemoryX/interface/components/CommonStorageInterface.h>
30 #include <MemoryX/interface/components/PriorKnowledgeInterface.h>
40 defineRequiredProperty<std::string>(
42 "Comma separated list of MongoDB collection (<db>.<collection>) which store known "
43 "object classes. First collection will be used for writing.");
44 defineOptionalProperty<std::string>(
45 "RelationCollections",
47 "Comma separated list of MongoDB collection (<db>.<collection>) which store known "
48 "object classes relations. First collection will be used for writing.");
49 defineOptionalProperty<std::string>(
52 "Comma separated list of MongoDB collection (<db>.<collection>) which store "
53 "graphs. First collection will be used for writing.");
57 using EntityMap = std::map<std::string, EntityBasePtr>;
65 virtual public PriorKnowledgeInterface,
74 return "PriorKnowledge";
77 void onInitComponent()
override;
78 void onConnectComponent()
override;
90 void clear(const ::Ice::Current& = Ice::emptyCurrent)
override;
95 return Component::getObjectAdapter();
99 PersistentObjectClassSegmentBasePrx
100 getObjectClassesSegment(const ::Ice::Current& = Ice::emptyCurrent)
const override;
102 PersistentRelationSegmentBasePrx
103 getRelationsSegment(const ::Ice::Current& = Ice::emptyCurrent)
const override;
105 GraphMemorySegmentBasePrx
106 getGraphSegment(const ::Ice::Current&
c = Ice::emptyCurrent)
const override;
108 CommonStorageInterfacePrx
109 getCommonStorage(const ::Ice::Current& = Ice::emptyCurrent)
const override;
111 bool hasGraphSegment(
const Ice::Current&
c = Ice::emptyCurrent)
const override;
113 bool isPriorCollection(const ::std::string& collNS,
114 const ::Ice::Current& = Ice::emptyCurrent)
override;
123 void setSegmentReadCollections(
const PersistentEntitySegmentBasePtr& segmentPrx,
124 const NameList& collNameList);
128 std::string getMemoryName(
const Ice::Current&)
const override;
129 AbstractMemorySegmentPrx addGenericSegment(
const std::string& segmentName,
130 const Ice::Current&)
override;