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

com.arangodb.util.GraphVerticesOptions Maven / Gradle / Ivy

There is a newer version: 7.15.0
Show newest version
package com.arangodb.util;

import java.util.List;
import java.util.Map;

import com.arangodb.Direction;

public class GraphVerticesOptions implements OptionsInterface {

	private Direction direction;
	private List vertexCollectionRestriction;

	/**
	 * The direction of the edges as a string. Possible values are outbound,
	 * inbound and any (default).
	 * 
	 * @return the direction
	 */
	public Direction getDirection() {
		return direction;
	}

	/**
	 * The direction of the edges as a string. Possible values are outbound,
	 * inbound and any (default).
	 * 
	 * @param direction
	 */
	public void setDirection(Direction direction) {
		this.direction = direction;
	}

	/**
	 * One or multiple vertex collections that should be considered.
	 * 
	 * @return One or multiple vertex collections that should be considered.
	 */
	public List getVertexCollectionRestriction() {
		return vertexCollectionRestriction;
	}

	/**
	 * One or multiple vertex collections that should be considered.
	 * 
	 * @param vertexCollectionRestriction
	 */
	public void setVertexCollectionRestriction(List vertexCollectionRestriction) {
		this.vertexCollectionRestriction = vertexCollectionRestriction;
	}

	/**
	 * Returns a map of the options
	 * 
	 * @return a map
	 */
	@Override
	public Map toMap() {
		MapBuilder mp = new MapBuilder();
		if (direction != null) {
			mp.put("direction", direction.toString().toLowerCase());
		}
		if (CollectionUtils.isNotEmpty(vertexCollectionRestriction)) {
			mp.put("vertexCollectionRestriction", vertexCollectionRestriction);
		}
		return mp.get();
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy