/** * @return the StoreProperties for this Graph. */ public StoreProperties getStoreProperties() { return store.getProperties(); }
/** * @return the graphId for this Graph. */ public String getGraphId() { return store.getGraphId(); }
/** * @param storeTrait the store trait to check * @return true if the store has the given trait. */ public boolean hasTrait(final StoreTrait storeTrait) { return store.hasTrait(storeTrait); }
public void initialise() { if (null == store) { store = Store.createStore(graphId, Schema.fromJson(schema), StoreProperties.loadStoreProperties(properties)); } }
public static MapStoreProperties loadStoreProperties(final Path storePropertiesPath) { return StoreProperties.loadStoreProperties(storePropertiesPath, MapStoreProperties.class); }
@Override public MapStoreProperties clone() { return (MapStoreProperties) super.clone(); }
/** * Returns all the {@link StoreTrait}s for the contained {@link Store} * implementation * * @return a {@link Set} of all of the {@link StoreTrait}s that the store * has. */ public Set<StoreTrait> getStoreTraits() { return store.getTraits(); }
/** * @return the original schema. */ public Schema getSchema() { return store.getOriginalSchema(); }
/** * Adds a spark session to the given {@link Context}. * * @param context the user context * @param sparkSession the spark session to add to the context */ public static void addSparkSession(final Context context, final SparkSession sparkSession) { context.setConfig(SPARK_CONTEXT_CONFIG_KEY, sparkSession); }
/** * @param operationClass the operation class to check * @return true if the provided operation is supported. */ public boolean isSupported(final Class<? extends Operation> operationClass) { return store.isSupported(operationClass); }
/** * @return a collection of all the supported {@link Operation}s. */ public Set<Class<? extends Operation>> getSupportedOperations() { return store.getSupportedOperations(); }
/** * @param operation the class of the operation to check * @return a collection of all the compatible {@link Operation}s that could * be added to an operation chain after the provided operation. */ public Set<Class<? extends Operation>> getNextOperations(final Class<? extends Operation> operation) { return store.getNextOperations(operation); }
public static FederatedStoreProperties loadStoreProperties(final String pathStr) { return StoreProperties.loadStoreProperties(pathStr, FederatedStoreProperties.class); }
/** * Get this Store's {@link uk.gov.gchq.gaffer.federatedstore.FederatedStoreProperties}. * * @return the instance of {@link uk.gov.gchq.gaffer.federatedstore.FederatedStoreProperties}, * this may contain details such as database connection details. */ @Override public FederatedStoreProperties getProperties() { return (FederatedStoreProperties) super.getProperties(); }
@Override public AccumuloProperties clone() { return (AccumuloProperties) super.clone(); }
public static FederatedStoreProperties loadStoreProperties(final Path storePropertiesPath) { return StoreProperties.loadStoreProperties(storePropertiesPath, FederatedStoreProperties.class); }
public static ParquetStoreProperties loadStoreProperties(final InputStream storePropertiesStream) { return StoreProperties.loadStoreProperties(storePropertiesStream, ParquetStoreProperties.class); }
public static FederatedStoreProperties loadStoreProperties(final InputStream storePropertiesStream) { return StoreProperties.loadStoreProperties(storePropertiesStream, FederatedStoreProperties.class); }
public static ProxyProperties loadStoreProperties(final Path storePropertiesPath) { return StoreProperties.loadStoreProperties(storePropertiesPath, ProxyProperties.class); }
public static AccumuloProperties loadStoreProperties(final String pathStr) { return StoreProperties.loadStoreProperties(pathStr, AccumuloProperties.class); }