withPredicatesForSubject

fun withPredicatesForSubject(subjectType: String, knowledgeType: KnowledgeType, vararg predicates: String): Relations

Add several relations at once, all sharing the same subject type and knowledge type. The predicate string is used as the meaning for each one.

Parameters

subjectType

Entity type that can be the subject (string form, e.g. "Person")

knowledgeType

Knowledge type shared by all added relations

predicates

Predicate strings to add


fun withPredicatesForSubject(subjectType: Class<*>, knowledgeType: KnowledgeType, vararg predicates: String): Relations

Same as withPredicatesForSubject but takes a class instead of a string — the subject type is recorded as the class simpleName. A mention's type must match it (case-insensitive) for an edge to project.

Parameters

subjectType

Entity class whose simple name is used as the subject type constraint

knowledgeType

Knowledge type shared by all added relations

predicates

Predicate strings to add