Helper that overrides the data.node.id property with name derived from the node file path
@param nodeConfig node config
@param nodeFilePath path of the node file
@return config with overridden data.node.id
164966
private Config getNodeConfigWithOverrides(Config nodeConfig, Path nodeFilePath) {
    String nodeId = nodeFilePath.getParent().getName();
    return nodeConfig.withValue(FlowGraphConfigurationKeys.DATA_NODE_ID_KEY, ConfigValueFactory.fromAnyRef(nodeId));
  }
697507
public static NodeBean setPropsInNodeBean(final String path, final File flowFile,
      final Props prop) {
    final NodeBeanLoader loader = new NodeBeanLoader();
    try {
      final NodeBean nodeBean = loader.load(flowFile);
      final String[] pathList = path.split(Constants.PATH_DELIMITER);
      if (overridePropsInNodeBean(nodeBean, pathList, 0, prop)) {
        return nodeBean;
      } else {
        logger.error("Error setting props for " + path);
      }
    } catch (final Exception e) {
      logger.error("Failed to set props, error loading flow YAML file " + flowFile);
    }
    return null;
  }
395109
private static String getDatasetFromConfigKey(ConfigKeyPath configKey) {
    return StringUtils.removeStart(configKey.getAbsolutePathString(), SingleLinkedListConfigKeyPath.PATH_DELIMETER);
  }
234696
public static DataNode createDataNode(String args[], Configuration conf) 
    throws IOException {
    DataNode dn = instantiateDataNode(args, conf);
    if (dn != null) {
      dn.runDatanodeDaemon();
    }
    return dn;
  }
642232
private static JNRPEConfiguration loadConfiguration(final String configurationFilePath) throws ConfigurationException {
        File confFile = new File(configurationFilePath);

        if (!confFile.exists() || !confFile.canRead()) {
            throw new ConfigurationException("Cannot access config file : " + configurationFilePath);
        }

        return JNRPEConfigurationFactory.createConfiguration(configurationFilePath);

    }
213582
<T extends INode> T addNode(String path, T newNode) throws FileNotFoundException {
    return addNode(path, newNode, false);
  }
1052894
public static TransientNodeData createNodeData(NodeData parent, InternalQName name, InternalQName primaryTypeName,
      InternalQName[] mixinTypesName, String identifier, AccessControlList acl)
   {
      TransientNodeData nodeData = null;
      QPath path = QPath.makeChildPath(parent.getQPath(), name);
      nodeData =
         new TransientNodeData(path, identifier, -1, primaryTypeName, mixinTypesName, 0, parent.getIdentifier(), acl);
      return nodeData;
   }
652002
function(filePath, identifier, name) {
    this.filePath = filePath;
    this.identifier = identifier;
    this.name = name ? name : '';
}
234835
public static Properties loadConfig(final String propertyFilePath)
            throws Exception {

        try {

            // 用TOMCAT模式 来载入试试
            return ConfigLoaderUtils.loadWithTomcatMode(propertyFilePath);

        } catch (Exception e1) {

            try {
                // 用普通模式进行载入
                return loadWithNormalMode(propertyFilePath);

            } catch (Exception e2) {

                throw new Exception("cannot load config file: "
                        + propertyFilePath);
            }
        }
    }
427113
public Configuration fromFile(File path) throws ConfigurationLoadException {
    PropertiesConfiguration configuration = setupConfiguration(new PropertiesConfiguration());
    configuration.setFile(path);
    try {
      configuration.load();
      return configuration;
    } catch (ConfigurationException e) {
      throw new ConfigurationLoadException(
          "Encountered a problem reading the provided configuration file \"" + path + "\"!", e);
    }
  }
1043950
function getEntityConfiguration(nodePath, extendedEntityConfiguration) {
    //If a node is specified get the direct sub conf.
    if (nodePath) {
        return _getNode(nodePath, extendedEntityConfiguration).toJS();
    }
    return entitiesMap.toJS();
}
578131
public N getNode(int nodeID) {
    if(nodeID == getPageID(rootEntry)) {
      return getRoot();
    }
    else {
      return file.readPage(nodeID);
    }
  }
1235706
function ConfigParser(path) {
    this.path = path;
    try {
        this.doc = xml.parseElementtreeSync(path);
        this.cdvNamespacePrefix = getCordovaNamespacePrefix(this.doc);
        et.register_namespace(this.cdvNamespacePrefix, 'http://cordova.apache.org/ns/1.0');
    } catch (e) {
        console.error('Parsing '+path+' failed');
        throw e;
    }
    var r = this.doc.getroot();
    if (r.tag !== 'widget') {
        throw new CordovaError(path + ' has incorrect root node name (expected "widget", was "' + r.tag + '")');
    }
}
689480
@SuppressWarnings("unchecked")
    @Override
    public T readConfig(String filePath) throws ConfigurationException {
        try {
            YamlReader reader = new YamlReader(new FileReader(filePath));
            reader.getConfig().setClassTag(clazz.getSimpleName(), clazz);
            return (T) reader.read();
        } catch (FileNotFoundException e) {
            throw new ConfigurationException("Configuration Exception", "CONF_001", e);
        } catch (YamlException e) {
            throw new ConfigurationException("Configuration Exception", "CONF_002", e);
        }
    }
212715
public void getAndSetNodeDataSize(String nodePath)
   {
      try
      {
         long dataSize = getNodeDataSizeDirectly(nodePath);
         quotaPersister.setNodeDataSizeIfQuotaExists(rName, wsName, nodePath, dataSize);
      }
      catch (QuotaManagerException e)
      {
         LOG.warn("Can't calculate node data size " + nodePath + " because: " + e.getCause().getMessage());
      }
   }
799155
public void genDotFile(Path path, String name,
                           Configuration configuration,
                           Attributes attributes)
        throws IOException
    {
        // transitive reduction
        Graph<String> graph = apiOnly
                ? requiresTransitiveGraph(configuration, Set.of(name))
                : gengraph(configuration);

        DotGraphBuilder builder = new DotGraphBuilder(name, graph, attributes);
        builder.subgraph("se", "java", attributes.javaSubgraphColor(),
                         DotGraphBuilder.JAVA_SE_SUBGRAPH)
               .subgraph("jdk", "jdk", attributes.jdkSubgraphColor(),
                         DotGraphBuilder.JDK_SUBGRAPH)
               .modules(graph.nodes().stream()
                                 .map(mn -> configuration.findModule(mn).get()
                                                .reference().descriptor()));
        // build dot file
        builder.build(path);
    }
86300
public String getMemberId(String nodePath) {
    MorePreconditions.checkNotBlank(nodePath);
    if (!nodePath.startsWith(path + "/")) {
      throw new IllegalArgumentException(
          String.format("Not a member of this group[%s]: %s", path, nodePath));
    }

    String memberId = StringUtils.substringAfterLast(nodePath, "/");
    if (!nodeScheme.isMember(memberId)) {
      throw new IllegalArgumentException(
          String.format("Not a group member: %s", memberId));
    }

    return memberId;
  }