code: @Override
      public void checkRelationship(final Statement statement)
              throws SemanticWarning {
          RelationshipType r = statement.getRelationshipType();
          Object o = statement.getObject();
  
          if (o != null) {
  
              // Relationship must be present.
              if (r == null) {
                  final String err = SEMANTIC_STATEMENT_REQUIRES_RELATIONSHIP;
                  final String name = statement.toBELShortForm();
                  throw new SemanticWarning(name, err, null);
              }
  
          } else {
  
              // Relationship must be absent.
              if (r != null) {
                  final String err = SEMANTIC_STATEMENT_PROVIDES_RELATIONSHIP;
                  final String name = statement.toBELShortForm();
                  throw new SemanticWarning(name, err, null);
              }
  
          }
      }
docs: {@inheritDoc}