public class LinkSpecification extends Object implements ILinkSpecification
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ADD |
protected static String |
AND |
protected String |
atomicMeasure |
protected List<LinkSpecification> |
children |
protected List<LinkSpecification> |
dependencies |
protected String |
filterExpression |
protected String |
fullExpression |
protected static String |
MAX |
protected static String |
MIN |
protected static String |
MINUS |
protected LogicOperator |
operator |
protected static String |
OR |
protected LinkSpecification |
parent |
protected String |
prop1 |
protected String |
prop2 |
protected double |
quality |
protected double |
threshold |
protected String |
treePath |
protected static String |
XOR |
| Constructor and Description |
|---|
LinkSpecification() |
LinkSpecification(String measure,
double threshold)
Creates a spec with a measure read inside
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(LinkSpecification spec)
Adds a child to the current node of the spec
|
void |
addDependency(LinkSpecification spec)
Adds a child to the current node of the spec
|
LinkSpecification |
clone()
Generates a clone of the current spec
|
int |
compareTo(Object o) |
boolean |
containsRedundantProperties()
Checks of at least two leaves compare the same properties, possibly with
different measures though.
|
boolean |
equals(Object other) |
List<LinkSpecification> |
getAllLeaves()
Returns all leaves of the link spec
|
String |
getAtomicMeasure() |
List<LinkSpecification> |
getChildren() |
List<LinkSpecification> |
getDependencies() |
int |
getDepth() |
String |
getFilterExpression() |
String |
getFullExpression() |
double |
getLowThreshold() |
String |
getMeasure() |
LogicOperator |
getOperator() |
LinkSpecification |
getParent() |
String |
getProperty1() |
String |
getProperty2() |
double |
getQuality() |
String |
getShortendFilterExpression() |
double |
getThreshold() |
String |
getTreePath() |
boolean |
hasDependencies()
Checks whether a spec has dependencies
|
int |
hashCode()
Computes a hashCode for the current spec
|
boolean |
isAtomic() |
boolean |
isEmpty() |
boolean |
isRoot()
Checks whether the current node is the root of the whole spec
|
void |
pathOfAtomic()
Create the path of operators for each leaf spec
|
void |
readSpec(String spec,
double theta)
Reads a spec expression into its canonical form Don't forget to optimize
the filters by checking (if threshold_left and threshold_right grater
than or equal to theta, then theta = 0)
|
void |
removeDependency(LinkSpecification spec)
Removes a dependency from the list of dependencies
|
void |
setAtomicFilterExpression(String atomicMeasure,
String prop1,
String prop2) |
void |
setAtomicMeasure(String atomicMeasure) |
void |
setChildren(List<LinkSpecification> children) |
void |
setDependencies(List<LinkSpecification> dependencies) |
void |
setFullExpression(String fullExpression) |
LinkSpecification |
setLeaf(LinkSpecification leaf,
int n) |
void |
setLowThreshold(double lowThreshold) |
void |
setOperator(LogicOperator operator) |
void |
setParent(LinkSpecification parent) |
void |
setQuality(double quality) |
void |
setThreshold(double threshold) |
void |
setTreePath(String treePath) |
int |
size()
Returns size of the spec, i.e., 1 for atomic spec, 0 for empty spec and
else 1 + sum of size of all children
|
String |
toString() |
String |
toStringOneLine() |
String |
toStringPretty() |
protected static final String MAX
protected static final String OR
protected static final String ADD
protected static final String MINUS
protected static final String XOR
protected static final String MIN
protected static final String AND
protected double threshold
protected LogicOperator operator
protected List<LinkSpecification> children
protected List<LinkSpecification> dependencies
protected String filterExpression
protected LinkSpecification parent
protected double quality
protected String atomicMeasure
protected String prop1
protected String prop2
protected String treePath
protected String fullExpression
public LinkSpecification()
public LinkSpecification(String measure, double threshold)
measure - String representation of the specthreshold - of the specpublic String getTreePath()
public void setTreePath(String treePath)
public void setAtomicFilterExpression(String atomicMeasure, String prop1, String prop2)
public void addChild(LinkSpecification spec)
spec - to be addedpublic void addDependency(LinkSpecification spec)
spec - to be addedpublic void removeDependency(LinkSpecification spec)
spec - Input specpublic boolean hasDependencies()
public boolean isEmpty()
public boolean isAtomic()
public void pathOfAtomic()
public void readSpec(String spec, double theta)
spec - expression to readtheta - Global thresholdpublic List<LinkSpecification> getAllLeaves()
public LinkSpecification setLeaf(LinkSpecification leaf, int n)
public int size()
public int hashCode()
public LinkSpecification clone()
clone in interface Clonable<ILinkSpecification>clone in class Objectpublic String toString()
public int getDepth()
public String toStringPretty()
public String toStringOneLine()
public boolean isRoot()
public String getMeasure()
public int compareTo(Object o)
compareTo in interface ILinkSpecificationpublic String getShortendFilterExpression()
public String getFilterExpression()
public String getAtomicMeasure()
public void setAtomicMeasure(String atomicMeasure)
atomicMeasure - the atomicMeasure to setpublic boolean containsRedundantProperties()
public double getThreshold()
public void setThreshold(double threshold)
public LogicOperator getOperator()
public void setOperator(LogicOperator operator)
public List<LinkSpecification> getChildren()
public void setChildren(List<LinkSpecification> children)
public List<LinkSpecification> getDependencies()
public void setDependencies(List<LinkSpecification> dependencies)
public String getFullExpression()
public void setFullExpression(String fullExpression)
public LinkSpecification getParent()
public void setParent(LinkSpecification parent)
public String getProperty1()
public String getProperty2()
public double getQuality()
public void setQuality(double quality)
public double getLowThreshold()
public void setLowThreshold(double lowThreshold)
Copyright © 2020. All rights reserved.