private List<Range> getRange(final ElementId elementId, final GraphFilters operation, final SeededGraphFilters.IncludeIncomingOutgoingType inOutType) throws RangeFactoryException { if (elementId instanceof EntityId) { return getRange(((EntityId) elementId).getVertex(), operation, operation.getView().hasEdges()); } else { final EdgeId edgeId = (EdgeId) elementId; final List<Range> ranges = new ArrayList<>(); if (operation.getView().hasEdges() && DirectedType.areCompatible(operation.getDirectedType(), edgeId.getDirectedType())) { // EQUALS and RELATED seed matching. final DirectedType directed = DirectedType.and(operation.getDirectedType(), edgeId.getDirectedType()); ranges.addAll(getRange(edgeId.getSource(), edgeId.getDestination(), directed, operation, inOutType)); } // Do related - if operation doesn't have seed matching or it has seed matching equal to RELATED final boolean doRelated = !(operation instanceof SeedMatching) || !SeedMatching.SeedMatchingType.EQUAL.equals(((SeedMatching) operation).getSeedMatching()); if (doRelated && operation.getView().hasEntities()) { // Get Entities related to EdgeIds ranges.addAll(getRange(edgeId.getSource(), operation, false)); ranges.addAll(getRange(edgeId.getDestination(), operation, false)); } return ranges; } }
@Override public IteratorSetting getElementPropertyRangeQueryFilter(final GraphFilters operation) { final boolean includeEntities = operation.getView().hasEntities(); final boolean includeEdges = operation.getView().hasEdges(); if (includeEntities && includeEdges) { LOGGER.debug("Returning null from getElementPropertyRangeQueryFilter as includeEntities = {} and includeEdges = {}", includeEntities, includeEdges); return null; } final IteratorSetting is = new IteratorSettingBuilder( AccumuloStoreConstants.RANGE_ELEMENT_PROPERTY_FILTER_ITERATOR_PRIORITY, AccumuloStoreConstants.RANGE_ELEMENT_PROPERTY_FILTER_ITERATOR_NAME, RANGE_ELEMENT_PROPERTY_FILTER_ITERATOR).all() .includeEdges(includeEdges) .includeEntities(includeEntities) .build(); LOGGER.debug("Creating IteratorSetting for iterator class {} with priority = {}, " + "includeEdges = {}, includeEntities = {}", RANGE_ELEMENT_PROPERTY_FILTER_ITERATOR, AccumuloStoreConstants.RANGE_ELEMENT_PROPERTY_FILTER_ITERATOR_PRIORITY, includeEdges, includeEntities); return is; }
private GetAllElements getGetAllElements(final OP getRDDOfAllElements) { return new GetAllElements.Builder() .view(getRDDOfAllElements.getView()) .directedType(getRDDOfAllElements.getDirectedType()) .options(getRDDOfAllElements.getOptions()) .build(); }
derivedView = ((GraphFilters) operation).getView(); operation = applyPropertyFilters(derivedView, operation); return operation;
@Override public IteratorSetting getEdgeEntityDirectionFilterIteratorSetting(final GraphFilters operation) { final boolean includeEntities = operation.getView().hasEntities(); final boolean includeEdges = operation.getView().hasEdges(); final DirectedType directedType = operation.getDirectedType(); final IncludeIncomingOutgoingType inOutType; if (operation instanceof SeededGraphFilters) {
} else { includeEdges = includeEdgesParam; includeEntities = operation.getView().hasEntities();
@Override public IteratorSetting getElementPropertyRangeQueryFilter(final GraphFilters operation) { final boolean includeEntities = operation.getView().hasEntities(); final boolean includeEdges = operation.getView().hasEdges(); final DirectedType directedType = operation.getDirectedType(); final SeededGraphFilters.IncludeIncomingOutgoingType inOutType; if (operation instanceof SeededGraphFilters) {
final View view = graphFilters.getView();
final DirectedType directedType = operation.getDirectedType(); final boolean includeEdges; final boolean includeEntities; } else { includeEdges = includeEdgesParam; includeEntities = operation.getView().hasEntities();