Graph Validator

Validate a graph against Schema.org

License

License

GroupId

GroupId

uk.gov.nca.graph
ArtifactId

ArtifactId

validator
Last Version

Last Version

1.1
Release Date

Release Date

Type

Type

jar
Description

Description

Graph Validator
Validate a graph against Schema.org
Project URL

Project URL

https://github.com/NationalCrimeAgency/graph-validator
Source Code Management

Source Code Management

https://github.com/NationalCrimeAgency/graph-validator

Download validator

How to add to project

<!-- https://jarcasting.com/artifacts/uk.gov.nca.graph/validator/ -->
<dependency>
    <groupId>uk.gov.nca.graph</groupId>
    <artifactId>validator</artifactId>
    <version>1.1</version>
</dependency>
// https://jarcasting.com/artifacts/uk.gov.nca.graph/validator/
implementation 'uk.gov.nca.graph:validator:1.1'
// https://jarcasting.com/artifacts/uk.gov.nca.graph/validator/
implementation ("uk.gov.nca.graph:validator:1.1")
'uk.gov.nca.graph:validator:jar:1.1'
<dependency org="uk.gov.nca.graph" name="validator" rev="1.1">
  <artifact name="validator" type="jar" />
</dependency>
@Grapes(
@Grab(group='uk.gov.nca.graph', module='validator', version='1.1')
)
libraryDependencies += "uk.gov.nca.graph" % "validator" % "1.1"
[uk.gov.nca.graph/validator "1.1"]

Dependencies

compile (7)

Group / Artifact Type Version
uk.gov.nca.graph : mapper jar 1.1
uk.gov.nca.graph : utils jar 1.1
commons-cli : commons-cli jar 1.4
org.apache.tinkerpop : gremlin-core jar 3.3.4
org.apache.tinkerpop : tinkergraph-gremlin jar 3.3.4
com.fasterxml.jackson.core : jackson-databind jar 2.9.7
org.slf4j : slf4j-api jar 1.7.25

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.slf4j : slf4j-simple jar 1.7.25

Project Modules

There are no modules declared in this project.

Graph Validator

Library and command line tools for validating that a graph conforms to the Schema.org format, optionally including additional schemas in the same format.

To validate a graph, use the ValidateGraph tool:

java -jar validator-1.1-shaded.jar uk.gov.nca.graph.validator.cli.ValidateGraph -g graphml.properties

To validate a mapping file (see the graph-mapper project), use the ValidateMap tool, which generates a sample graph from the mapping and then validates that:

java -jar validator-1.1-shaded.jar uk.gov.nca.graph.validator.cli.ValidateMap -g graphml.properties

The following rules are applied when validating the graph:

  • Properties whose expected types are one of the defined Schema.org data types (i.e. derive from DataType) should be represented as properties on the object
  • Properties whose expected types are another object (i.e. derive from Thing) should be represented as relationships
  • Objects deriving from the Action type should be represented as objects, not as relationships
uk.gov.nca.graph

National Crime Agency

National Crime Agency. Leading the UK's fight to cut serious and organised crime.

Versions

Version
1.1