public class PropositionValueColumnSpec extends AbstractTableColumnSpec
InequalityNumberValues for which
a comparison between the inequality number and another number is not
possible, we convert to NumberValues before comparison. For example,
given two numbers
< 4 and
3, we convert
< 4 to
4 before aggregation because otherwise the two numbers are not
comparable.| Modifier and Type | Class and Description |
|---|---|
static class |
PropositionValueColumnSpec.Type |
| Constructor and Description |
|---|
PropositionValueColumnSpec(Link[] links,
PropositionValueColumnSpec.Type aggregationType) |
PropositionValueColumnSpec(String columnNamePrefixOverride,
Link[] links,
PropositionValueColumnSpec.Type aggregationType) |
| Modifier and Type | Method and Description |
|---|---|
String[] |
columnNames(KnowledgeSource knowledgeSource)
Gets the names of the columns representing one instance of a
proposition or property.
|
void |
columnValues(String key,
Proposition proposition,
Map<Proposition,List<Proposition>> forwardDerivations,
Map<Proposition,List<Proposition>> backwardDerivations,
Map<UniqueId,Proposition> references,
KnowledgeSourceCache ksCache,
TabularWriter writer)
Gets the values of the specified propositions or properties for
one row of data.
|
boolean |
equals(Object obj) |
String |
getColumnNamePrefixOverride() |
String[] |
getInferredPropositionIds(KnowledgeSource knowledgeSource,
String[] inPropIds)
Infers the ids of the propositions corresponding to the contents of this
column.
|
Link[] |
getLinks() |
PropositionValueColumnSpec.Type |
getType() |
int |
hashCode() |
void |
setType(PropositionValueColumnSpec.Type type) |
void |
validate(KnowledgeSource knowledgeSource)
Validates the fields of this column specification against the
knowledge source.
|
public PropositionValueColumnSpec(Link[] links, PropositionValueColumnSpec.Type aggregationType)
public PropositionValueColumnSpec(String columnNamePrefixOverride, Link[] links, PropositionValueColumnSpec.Type aggregationType)
public void columnValues(String key, Proposition proposition, Map<Proposition,List<Proposition>> forwardDerivations, Map<Proposition,List<Proposition>> backwardDerivations, Map<UniqueId,Proposition> references, KnowledgeSourceCache ksCache, TabularWriter writer) throws TabularWriterException
TableColumnSpeckey - a key id String.proposition - a List for the specified
key with the specified proposition id.TabularWriterExceptionpublic String[] columnNames(KnowledgeSource knowledgeSource) throws KnowledgeSourceReadException
TableColumnSpecknowledgeSource - the active KnowledgeSource.String[] of column names.KnowledgeSourceReadException - if an attempt at reading from
the knowledge source failed.public void validate(KnowledgeSource knowledgeSource) throws TableColumnSpecValidationFailedException, KnowledgeSourceReadException
TableColumnSpecknowledgeSource - a KnowledgeSource. Guaranteed not
null.KnowledgeSourceReadException - if the knowledge source could
not be read.TableColumnSpecValidationFailedExceptionpublic PropositionValueColumnSpec.Type getType()
public void setType(PropositionValueColumnSpec.Type type)
public Link[] getLinks()
public String getColumnNamePrefixOverride()
public String[] getInferredPropositionIds(KnowledgeSource knowledgeSource, String[] inPropIds) throws KnowledgeSourceReadException
TableColumnSpecStrings. Guaranteed not
null.KnowledgeSourceReadExceptionCopyright © 2012–2017 Emory University. All rights reserved.