@Override
public RVI getRVI(ReadGraph graph, Variable variable) throws DatabaseException {
- Databoard databoard = graph.getService( Databoard.class );
- Binding rviBinding = databoard.getBindingUnchecked( RVI.class );
if(Variables.isContext(graph, variable)) {
+ Databoard databoard = graph.getService( Databoard.class );
+ Binding rviBinding = databoard.getBindingUnchecked( RVI.class );
return RVI.empty( rviBinding );
} else {
Variable parent = variable.getParent(graph);
@Override
public RVI getPossibleRVI(ReadGraph graph, Variable variable) throws DatabaseException {
- Databoard databoard = graph.getService( Databoard.class );
- Binding rviBinding = databoard.getBindingUnchecked( RVI.class );
if(Variables.isContext(graph, variable)) {
+ Databoard databoard = graph.getService( Databoard.class );
+ Binding rviBinding = databoard.getBindingUnchecked( RVI.class );
return RVI.empty( rviBinding );
} else {
Variable parent = variable.getParent(graph);
Binding rviBinding = databoard.getBindingUnchecked( RVI.class );
return RVI.empty(rviBinding);
}
- Variable base = variable.getParent(graph);
- while(!isRVIBase(graph, base)) base = base.getParent(graph);
- RVIPart part = getRVIPart(graph, variable);
- return new RVIBuilder(base.getRVI(graph)).append(part).toRVI();
+ else {
+ Variable base = variable.getParent(graph);
+ while(!isRVIBase(graph, base)) base = base.getParent(graph);
+ RVIPart part = getRVIPart(graph, variable);
+ return new RVIBuilder(base.getRVI(graph)).append(part).toRVI();
+ }
}
@Override
Binding rviBinding = databoard.getBindingUnchecked( RVI.class );
return RVI.empty(rviBinding);
}
- Variable base = variable.getParent(graph);
- if(base == null) return null;
- while(!isRVIBase(graph, base)) {
- base = base.getParent(graph);
+ else {
+ Variable base = variable.getParent(graph);
if(base == null) return null;
+ while(!isRVIBase(graph, base)) {
+ base = base.getParent(graph);
+ if(base == null) return null;
+ }
+ RVIPart part = getRVIPart(graph, variable);
+ if(part == null) return null;
+ RVI baseRVI = base.getPossibleRVI(graph);
+ if(baseRVI == null) return null;
+ return new RVIBuilder(baseRVI).append(part).toRVI();
}
- RVIPart part = getRVIPart(graph, variable);
- if(part == null) return null;
- return new RVIBuilder(base.getRVI(graph)).append(part).toRVI();
}
protected boolean isPartOfComponentType(ReadGraph graph, Resource resource)