All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.vertexium.DefaultMetadataPlugin Maven / Gradle / Ivy

There is a newer version: 4.10.0
Show newest version
package org.vertexium;

import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

public class DefaultMetadataPlugin implements MetadataPlugin {
    @Override
    public boolean shouldWriteMetadata(
        ElementId elementId,
        Property property,
        String metadataKey,
        Visibility metadataVisibility,
        Object metadataValue,
        long propertyTimestamp
    ) {
        return true;
    }

    @Override
    public List getAllDefaultEntries(long propertyTimestamp, FetchHints fetchHints) {
        return Collections.emptyList();
    }

    protected List filterEntriesByFetchHints(List entries, FetchHints fetchHints) {
        return entries.stream()
            .filter(entry -> fetchHints.isIncludeMetadata(entry.getKey()))
            .collect(Collectors.toList());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy