Package com.tnsai.context.entity
Class EntitySource
java.lang.Object
com.tnsai.context.entity.EntitySource
Represents a source system that provides entity data.
EntitySource abstracts different data sources (CRM, email, Slack, etc.) and provides metadata about their reliability and capabilities.
Usage Example
EntitySource salesforce = EntitySource.builder()
.id("salesforce")
.name("Salesforce CRM")
.type(SourceType.CRM)
.priority(1)
.defaultConfidence(0.95)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for EntitySource.static enumSource type enumeration. -
Method Summary
Modifier and TypeMethodDescriptionstatic EntitySource.Builderbuilder()Creates a new builder.booleandoublegetId()getName()intgetSpec()getType()inthashCode()booleanReturns true if this source has higher priority than another.booleanReturns true if this source is authoritative (priority invalid input: '<'= 1).static EntitySourceCreates a simple source with just an ID.static EntitySourceof(String id, EntitySource.SourceType type) Creates a source with ID and type.toString()
-
Method Details
-
of
Creates a simple source with just an ID. -
of
Creates a source with ID and type. -
builder
Creates a new builder. -
getId
-
getName
-
getType
-
getPriority
public int getPriority() -
getDefaultConfidence
public double getDefaultConfidence() -
getLastSync
-
getSpec
-
hasHigherPriorityThan
Returns true if this source has higher priority than another. -
isAuthoritative
public boolean isAuthoritative()Returns true if this source is authoritative (priority invalid input: '<'= 1). -
equals
-
hashCode
public int hashCode() -
toString
-