public class DataRecord
extends java.util.Hashtable<java.lang.Object,java.lang.Object>
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DATARECORD
Used to identify a data record in an extractor pattern to be used with sub-extractor patterns.
|
static org.apache.log4j.Logger |
log
Used for logging.
|
| Constructor and Description |
|---|
DataRecord() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
get(java.lang.Object key)
Returns the value currently associated with the given key
|
boolean |
getAppliedWhitespaceTidyingOnExtraction()
Returns whether or not we applied whitespace tidying when making this data record
|
int |
getEndMatch()
Gets the end location the extractor for this data record matched at.
|
java.lang.String |
getFullMatchedString(RunningScrapeableFile scrapeableFile)
Gets the matched portion of the given string.
|
java.lang.String |
getFullMatchedString(java.lang.String extractedText)
Gets the matched portion of the given string.
|
java.util.Iterator<java.lang.Object> |
getOrderedKeysIterator()
We override this so that we can avoid cryptic errors on the front-end.
|
int |
getStartMatch()
Gets the start location the extractor for this data record matched at.
|
int |
hashCode()
A hashcode for the current DataRecord, which doesn't change based on the values in the DataRecord
|
void |
keepFields(java.util.Set<java.lang.String> fieldsToKeep)
Removes fields from the data set that are not contained in the supplied set.
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Puts the given key value pair in the DataRecord
|
java.lang.Object |
remove(java.lang.Object key)
Removes the specified key and associated value from the DataRecord
|
void |
setAppliedWhitespaceTidyingOnExtraction(boolean appliedWhitespaceTidyingOnExtraction)
Sets whether or not we applied whitespace tidying when making this data record
|
void |
setEndMatch(int endMatch)
Sets the end location the extractor for this data record matched at.
|
void |
setStartMatch(int startMatch)
Sets the start location the extractor for this data record matched at.
|
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, getOrDefault, isEmpty, keys, keySet, merge, putAll, putIfAbsent, rehash, remove, replace, replace, replaceAll, size, toString, valuespublic static org.apache.log4j.Logger log
public static final java.lang.String DATARECORD
@NotNull public java.util.Iterator<java.lang.Object> getOrderedKeysIterator()
@Nullable public java.lang.Object put(@NotNull java.lang.Object key, @Nullable java.lang.Object value)
put in interface java.util.Map<java.lang.Object,java.lang.Object>put in class java.util.Hashtable<java.lang.Object,java.lang.Object>key - The key to insertvalue - The value to set@Nullable public java.lang.Object get(@NotNull java.lang.Object key)
get in interface java.util.Map<java.lang.Object,java.lang.Object>get in class java.util.Hashtable<java.lang.Object,java.lang.Object>key - The key to getpublic java.lang.Object remove(@NotNull java.lang.Object key)
remove in interface java.util.Map<java.lang.Object,java.lang.Object>remove in class java.util.Hashtable<java.lang.Object,java.lang.Object>key - The key to removepublic void keepFields(@NotNull java.util.Set<java.lang.String> fieldsToKeep)
fieldsToKeep - A Set of field identifiers.public int hashCode()
hashCode in interface java.util.Map<java.lang.Object,java.lang.Object>hashCode in class java.util.Hashtable<java.lang.Object,java.lang.Object>@InternalOnly public int getStartMatch()
com.screenscraper.util.General.stripUnnecessaryWhiteSpace(String text) method.@InternalOnly public void setStartMatch(int startMatch)
startMatch - The start location of the match@InternalOnly public int getEndMatch()
com.screenscraper.util.General.stripUnnecessaryWhiteSpace(String text) method.@InternalOnly public void setEndMatch(int endMatch)
com.screenscraper.util.General.stripUnnecessaryWhiteSpace(String text) method.endMatch - The end location of the match@InternalOnly public boolean getAppliedWhitespaceTidyingOnExtraction()
@InternalOnly public void setAppliedWhitespaceTidyingOnExtraction(boolean appliedWhitespaceTidyingOnExtraction)
appliedWhitespaceTidyingOnExtraction - Whether or not we applied whitespace tidying when making this data record@NotNull public java.lang.String getFullMatchedString(java.lang.String extractedText)
extractedText - The text that the data in this data record was extracted from@NotNull @InternalOnly public java.lang.String getFullMatchedString(@NotNull RunningScrapeableFile scrapeableFile)
scrapeableFile - The scrapeableFile that the data in this data record was extracted from