gpt4 book ai didi

com.opentext.ia.yaml.core.YamlMap.get()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 02:23:31 28 4
gpt4 key购买 nike

本文整理了Java中com.opentext.ia.yaml.core.YamlMap.get()方法的一些代码示例,展示了YamlMap.get()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlMap.get()方法的具体详情如下:
包路径:com.opentext.ia.yaml.core.YamlMap
类名称:YamlMap
方法名:get

YamlMap.get介绍

暂无

代码示例

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

@Override
Stream<Value> getIndexParents(YamlMap content) {
 return content.get("processors").toList().stream()
   .map(Value::toMap)
   .map(map -> map.get("data"));
}

代码示例来源:origin: com.opentext.ia/infoarchive-sdk-core

private void putTemplatedFrom(YamlMap map, String name, String... destinationAndSourceNames) {
 int i = 0;
 while (i < destinationAndSourceNames.length) {
  String destination = destinationAndSourceNames[i++];
  String source = destinationAndSourceNames[i++];
  putTemplated(map.get(source), destination, name);
 }
}

代码示例来源:origin: com.opentext.ia/infoarchive-sdk-core

private void putFrom(YamlMap map, String... destinationAndSourceNames) {
 int i = 0;
 while (i < destinationAndSourceNames.length) {
  String destination = destinationAndSourceNames[i++];
  String source = destinationAndSourceNames[i++];
  put(destination, map.get(source));
 }
}

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

private void assertSameVersion(Value version, YamlMap target) {
 if (!version.toString().equals(target.get(VERSION).toString())) {
  throw new IllegalArgumentException(String.format("Different versions of configuration format: %s vs %s",
    version, target.get(VERSION)));
 }
}

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

static String byPrefix(YamlMap yaml, String prefix) {
 return yaml.get("namespaces").toList().stream()
   .map(Value::toMap)
   .filter(m -> m.get("prefix").toString().equals(prefix))
   .map(m -> m.get("uri").toString())
   .findAny()
   .orElseThrow(() -> new IllegalArgumentException("Missing namespace with prefix " + prefix));
}

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

@Override
public List<YamlMap> getContentOwnedBy(YamlMap owner) {
 return owner.get("content").toList().stream()
   .map(Value::toMap)
   .collect(Collectors.toList());
}

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

@Override
public void accept(Visit visit) {
 visit.getMap().get(English.plural(type)).toList().stream()
   .map(Value::toMap)
   .map(map -> map.get("content"))
   .map(Value::toMap)
   .filter(map -> "yaml".equals(map.get("format").toString()))
   .findAny()
   .ifPresent(content -> visitContent(visit, content));
}

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

@Override
public boolean test(Visit visit) {
 if (!super.test(visit)) {
  return false;
 }
 List<Value> namespaces = visit.getMap().get(NAMESPACES).toList();
 return !namespaces.isEmpty() && namespaces.stream().allMatch(Value::isScalar);
}

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

/**
 * Returns the contents of the XML Schema for the PDI.
 * @return the contents of the XML Schema for the PDI
 */
public String getPdiSchema() {
 return pdiSchema().get("content", "text").toString();
}

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

@Override
public void accept(Visit visit) {
 YamlMap yaml = visit.getMap();
 yaml.replace(QUERY, yaml.get(QUERY, TEXT));
}

代码示例来源:origin: com.opentext.ia/infoarchive-sdk-core

private Value lookup(String type, String lookupProperty, Value lookupValue, String returnProperty) {
 return lookup(type, lookupProperty, lookupValue.toString())
   .map(map -> map.get(returnProperty))
   .orElseGet(() -> new Value());
}

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

/**
 * Returns the namespace of the PDI.
 * @return the namespace of the PDI
 */
public String getPdiSchemaName() {
 return pdiSchema().get("name").toString();
}

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

@Override
void visitContent(Visit visit, YamlMap content) {
 content.get(DATA).toList().stream()
   .map(Value::toMap)
   .filter(map -> map.containsKey(RESULT_SCHEMA))
   .forEach(map -> replaceResultSchemaNamespaceWithUri(visit.getRootMap(), map));
}

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

@Override
public void accept(Visit visit) {
 visit.getMap().get("pdiSchemas").toList().stream()
   .map(Value::toMap)
   .filter(map -> !map.containsKey(NAME) && map.get(NAMESPACES).toList().size() == 1)
   .forEach(map -> replaceNamespaceWithName(visit.getRootMap(), map));
}

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

@Override
protected void visitContent(Visit visit, YamlMap content) {
 getIndexParents(content)
   .filter(Value::isMap)
   .map(Value::toMap)
   .forEach(indexParent -> {
  List<Value> indexes = indexParent.get(INDEXES).toList();
  if (hasIndexMaps(indexes)) {
   indexParent.put(INDEXES, convertIndexes(indexes));
  }
 });
}

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

@Override
public void accept(Visit visit) {
 YamlMap yaml = visit.getMap();
 if (yaml.containsKey(RESOURCE)) {
  yaml.replace(RESOURCE, prefix + yaml.get(RESOURCE));
 }
}

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

@Override
void visitContent(Visit visit, YamlMap content) {
 String xml = translateToXml(visit.getRootMap(), content.get(itemProperties).toList(),
   content.get(NAMESPACES).toList());
 content
   .put("format", "xml")
   .remove(NAMESPACES)
   .put(TEXT, xml);
}

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

private YamlMap convertIndex(YamlMap index) {
 String type = index.get(TYPE).toString();
 index.remove(TYPE);
 return new YamlMap().put(type, index);
}

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

private void include(Value include, YamlMap target) {
 String resource;
 if (include.isMap()) {
  YamlMap map = include.toMap();
  if (ObjectConfiguration.parse(map.get(CONFIGURE).toString()).shouldIgnoreObject()) {
   return;
  }
  resource = map.get(RESOURCE).toString();
 } else {
  resource = include.toString();
 }
 include(resource, target);
}

代码示例来源:origin: com.opentext.ia/infoarchive-yaml

@Override
public void accept(Visit visit) {
 YamlMap yaml = visit.getMap();
 YamlSequence includeFiles = yaml.get(INCLUDES).toList();
 yaml.remove(INCLUDES);
 includeFiles.forEach(value -> include(value, yaml));
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com