@prefix ex: <http://example.com/ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

[] a sh:ValidationReport;
  sh:conforms false;
  <http://rdf4j.org/schema/rdf4j#truncated> false;
  sh:result [ a sh:ValidationResult;
      sh:focusNode 1;
      sh:value 1;
      sh:sourceConstraintComponent sh:OrConstraintComponent;
      sh:resultSeverity sh:Violation;
      sh:sourceShape ex:IdAndUsernameAreFunctionalPropertiesTogether
    ] .

ex:IdAndUsernameAreFunctionalPropertiesTogether a sh:NodeShape;
  sh:targetObjectsOf ex:id, ex:username;
  sh:or ([ a sh:PropertyShape;
        sh:path [
            sh:inversePath ex:id
          ];
        sh:maxCount 1
      ] [ a sh:PropertyShape;
        sh:path [
            sh:inversePath ex:username
          ];
        sh:maxCount 1
      ]) .
