plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/model/validation/ModelValidator.java
public int validateBeforeLoad(ILogChannel log, Session session) {
    // Validate the nodes
    //
    int nrErrors = 0;

    readIndexesData(session);
    readConstraintsData(session);

    for (NodeProperty nodeProperty : usedNodeProperties) {
      GraphNode node = graphModel.findNode(nodeProperty.getNodeName());
      if (node == null) {
        log.logError(
            "Used node '"
                + nodeProperty.getNodeName()
                + "' could not be found in model '"
                + graphModel.getName());
        nrErrors++;
      } else {
        GraphProperty property = node.findProperty(nodeProperty.getPropertyName());
        if (property == null) {
          log.logError(
              "Used node property "
                  + nodeProperty.getNodeName()
                  + "."
                  + nodeProperty.getPropertyName()
                  + " could not be found in model '"
                  + graphModel.getName());
          nrErrors++;
        } else {
          if (property.isIndexed()) {
            nrErrors += validateNodePropertyIndexed(log, node, property, false);
          }
          if (property.isUnique()) {
            nrErrors += validateNodePropertyIndexed(log, node, property, true);
          }
        }
      }
    }

    nrErrors += validateMandatoryFields(log);

    return nrErrors;
  }
/**
   * Validate the existence of indexes and constraints in the Neo4j database before any load takes
   * place
   *
   * @param log The log channel to write to when there are validation errors. Validation successes
   *     are logged in Detailed
   * @param session The Neo4j session to use to validate
   * @return the number of validation errors
   */
Validate the existence of indexes and constraints in the Neo4j database before any load takes
place

@param log The log channel to write to when there are validation errors. Validation successes
are logged in Detailed
@param session The Neo4j session to use to validate
@return the number of validation errors
Validate the existence of indexes and constraints in the Neo4j database before any load takes place @param log The log channel to write to when there are validation errors . Validation successes are logged in Detailed @param session The Neo4j session to use to validate @return the number of validation errors
public int validateBeforeLoad(ILogChannel log, Session session) {
    int nrErrors = 0;
    readIndexesData(session);
    readConstraintsData(session);
    for (NodeProperty nodeProperty : usedNodeProperties) {
      GraphNode node = graphModel.findNode(nodeProperty.getNodeName());
      if (node == null) {
        log.logError(
            "Used node '"
                + nodeProperty.getNodeName()
                + "' could not be found in model '"
                + graphModel.getName());
        nrErrors++;
      } else {
        GraphProperty property = node.findProperty(nodeProperty.getPropertyName());
        if (property == null) {
          log.logError(
              "Used node property "
                  + nodeProperty.getNodeName()
                  + "."
                  + nodeProperty.getPropertyName()
                  + " could not be found in model '"
                  + graphModel.getName());
          nrErrors++;
        } else {
          if (property.isIndexed()) {
            nrErrors += validateNodePropertyIndexed(log, node, property, false);
          }
          if (property.isUnique()) {
            nrErrors += validateNodePropertyIndexed(log, node, property, true);
          }
        }
      }
    }
    nrErrors += validateMandatoryFields(log);
    return nrErrors;
  }
public int validateBeforeLoad ( ILogChannel log , Session session ) { int nrErrors = 0 ; readIndexesData ( session ) ; readConstraintsData ( session ) ; for ( NodeProperty nodeProperty : usedNodeProperties ) { GraphNode node = graphModel . findNode ( nodeProperty . getNodeName ( ) ) ; if ( node == null ) { log . logError ( "Used node '" + nodeProperty . getNodeName ( ) + "' could not be found in model '" + graphModel . getName ( ) ) ; nrErrors ++ ; } else { GraphProperty property = node . findProperty ( nodeProperty . getPropertyName ( ) ) ; if ( property == null ) { log . logError ( "Used node property " + nodeProperty . getNodeName ( ) + "." + nodeProperty . getPropertyName ( ) + " could not be found in model '" + graphModel . getName ( ) ) ; nrErrors ++ ; } else { if ( property . isIndexed ( ) ) { nrErrors += validateNodePropertyIndexed ( log , node , property , false ) ; } if ( property . isUnique ( ) ) { nrErrors += validateNodePropertyIndexed ( log , node , property , true ) ; } } } } nrErrors += validateMandatoryFields ( log ) ; return nrErrors ; }
Validate the existence of indexes and constraints in the Neo4j database before any load takes
 place
Validate the existence of indexes and constraints in the Neo4j database before any load takes place
// Validate the nodes //