@OperatorGeneratorCharacteristics(maximumArgumentCount=2, minimumArgumentCount=2, name="TCLOSE", signature={EXPRESSION,STRING}) @MonoRelationOperator public abstract class TCLOSE extends RelationalOperator
Constructor and Description |
---|
TCLOSE() |
Modifier and Type | Method and Description |
---|---|
static Relation |
computeTClose(Relation relation,
java.util.Map<NameIdentifier,NameIdentifier> matchby)
Computes the closure.
|
static TCLOSE_RELATION |
getInstance(Heading heading1,
java.util.LinkedList<NameIdentifier> nameIdentifiersInEntryOrder)
Gets an instance of the TCLOSE operator implementation for the given parameters
|
static TCLOSE_RELATION |
getInstance(Heading heading,
java.util.Map<NameIdentifier,NameIdentifier> mappingFromAttributeNameIdentifierList)
Gets an instance of the TCLOSE operator implementation for the given parameters
|
static java.util.Map<NameIdentifier,NameIdentifier> |
getMappingFromAttributeNameIdentifierList(java.util.LinkedList<NameIdentifier> nameIdentifiersInEntryOrder)
Gets a "from-to" mapping built from the given list which is constructed as from1,to1,from2,to2, ...
|
TCLOSE_RELATION |
getOperatorImplementation(OperatorGeneratorArgument[] args)
Gets an implementation instance of the operator.
|
getInvocationName, getMaximumArgumentCount, getMinimumArgumentCount, getName, getOperatorGeneratorSignature, isMonoRelationOperator, toString
public static Relation computeTClose(Relation relation, java.util.Map<NameIdentifier,NameIdentifier> matchby) throws EvaluationException
relation
- a relation to be subjected to a transitive closure operationmatchby
- the mapping of which attributes match to which in determining pairs of tuples to apply the transitive operation toEvaluationException
- If an invalid invocation was attempted. The getCause() exception will reveal more detail about the nature of the problem.public static TCLOSE_RELATION getInstance(Heading heading1, java.util.LinkedList<NameIdentifier> nameIdentifiersInEntryOrder) throws AttributeListNotEvenSizedException, DuplicateNameException, DuplicateClosureAttributeException, ClosureAttributesOmittedException, NonExistingAttributeException, IncompatibleClosureTypesException
heading1
- The heading of the input relation to be TCLOSEdnameIdentifiersInEntryOrder
- The in-order spec of the TCLOSE operation : pa1,ca1,pa2,ca2, ... where each pa is a "parent" attribute such that (pa1,pa2,...) is an identifier for a "parent" entity occurrence and each ca is a "child" attribute such that (ca1,ca2,...) is an identifier for a "child" entity occurrence.AttributeListNotEvenSizedException
- If the list is not even-sized, such that it cannot possibly represent a list of name pairsDuplicateNameException
- If any of the first elements of a name pair are mentioned twiceIncompatibleClosureTypesException
- If an attribute is mapped for comparison with a non-compatible oneNonExistingAttributeException
- If an attribute named in the closure spec is not part of the headingClosureAttributesOmittedException
- If not all attributes of the heading have been specified either as a "from" or as a "to" attribute in the closure specDuplicateClosureAttributeException
- If an attribute is mentioned twice in the closure specpublic static TCLOSE_RELATION getInstance(Heading heading, java.util.Map<NameIdentifier,NameIdentifier> mappingFromAttributeNameIdentifierList) throws DuplicateClosureAttributeException, ClosureAttributesOmittedException, NonExistingAttributeException, IncompatibleClosureTypesException
heading
- the heading of the relation to be TCLOSEdmappingFromAttributeNameIdentifierList
- the specification of the parent/child attribute matching used by the closureIncompatibleClosureTypesException
- If an attribute is mapped for comparison with a non-compatible oneNonExistingAttributeException
- If an attribute named in the closure spec is not part of the headingClosureAttributesOmittedException
- If not all attributes of the heading have been specified either as a "from" or as a "to" attribute in the closure specDuplicateClosureAttributeException
- If an attribute is mentioned twice in the closure specpublic static java.util.Map<NameIdentifier,NameIdentifier> getMappingFromAttributeNameIdentifierList(java.util.LinkedList<NameIdentifier> nameIdentifiersInEntryOrder) throws AttributeListNotEvenSizedException, DuplicateNameException
nameIdentifiersInEntryOrder
- The given list from which a "from-to" mapping is to be built. The list is in from1,to1,from2,to2,... orderAttributeListNotEvenSizedException
- If the list is not even-sized, such that it cannot possibly represent a list of name pairsDuplicateNameException
- If any of the first elements of a name pair are mentioned twicepublic final TCLOSE_RELATION getOperatorImplementation(OperatorGeneratorArgument[] args) throws NotFoundException
OperatorGenerator
args
- The arguments from which the instance is to be created. There must be exactly as many arguments as there are elements in the list returned from OperatorGenerator.getOperatorGeneratorSignature()
. The correspondence between OperatorGeneratorArgumentType
values and OperatorGeneratorArgument
types is given in the table below :
NotFoundException
- If the given OperatorGeneratorArguments do not satisfy all of the rules of the OperatorGenerator. These rules are specific to each OperatorGenerator.