class clsKnowledgeProviders(db.Model): __tablename__ = tableName __table_args__ = (db.Index(f'uk_{tableName}_Name', 'Name', unique=True), ) Id = db.Column(db.BigInteger, primary_key=True, autoincrement=False) Name = db.Column(db.String(255)) Url = db.Column(db.Text)
class clsXaraNodes(db.Model): __tablename__ = tableName __table_args__ = (db.Index(f'uk_{tableName}_Node_key', 'Node_key', unique=True), ) Node_key = db.Column(db.Integer, primary_key=True, autoincrement=False, nullable=False) Node_Category = db.Column(db.String(255), nullable=True)
class clsXaraExplanationCaseSolutions(db.Model): __tablename__ = tableName __table_args__ = (db.Index(f'uk_{tableName}_SOLUTION_ID', 'SOLUTION_ID', unique=True), ) SOLUTION_ID = db.Column(db.Integer(255), primary_key=True, autoincrement=False, nullable=False) CASE_ID = db.Column(db.String(255), nullable=False) SOLUTION_PROCESSES = db.Column(db.String(255), nullable=True)
class clsXaraConfig(db.Model): __tablename__ = tableName # __table_args__ = ( # db.Index( # f'uk_{tableName}_CASE_ID', # 'CASE_ID', # unique=True # ), # ) MAX_ARS_HOPS = db.Column(db.Integer, nullable=True) GLOBAL_QUERY_THRESHOLD = db.Column(db.Integer, nullable=True) GLOBAL_RESULT_THRESHOLD = db.Column(db.Integer, nullable=True)
class clsXaraLocalSimNodes(db.Model): __tablename__ = tableName # __table_args__ = ( # db.Index( # f'uk_{tableName}_CASE_ID', # 'CASE_ID', # unique=True # ), # ) Node_1 = db.Column(db.String(255), nullable=True) Node_2 = db.Column(db.String(255), nullable=True) Similarity_score = db.Column(db.Integer, nullable=True)
class clsXaraQueryWeights(db.Model): __tablename__ = tableName # __table_args__ = ( # db.Index( # f'uk_{tableName}_CASE_ID', # 'CASE_ID', # unique=True # ), # ) SUBJECT_NODE_WEIGHT = db.Column(db.Integer, nullable=True) OBJECT_NODE_WEIGHT = db.Column(db.Integer, nullable=True) PREDICATE_WEIGHT = db.Column(db.Integer, nullable=True)
class clsXaraKpInfo(db.Model): __tablename__ = tableName # __table_args__ = ( # db.Index( # f'uk_{tableName}_CASE_ID', # 'CASE_ID', # unique=True # ), # ) KP_Name = db.Column(db.String(255), nullable=True) Contact_Person = db.Column(db.String(255), nullable=True) Contact_Email = db.Column(db.String(255), nullable=True) URL = db.Column(db.String(255), nullable=True) Priority = db.Column(db.Integer, nullable=True)
class clsXaraKpExplanationExclusions(db.Model): __tablename__ = tableName # __table_args__ = ( # db.Index( # f'uk_{tableName}_CASE_ID', # 'CASE_ID', # unique=True # ), # ) KP = db.Column(db.String(255), nullable=True)
class clsXaraSecondOrderExpansions(db.Model): __tablename__ = tableName # __table_args__ = ( # db.Index( # f'uk_{tableName}_CASE_ID', # 'CASE_ID', # unique=True # ), # ) N00_category = db.Column(db.String(255), nullable=True) N01_category = db.Column(db.String(255), nullable=True) E00_predicate = db.Column(db.String(255), nullable=True) Expanded_N00_category = db.Column(db.String(255), nullable=True) Expanded_N01_category = db.Column(db.String(255), nullable=True) Expanded_N02_category = db.Column(db.String(255), nullable=True) Expanded_E00_predicate = db.Column(db.String(255), nullable=True) Expanded_E01_predicate = db.Column(db.String(255), nullable=True)
class clsGlobalSimilarity(db.Model): __tablename__ = tableName __table_args__ = (db.Index( f'uk_{tableName}_Subject_Object_Predicate_CaseId', 'Subject', 'Object', 'Predicate', 'CaseId', unique=True), ) Id = db.Column(db.BigInteger, primary_key=True, autoincrement=False) Subject = db.Column(db.String(255)) Object = db.Column(db.String(255)) Predicate = db.Column(db.String(255)) CaseId = db.Column(db.String(255)) CaseValue = db.Column(db.Float)
class clsXaraKpInventory(db.Model): __tablename__ = tableName # __table_args__ = ( # db.Index( # f'uk_{tableName}_CASE_ID', # 'CASE_ID', # unique=True # ), # ) No_of_nodes = db.Column(db.Integer, nullable=True) No_of_edges = db.Column(db.Integer, nullable=True) N00_category = db.Column(db.String(255), nullable=True) N01_category = db.Column(db.String(255), nullable=True) N02_category = db.Column(db.String(255), nullable=True) N03_category = db.Column(db.String(255), nullable=True) E00_predicate = db.Column(db.String(255), nullable=True) E00_ends = db.Column(db.String(255), DEFAULT='n00:n01', nullable=False), E01_predicate = db.Column(db.String(255), nullable=True) E01_ends = db.Column(db.String(255), nullable=True) E02_predicate = db.Column(db.String(255), nullable=True) E02_ends = db.Column(db.String(255), nullable=True) KP_to_query = db.Column(db.String(255), nullable=True)
class clsCaseSolutions(db.Model): __tablename__ = tableName __table_args__ = (db.CheckConstraint( """ ( "KnowledgeProviderPathCount" = 1 and "KnowledgeProviderPath2Name" is null and "Node1Path2Category" is null and "Node1Path2Type" is null and "Node1Path2Reference" is null and "Node2Path2Category" is null and "Node2Path2Type" is null and "Node2Path2Reference" is null and "Edge1Path2Predicate" is null and "Edge1Path2Ends" is null and "Edge1Path2Reference" is null ) OR ( "KnowledgeProviderPathCount" = 2 and "KnowledgeProviderPath2Name" is not null and "Node1Path2Category" is not null and "Node1Path2Type" is not null and "Node1Path2Reference" is not null and "Node2Path2Category" is not null and "Node2Path2Type" is not null and "Node2Path2Reference" is not null and "Edge1Path2Predicate" is not null and "Edge1Path2Ends" is not null and "Edge1Path2Reference" is not null and "Node2Path1Category" = "Node1Path2Category" ) """, f"chk_{tableName}_KnowledgeProviderPathCount"), ) Id = db.Column(db.BigInteger, primary_key=True, autoincrement=False) CaseId = db.Column(db.String(255)) Origin = db.Column(db.String(255)) KnowledgeProviderPathCount = db.Column(db.SmallInteger) KnowledgeProviderPath1Name = db.Column(db.String(255)) KnowledgeProviderPath2Name = db.Column(db.String(255), nullable=True) Node1Path1Category = db.Column(db.String(255)) Node1Path1Type = db.Column(db.String(255)) Node1Path1Reference = db.Column(db.String(255)) Node2Path1Category = db.Column(db.String(255)) Node2Path1Type = db.Column(db.String(255)) Node2Path1Reference = db.Column(db.String(255)) Edge1Path1Predicate = db.Column(db.String(255)) Edge1Path1Ends = db.Column(db.String(255)) Edge1Path1Reference = db.Column(db.String(255)) Node1Path2Category = db.Column(db.String(255), nullable=True) Node1Path2Type = db.Column(db.String(255), nullable=True) Node1Path2Reference = db.Column(db.String(255), nullable=True) Node2Path2Category = db.Column(db.String(255), nullable=True) Node2Path2Type = db.Column(db.String(255), nullable=True) Node2Path2Reference = db.Column(db.String(255), nullable=True) Edge1Path2Predicate = db.Column(db.String(255), nullable=True) Edge1Path2Ends = db.Column(db.String(255), nullable=True) Edge1Path2Reference = db.Column(db.String(255), nullable=True)
class clsXaraExplanationCaseProblems(db.Model): __tablename__ = tableName __table_args__ = (db.Index(f'uk_{tableName}_CASE_ID', 'CASE_ID', unique=True), ) CASE_ID = db.Column(db.String(255), primary_key=True, autoincrement=False, nullable=False) CASE_NAME = db.Column(db.String(255), nullable=True) KP_NAME = db.Column(db.String(255), nullable=True) SUBJECT_NODE = db.Column(db.String(255), nullable=True) OBJECT_NODE = db.Column(db.String(255), nullable=True) PREDICATE = db.Column(db.String(255), nullable=True) SLOT_LABEL_0 = db.Column(db.String(255), nullable=True) SLOT_VALUE_0 = db.Column(db.String(255), nullable=True) SLOT_LABEL_1 = db.Column(db.String(255), nullable=True) SLOT_VALUE_1 = db.Column(db.String(255), nullable=True) SLOT_LABEL_2 = db.Column(db.String(255), nullable=True) SLOT_VALUE_2 = db.Column(db.String(255), nullable=True) SLOT_LABEL_3 = db.Column(db.String(255), nullable=True) SLOT_VALUE_3 = db.Column(db.String(255), nullable=True) SLOT_LABEL_4 = db.Column(db.String(255), nullable=True) SLOT_VALUE_4 = db.Column(db.String(255), nullable=True) SLOT_LABEL_5 = db.Column(db.String(255), nullable=True) SLOT_VALUE_5 = db.Column(db.String(255), nullable=True) SLOT_LABEL_6 = db.Column(db.String(255), nullable=True) SLOT_VALUE_6 = db.Column(db.String(255), nullable=True) SLOT_LABEL_7 = db.Column(db.String(255), nullable=True) SLOT_VALUE_7 = db.Column(db.String(255), nullable=True)
class clsXaraCaseProblems(db.Model): __tablename__ = tableName __table_args__ = (db.Index(f'uk_{tableName}_CASE_ID', 'CASE_ID', unique=True), ) CASE_ID = db.Column(db.String(255), primary_key=True, autoincrement=False, nullable=False) NO_OF_EDGES = db.Column(db.String(255), nullable=True) NO_OF_NODES = db.Column(db.String(255), nullable=True) N00_NODE_CATEGORY = db.Column(db.String(255), nullable=True) N01_NODE_CATEGORY = db.Column(db.String(255), nullable=True) N02_NODE_CATEGORY = db.Column(db.String(255), nullable=True) N03_NODE_CATEGORY = db.Column(db.String(255), nullable=True) E00_EDGE_PREDICATE = db.Column(db.String(255), nullable=True) E00_EDGE_ENDS = db.Column(db.String(255), nullable=True) E01_EDGE_PREDICATE = db.Column(db.String(255), nullable=True) E01_EDGE_ENDS = db.Column(db.String(255), nullable=True) E02_EDGE_PREDICATE = db.Column(db.String(255), nullable=True) E02_EDGE_ENDS = db.Column(db.String(255), nullable=True) ORIGIN = db.Column(db.String(255), nullable=True)
class clsXaraCaseSolutions(db.Model): __tablename__ = tableName __table_args__ = (db.Index(f'uk_{tableName}_CASE_ID', 'CASE_ID', unique=True), ) SOLUTION_ID = db.Column(db.Integer, primary_key=True, autoincrement=False, nullable=False) CASE_ID = db.Column(db.String(255), nullable=True) ORIGIN = db.Column(db.String(255), nullable=True) SOLUTION_STEPS = db.Column(db.Integer, nullable=True) SOLUTION_FIRST_KP_NAME = db.Column(db.String(255), nullable=True) SOLUTION_SECOND_KP_NAME = db.Column(db.String(255), nullable=True) NODE1_PATH1_CATEGORY = db.Column(db.String(255), nullable=True) NODE2_PATH1_CATEGORY = db.Column(db.Float, nullable=True) NODE1_PATH2_CATEGORY = db.Column(db.String(255), nullable=True) NODE2_PATH2_CATEGORY = db.Column(db.String(255), nullable=True) EDGE1_PATH1_PREDICATE = db.Column(db.String(255), nullable=True) EDGE1_PATH1_ENDS = db.Column(db.String(255), nullable=True) EDGE1_PATH2_PREDICATE = db.Column(db.String(255), nullable=True) EDGE1_PATH2_ENDS = db.Column(db.String(255), nullable=True)