T
- public class HierarchyBuilderRedactionBased<T> extends HierarchyBuilder<T> implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
HierarchyBuilderRedactionBased.Order
Order
|
HierarchyBuilder.Type
Modifier and Type | Method and Description |
---|---|
AttributeType.Hierarchy |
build()
Creates a new hierarchy, based on the predefined specification.
|
AttributeType.Hierarchy |
build(java.lang.String[] data)
Creates a new hierarchy, based on the predefined specification.
|
static <T> HierarchyBuilderRedactionBased<T> |
create(char redactionCharacter)
Values are aligned left-to-right and redacted right-to-left.
|
static <T> HierarchyBuilderRedactionBased<T> |
create(java.io.File file)
Loads a builder specification from the given file.
|
static <T> HierarchyBuilderRedactionBased<T> |
create(HierarchyBuilderRedactionBased.Order alignmentOrder,
HierarchyBuilderRedactionBased.Order redactionOrder,
char redactionCharacter)
Values are aligned according to the alignmentOrder and redacted according to the redactionOrder.
|
static <T> HierarchyBuilderRedactionBased<T> |
create(HierarchyBuilderRedactionBased.Order alignmentOrder,
HierarchyBuilderRedactionBased.Order redactionOrder,
char paddingCharacter,
char redactionCharacter)
Values are aligned according to the alignmentOrder and redacted according to the redactionOrder.
|
static <T> HierarchyBuilderRedactionBased<T> |
create(java.lang.String file)
Loads a builder specification from the given file.
|
HierarchyBuilderRedactionBased.Order |
getAligmentOrder()
Returns the alignment order.
|
java.lang.Double |
getAlphabetSize()
Returns properties about the attribute's domain.
|
java.lang.Double |
getDomainSize()
Returns properties about the attribute's domain.
|
java.lang.Double |
getMaxValueLength()
Returns properties about the attribute's domain.
|
char |
getPaddingCharacter()
Returns the padding character.
|
char |
getRedactionCharacter()
Returns the redaction character.
|
HierarchyBuilderRedactionBased.Order |
getRedactionOrder()
Returns the redaction order.
|
boolean |
isDomainPropertiesAvailable()
Returns whether domain-properties are available for this builder.
|
int[] |
prepare(java.lang.String[] data)
Prepares the builder.
|
void |
setAlphabetSize(int alphabetSize,
int maxValueLength)
Sets properties about the attribute's domain.
|
void |
setDomainAndAlphabetSize(int domainSize,
int alphabetSize,
int maxValueLength)
Sets properties about the attribute's domain.
|
void |
setDomainMetadata(java.lang.String[] data)
Sets properties about the attribute's domain.
|
void |
setDomainSize(int domainSize,
int maxValueLength)
Sets properties about the attribute's domain.
|
getType, save, save
public static <T> HierarchyBuilderRedactionBased<T> create(char redactionCharacter)
T
- redactionCharacter
- public static <T> HierarchyBuilderRedactionBased<T> create(java.io.File file) throws java.io.IOException
T
- file
- java.io.IOException
public static <T> HierarchyBuilderRedactionBased<T> create(HierarchyBuilderRedactionBased.Order alignmentOrder, HierarchyBuilderRedactionBased.Order redactionOrder, char redactionCharacter)
T
- alignmentOrder
- redactionOrder
- redactionCharacter
- public static <T> HierarchyBuilderRedactionBased<T> create(HierarchyBuilderRedactionBased.Order alignmentOrder, HierarchyBuilderRedactionBased.Order redactionOrder, char paddingCharacter, char redactionCharacter)
T
- alignmentOrder
- redactionOrder
- paddingCharacter
- redactionCharacter
- public static <T> HierarchyBuilderRedactionBased<T> create(java.lang.String file) throws java.io.IOException
T
- file
- java.io.IOException
public AttributeType.Hierarchy build()
build
in class HierarchyBuilder<T>
public AttributeType.Hierarchy build(java.lang.String[] data)
build
in class HierarchyBuilder<T>
data
- public HierarchyBuilderRedactionBased.Order getAligmentOrder()
public java.lang.Double getAlphabetSize()
Returns properties about the attribute's domain. Currently, this information is only used for
evaluating information loss with the generalized loss metric for attributes with functional
redaction-based hierarchies. May return null
.
public java.lang.Double getDomainSize()
Returns properties about the attribute's domain. Currently, this information is only used for
evaluating information loss with the generalized loss metric for attributes with functional
redaction-based hierarchies. May return null
.
public java.lang.Double getMaxValueLength()
Returns properties about the attribute's domain. Currently, this information is only used for
evaluating information loss with the generalized loss metric for attributes with functional
redaction-based hierarchies. May return null
.
public char getPaddingCharacter()
public char getRedactionCharacter()
public HierarchyBuilderRedactionBased.Order getRedactionOrder()
public boolean isDomainPropertiesAvailable()
public int[] prepare(java.lang.String[] data)
prepare
in class HierarchyBuilder<T>
data
- public void setAlphabetSize(int alphabetSize, int maxValueLength)
Sets properties about the attribute's domain. Currently, this information is only used for evaluating information loss with the generalized loss metric for attributes with functional redaction-based hierarchies. Required properties are:
As a simplifying assumption, it is assumed that the domain values are distributed equally regarding their length and their characters from the alphabet.
This method will estimate the size of the domain as domainSize = alphabetSize^{maxValueLength}
alphabetSize
- maxValueLength
- public void setDomainAndAlphabetSize(int domainSize, int alphabetSize, int maxValueLength)
Sets properties about the attribute's domain. Currently, this information is only used for evaluating information loss with the generalized loss metric for attributes with functional redaction-based hierarchies. Required properties are:
domainSize
- alphabetSize
- maxValueLength
- public void setDomainMetadata(java.lang.String[] data)
Sets properties about the attribute's domain. Currently, this information is only used for evaluating information loss with the generalized loss metric for attributes with functional redaction-based hierarchies.
data
- public void setDomainSize(int domainSize, int maxValueLength)
Sets properties about the attribute's domain. Currently, this information is only used for evaluating information loss with the generalized loss metric for attributes with functional redaction-based hierarchies. Required properties are:
As a simplifying assumption, it is assumed that the domain values are distributed equally regarding their length and their characters from the alphabet.
This method will estimate the size of the alphabet as alphabetSize = pow(domainSize, 1.0d / maxValueLength)
domainSize
- maxValueLength
-