public class PBody
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
VIRTUAL_VARIABLE_PREFIX |
Modifier and Type | Method and Description |
---|---|
java.util.Map<PVariable,java.util.Set<TypeJudgement>> |
getAllUnaryTypeRestrictions(IQueryMetaContext context)
All unary input keys directly prescribed by constraints, grouped by variable.
|
java.util.Set<PVariable> |
getAllVariables() |
java.util.Set<PConstraint> |
getConstraints() |
<ConstraintType> |
getConstraintsOfType(java.lang.Class<ConstraintType> constraintClass) |
PDisjunction |
getContainerDisjunction()
Returns the disjunction the body is contained with.
|
PVariable |
getOrCreateVariableByName(java.lang.String name)
Finds and returns a PVariable by name.
|
PQuery |
getPattern() |
java.util.List<ExportedParameter> |
getSymbolicParameters()
Returns the exported parameter constraints of the body.
|
java.util.List<PVariable> |
getSymbolicParameterVariables()
Returns the symbolic parameters of the body.
|
java.util.Set<PVariable> |
getUniqueVariables() |
PVariable |
getVariableByNameChecked(java.lang.Object name)
Find a PVariable by name
|
boolean |
isMutable() |
PVariable |
newConstantVariable(java.lang.Object value) |
PVariable |
newVirtualVariable() |
PVariable |
newVirtualVariable(java.lang.String name) |
void |
setContainerDisjunction(PDisjunction containerDisjunction) |
void |
setExportedParameters(java.util.List<ExportedParameter> symbolicParameters)
Deprecated.
Use
#setSymbolicParameters(List instead |
void |
setStatus(PQuery.PQueryStatus status)
Sets a specific status for the body.
|
void |
setSymbolicParameters(java.util.List<ExportedParameter> symbolicParameters)
Sets the exported parameter constraints of the body, if this instance is mutable.
|
public static final java.lang.String VIRTUAL_VARIABLE_PREFIX
public PBody(PQuery query)
public <ConstraintType> java.util.Set<ConstraintType> getConstraintsOfType(java.lang.Class<ConstraintType> constraintClass)
public PVariable newVirtualVariable()
public PVariable newVirtualVariable(java.lang.String name)
public PVariable newConstantVariable(java.lang.Object value)
public java.util.Set<PVariable> getAllVariables()
public java.util.Set<PVariable> getUniqueVariables()
public PVariable getVariableByNameChecked(java.lang.Object name) throws java.lang.IllegalArgumentException
name
- java.lang.IllegalArgumentException
- if no PVariable is found with the selected namepublic PVariable getOrCreateVariableByName(java.lang.String name)
name
- public java.util.Set<PConstraint> getConstraints()
public PQuery getPattern()
public java.util.List<PVariable> getSymbolicParameterVariables()
Warning: if two PVariables are unified, the returned list changes. If you want to have a stable
version, consider using getSymbolicParameters()
.
public java.util.List<ExportedParameter> getSymbolicParameters()
public void setExportedParameters(java.util.List<ExportedParameter> symbolicParameters)
#setSymbolicParameters(List)
insteadpublic void setSymbolicParameters(java.util.List<ExportedParameter> symbolicParameters)
symbolicParameters
- the new valuepublic void setStatus(PQuery.PQueryStatus status)
status
- the status to setpublic boolean isMutable()
public PDisjunction getContainerDisjunction()
canonical disjunction of the corresponding query
or something equivalent.public void setContainerDisjunction(PDisjunction containerDisjunction)
containerDisjunction
- the containerDisjunction to setpublic java.util.Map<PVariable,java.util.Set<TypeJudgement>> getAllUnaryTypeRestrictions(IQueryMetaContext context)
to supertype inference or subsumption applied at this point.