Changeset View
Changeset View
Standalone View
Standalone View
java/server/src/main/java/org/softwareheritage/graph/AllowedEdges.java
package org.softwareheritage.graph; | package org.softwareheritage.graph; | ||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import org.softwareheritage.graph.Graph; | import org.softwareheritage.graph.Graph; | ||||
import org.softwareheritage.graph.Node; | import org.softwareheritage.graph.Node; | ||||
/** | /** | ||||
* Edge restriction based on node types, used when visiting the graph. | * Edge restriction based on node types, used when visiting the graph. | ||||
* <p> | * <p> | ||||
* <a href="https://docs.softwareheritage.org/devel/swh-model/data-model.html">Software Heritage | * <a href="https://docs.softwareheritage.org/devel/swh-model/data-model.html">Software Heritage | ||||
* graph</a> contains multiple node types (contents, directories, revisions, ...) and restricting | * graph</a> contains multiple node types (contents, directories, revisions, ...) and restricting | ||||
* the traversal to specific node types is necessary for many querying operations: <a | * the traversal to specific node types is necessary for many querying operations: <a | ||||
* href="https://docs.softwareheritage.org/devel/swh-graph/use-cases.html">use cases</a>. | * href="https://docs.softwareheritage.org/devel/swh-graph/use-cases.html">use cases</a>. | ||||
* | * | ||||
* @author Thibault Allançon | * @author Thibault Allançon | ||||
* @version 0.0.1 | |||||
* @since 0.0.1 | |||||
*/ | */ | ||||
public class AllowedEdges { | public class AllowedEdges { | ||||
/** Graph on which edge restriction is performed */ | /** Graph on which edge restriction is performed */ | ||||
Graph graph; | Graph graph; | ||||
/** | /** | ||||
* 2D boolean matrix storing access rights for all combination of src/dst node types (first | * 2D boolean matrix storing access rights for all combination of src/dst node types (first | ||||
* dimension is source, second dimension is destination), when edge restriction is not enforced | * dimension is source, second dimension is destination), when edge restriction is not enforced | ||||
▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines |