public static class SPOStarJoin.SPOStarConstraint extends Object implements IStarJoin.IStarConstraint<ISPO>, Serializable
Modifier and Type | Field and Description |
---|---|
protected IVariableOrConstant<IV> |
o
Variable or constant O for the constraint.
|
protected boolean |
optional
Is the constraint optional or non-optional.
|
protected IVariableOrConstant<IV> |
p
Variable or constant P for the constraint.
|
Constructor and Description |
---|
SPOStarJoin.SPOStarConstraint(IVariableOrConstant<IV> p,
IVariableOrConstant<IV> o)
Construct a non-optional SPO star constraint using the supplied P and
O.
|
SPOStarJoin.SPOStarConstraint(IVariableOrConstant<IV> p,
IVariableOrConstant<IV> o,
boolean optional)
Fully specified ctor.
|
Modifier and Type | Method and Description |
---|---|
IStarJoin.IStarConstraint<ISPO> |
asBound(IBindingSet bindingSet)
Return an as-bound version of this SPO star constraint for the
supplied binding set.
|
void |
bind(IBindingSet bs,
ISPO spo)
Use the supplied SPO to create variable bindings for supplied
binding set.
|
int |
getNumVars()
Return the number of variables used in this star constraint.
|
boolean |
isMatch(ISPO spo)
Tests the P and O of the supplied SPO against the constraint.
|
boolean |
isOptional()
Return true if this star constraint is optional.
|
IVariableOrConstant<IV> |
o() |
IVariableOrConstant<IV> |
p() |
String |
toString() |
String |
toString(IBindingSet bindingSet) |
protected final IVariableOrConstant<IV> p
protected final IVariableOrConstant<IV> o
protected final boolean optional
public SPOStarJoin.SPOStarConstraint(IVariableOrConstant<IV> p, IVariableOrConstant<IV> o)
p
- o
- public SPOStarJoin.SPOStarConstraint(IVariableOrConstant<IV> p, IVariableOrConstant<IV> o, boolean optional)
p
- o
- optional
- public final IVariableOrConstant<IV> p()
public final IVariableOrConstant<IV> o()
public final boolean isOptional()
IStarJoin.IStarConstraint
isOptional
in interface IStarJoin.IStarConstraint<ISPO>
public final int getNumVars()
IStarJoin.IStarConstraint
getNumVars
in interface IStarJoin.IStarConstraint<ISPO>
public final boolean isMatch(ISPO spo)
isMatch
in interface IStarJoin.IStarConstraint<ISPO>
spo
- the element to testpublic final void bind(IBindingSet bs, ISPO spo)
bind
in interface IStarJoin.IStarConstraint<ISPO>
bs
- the binding set to modifyspo
- the element from which to pull variable bindingspublic IStarJoin.IStarConstraint<ISPO> asBound(IBindingSet bindingSet)
asBound
in interface IStarJoin.IStarConstraint<ISPO>
bindingSet
- the binding set from which to pull variable bindingspublic String toString(IBindingSet bindingSet)
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.