public class BaseSchema extends Object implements Schema, CsvAwareSchema
Constructor and Description |
---|
BaseSchema() |
Modifier and Type | Method and Description |
---|---|
void |
addExtractableField(String label,
String jsonPath)
Add a single field to the map of extractable fields.
|
BaseSchema |
addField(JsonBranch branch) |
BaseSchema |
addField(String fieldName) |
BaseSchema |
addFields(String... fields) |
List<Category> |
getCategories() |
List<JsonBranch> |
getCollectionPaths()
Return collection paths.
|
Map<String,String> |
getExtractableFields()
Get fields for which the values should be extracted from the records.
|
List<FieldGroup> |
getFieldGroups()
Field groups used in completeness sub-dimensions.
|
Format |
getFormat() |
List<String> |
getHeader() |
List<String> |
getNoLanguageFields()
List of field which can be skipped in the language extraction.
|
JsonBranch |
getPathByLabel(String label)
Returns a path by its label.
|
List<JsonBranch> |
getPaths()
The list of fields to investigate in most of the measurements.
|
List<JsonBranch> |
getRootChildrenPaths()
Return the paths of root's direct children.
|
List<RuleChecker> |
getRuleCheckers() |
Map<String,String> |
getSolrFields()
Map of fields covered in TF-IDF extraction.
|
void |
setExtractableFields(Map<String,String> extractableFields)
Set the extractable fields.
|
BaseSchema |
setFormat(Format format) |
String |
toString() |
public BaseSchema addField(JsonBranch branch)
public BaseSchema addField(String fieldName)
public BaseSchema addFields(String... fields)
public BaseSchema setFormat(Format format)
public List<JsonBranch> getCollectionPaths()
Schema
getCollectionPaths
in interface Schema
public List<JsonBranch> getRootChildrenPaths()
Schema
getRootChildrenPaths
in interface Schema
public List<JsonBranch> getPaths()
Schema
public JsonBranch getPathByLabel(String label)
Schema
getPathByLabel
in interface Schema
label
- The label to look for.public List<FieldGroup> getFieldGroups()
Schema
getFieldGroups
in interface Schema
public List<String> getNoLanguageFields()
Schema
getNoLanguageFields
in interface Schema
public Map<String,String> getSolrFields()
Schema
solrFields.put("Proxy/dc:title", "dc_title_txt");
getSolrFields
in interface Schema
public Map<String,String> getExtractableFields()
Schema
getExtractableFields
in interface Schema
public void setExtractableFields(Map<String,String> extractableFields)
Schema
setExtractableFields
in interface Schema
extractableFields
- The extractable fields.Schema.getExtractableFields()
public void addExtractableField(String label, String jsonPath)
Schema
addExtractableField
in interface Schema
label
- The label of the field.jsonPath
- JSON path expression.public List<Category> getCategories()
getCategories
in interface Schema
public List<RuleChecker> getRuleCheckers()
getRuleCheckers
in interface Schema
public List<String> getHeader()
getHeader
in interface CsvAwareSchema
Copyright © 2020. All rights reserved.