public final class SearchFields extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BNODE_ID_PREFIX
String used to prefix BNode IDs with so that we can distinguish BNode fields from URI fields in Documents.
|
static String |
CONTEXT_FIELD_NAME
The name of the Document field holding the context identifer(s).
|
static String |
CONTEXT_NULL
the null context
|
static Pattern |
HIGHLIGHTER_PATTERN |
static String |
HIGHLIGHTER_POST_TAG |
static String |
HIGHLIGHTER_PRE_TAG |
static String |
ID_FIELD_NAME
The name of the Document field holding the document identifier.
|
static String |
TEXT_FIELD_NAME
The name of the Document field that holds multiple text values of a Resource.
|
static String |
URI_FIELD_NAME
The name of the Document field holding the Resource identifier.
|
Modifier and Type | Method and Description |
---|---|
static Resource |
createContext(String idString) |
static Resource |
createResource(String idString)
Parses an id-string (a serialized resource) back to a resource Inverse method of
getResourceID |
static Literal |
distanceToLiteral(double d) |
static String |
formIdString(String resourceId,
String contextId) |
static String |
getContextID(Resource resource)
Get the ID for a context.
|
static String |
getLiteralPropertyValueAsString(Statement statement) |
static String |
getPropertyField(IRI property) |
static String |
getResourceID(Resource resource)
Returns the String ID corresponding with the specified Resource.
|
static String |
getSnippet(String highlightedValue) |
static boolean |
isPropertyField(String fieldName)
Determines whether the specified field name is a property field name.
|
static Literal |
scoreToLiteral(float score)
Returns a score value encoded as a Literal.
|
static Literal |
wktToLiteral(String wkt) |
public static final String ID_FIELD_NAME
public static final String URI_FIELD_NAME
public static final String TEXT_FIELD_NAME
#addPropertyFields(String, String, Document)
public static final String CONTEXT_FIELD_NAME
public static final String CONTEXT_NULL
public static final String BNODE_ID_PREFIX
public static final String HIGHLIGHTER_PRE_TAG
public static final String HIGHLIGHTER_POST_TAG
public static final Pattern HIGHLIGHTER_PATTERN
public static String getResourceID(Resource resource)
public static String getContextID(Resource resource)
resource
- the contextpublic static Resource createResource(String idString)
getResourceID
idString
- public static String getLiteralPropertyValueAsString(Statement statement)
public static boolean isPropertyField(String fieldName)
public static Literal scoreToLiteral(float score)
score
- the float score to convertpublic static Literal distanceToLiteral(double d)
Copyright © 2015-2019 Eclipse Foundation. All Rights Reserved.