public Collection exportSpecifications()

in src/main/java/com/amazonaws/services/neptune/propertygraph/Scope.java [87:124]


        public Collection<ExportSpecification> exportSpecifications(GraphSchema graphSchema,
                                                                    Collection<Label> nodeLabels,
                                                                    Collection<Label> edgeLabels,
                                                                    GremlinFilters gremlinFilters,
                                                                    TokensOnly tokensOnly,
                                                                    EdgeLabelStrategy edgeLabelStrategy,
                                                                    ExportStats stats,
                                                                    FeatureToggles featureToggles) {
            if (graphSchema.isEmpty()) {
                return Collections.singletonList(
                        new ExportSpecification(
                                GraphElementType.nodes,
                                Scope.labelsFilter(nodeLabels, NodeLabelStrategy.nodeLabelsOnly),
                                gremlinFilters, stats, tokensOnly.nodeTokensOnly(),
                                featureToggles)
                );
            } else if (graphSchema.hasNodeSchemas()) {
                LabelsFilter labelsFilter = Scope.labelsFilter(nodeLabels, NodeLabelStrategy.nodeLabelsOnly)
                        .intersection(graphSchema.graphElementSchemasFor(GraphElementType.nodes).labels());
                if (!labelsFilter.isEmpty()) {
                    return Collections.singletonList(
                            new ExportSpecification(
                                    GraphElementType.nodes,
                                    labelsFilter,
                                    gremlinFilters,
                                    stats,
                                    tokensOnly.nodeTokensOnly(),
                                    featureToggles)
                    );
                } else {
                    return Collections.emptyList();
                }

            } else {
                return Collections.emptyList();
            }

        }