Package uk.gov.gchq.gaffer.sketches
Class CardinalityEntityGenerator<T>
- java.lang.Object
-
- uk.gov.gchq.gaffer.sketches.CardinalityEntityGenerator<T>
-
- All Implemented Interfaces:
Function<Iterable<? extends Element>,Iterable<? extends Element>>
,ElementGenerator<Element>
,OneToManyElementGenerator<Element>
- Direct Known Subclasses:
HllSketchEntityGenerator
,HyperLogLogPlusEntityGenerator
public abstract class CardinalityEntityGenerator<T> extends Object implements OneToManyElementGenerator<Element>
ACardinalityEntityGenerator
is an abstract Generator for generating cardinality Entities for each end of an Edge.
-
-
Constructor Summary
Constructors Constructor Description CardinalityEntityGenerator()
-
Method Summary
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface uk.gov.gchq.gaffer.data.generator.OneToManyElementGenerator
apply
-
-
-
-
Method Detail
-
_apply
public Iterable<Element> _apply(Element element)
- Specified by:
_apply
in interfaceOneToManyElementGenerator<T>
- Parameters:
element
- the domain object to convert- Returns:
- the generated
Iterable
ofElement
s
-
setPropertiesToCopy
public void setPropertiesToCopy(Collection<String> propertiesToCopy)
Copies the properties from the edge to the new entities.
IMPORTANT - it does not clone the property values. You could end up with an object being shared between multiple elements.
- Parameters:
propertiesToCopy
- the properties to copy from the edge
-
propertyToCopy
public CardinalityEntityGenerator propertyToCopy(String propertyToCopy)
-
propertiesToCopy
public CardinalityEntityGenerator propertiesToCopy(String... propertiesToCopy)
Copies the properties from the edge to the new entities.
IMPORTANT - it does not clone the property values. You could end up with an object being shared between multiple elements.
- Parameters:
propertiesToCopy
- the properties to copy from the edge- Returns:
- this
-
getGroup
public String getGroup()
-
setGroup
public void setGroup(String group)
-
group
public CardinalityEntityGenerator group(String group)
-
getCardinalityPropertyName
public String getCardinalityPropertyName()
-
setCardinalityPropertyName
public void setCardinalityPropertyName(String cardinalityPropertyName)
-
cardinalityPropertyName
public CardinalityEntityGenerator cardinalityPropertyName(String cardinalityPropertyName)
-
getCountProperty
public String getCountProperty()
-
setCountProperty
public void setCountProperty(String countProperty)
-
countProperty
public CardinalityEntityGenerator countProperty(String countProperty)
-
getEdgeGroupProperty
public String getEdgeGroupProperty()
-
setEdgeGroupProperty
public void setEdgeGroupProperty(String edgeGroupProperty)
-
edgeGroupProperty
public CardinalityEntityGenerator edgeGroupProperty(String edgeGroupProperty)
-
-