Package com.longbridge.agent
Class Reference
- java.lang.Object
-
- com.longbridge.agent.Reference
-
public class Reference extends Object
A source referenced by the answer
-
-
Constructor Summary
Constructors Constructor Description Reference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContent()Returns the full reference payload as sent by the server (source,description,published_at,source_url,source_logo,kind, …), as JSON text.StringgetId()Returns the reference id.intgetIndex()Returns the reference index.intgetOriginalIndex()Returns the original index in the source list, before any reranking.StringgetRefType()Returns the reference kind, e.g.StringgetTitle()Returns the reference title.StringgetUrl()Returns the reference URL.StringtoString()
-
-
-
Method Detail
-
getIndex
public int getIndex()
Returns the reference index.- Returns:
- reference index
-
getOriginalIndex
public int getOriginalIndex()
Returns the original index in the source list, before any reranking.- Returns:
- original reference index
-
getRefType
public String getRefType()
Returns the reference kind, e.g."NewsArticle".- Returns:
- reference kind
-
getId
public String getId()
Returns the reference id.- Returns:
- reference id
-
getTitle
public String getTitle()
Returns the reference title. Often empty at the top level — the human-readable title usually lives ingetContent().- Returns:
- reference title
-
getUrl
public String getUrl()
Returns the reference URL. Often empty at the top level — seegetContent().- Returns:
- reference URL
-
getContent
public String getContent()
Returns the full reference payload as sent by the server (source,description,published_at,source_url,source_logo,kind, …), as JSON text. Kept as raw JSON because the field set varies bygetRefType().- Returns:
- full reference payload (JSON text), or
null
-
-