org.yaml.snakeyaml.nodes.Tag.getValue()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(9.0k)|赞(0)|评价(0)|浏览(63)

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

Tag.getValue介绍

暂无

代码示例

代码示例来源:origin: redisson/redisson

@Override
public boolean equals(Object obj) {
  if (obj instanceof Tag) {
    return value.equals(((Tag) obj).getValue());
  } else
    return false;
}

代码示例来源:origin: redisson/redisson

ImplicitTuple tuple = new ImplicitTuple(node.getTag().equals(detectedTag), node
    .getTag().equals(defaultTag));
ScalarEvent event = new ScalarEvent(tAlias, node.getTag().getValue(), tuple,
    scalarNode.getValue(), null, null, scalarNode.getStyle());
this.emitter.emit(event);
boolean implicitS = node.getTag().equals(this.resolver.resolve(NodeId.sequence,
    null, true));
this.emitter.emit(new SequenceStartEvent(tAlias, node.getTag().getValue(),
    implicitS, null, null, seqNode.getFlowStyle()));
List<Node> list = seqNode.getValue();
Tag implicitTag = this.resolver.resolve(NodeId.mapping, null, true);
boolean implicitM = node.getTag().equals(implicitTag);
this.emitter.emit(new MappingStartEvent(tAlias, node.getTag().getValue(),
    implicitM, null, null, ((CollectionNode) node).getFlowStyle()));
MappingNode mnode = (MappingNode) node;

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

@Override
public boolean equals(Object obj) {
  if (obj instanceof Tag) {
    return value.equals(((Tag) obj).getValue());
  } else
    return false;
}

代码示例来源:origin: harbby/presto-connectors

@Override
public boolean equals(Object obj) {
  if (obj instanceof Tag) {
    return value.equals(((Tag) obj).getValue());
  } else
    return false;
}

代码示例来源:origin: pl.droidsonroids.yaml/snakeyaml

public int compareTo(Tag o) {
    return value.compareTo(o.getValue());
  }
}

代码示例来源:origin: pl.droidsonroids.yaml/snakeyaml

@Override
public boolean equals(Object obj) {
  if (obj instanceof Tag) {
    return value.equals(((Tag) obj).getValue());
  } else
    return false;
}

代码示例来源:origin: harbby/presto-connectors

public int compareTo(Tag o) {
    return value.compareTo(o.getValue());
  }
}

代码示例来源:origin: hm.binkley/binkley-yaml-runtime

<T> void addExplicit(final Tag tag, final Explicit<T> explicit) {
  final BuilderConstruct<T> ctor = new BuilderConstruct<>(
      explicit);
  yamlConstructors.put(tag, ctor);
  yamlMultiConstructors.put(tag.getValue(), ctor);
}

代码示例来源:origin: io.digdag/digdag-core

private void validateKeys(MappingNode node)
  {
    Map<String, Long> keyCounts = node.getValue().stream()
        .map(NodeTuple::getKeyNode)
        .filter(n -> n instanceof ScalarNode)
        .map(ScalarNode.class::cast)
        .filter(n -> !"!include".equals(n.getTag().getValue()))  // exclude !include tag
        .collect(Collectors.groupingBy(ScalarNode::getValue, Collectors.counting()));
    List<String> duplicatedKeys = keyCounts.entrySet().stream()
        .filter(it -> it.getValue() > 1)
        .map(Map.Entry<String, Long>::getKey)
        .collect(Collectors.toList());
    if (!duplicatedKeys.isEmpty()) {
      throw new DuplicateKeyYAMLException(duplicatedKeys);
    }
  }
}

代码示例来源:origin: com.sap.cloud.yaas.raml-parser/raml-parser

public IncludeInfo(Tag tag)
{
  StringBuilder encodedInclude = new StringBuilder(tag.getValue());
  endColumn = popTrailingNumber(encodedInclude);
  startColumn = popTrailingNumber(encodedInclude);
  line = popTrailingNumber(encodedInclude);
  includeName = encodedInclude.substring(IncludeResolver.INCLUDE_APPLIED_TAG.length());
}

代码示例来源:origin: org.raml/raml-parser

public IncludeInfo(Tag tag)
{
  StringBuilder encodedInclude = new StringBuilder(tag.getValue());
  endColumn = popTrailingNumber(encodedInclude);
  startColumn = popTrailingNumber(encodedInclude);
  line = popTrailingNumber(encodedInclude);
  includeName = encodedInclude.substring(IncludeResolver.INCLUDE_APPLIED_TAG.length());
}

代码示例来源:origin: org.raml/raml-parser

public static List<IncludeInfo> unmarshall(Tag tag)
{
  String compoundIncludeTag = tag.getValue().substring(INCLUDE_COMPOUND_APPLIED_TAG.length());
  int endOfFirstLength = compoundIncludeTag.indexOf(SEPARATOR);
  int firstIncludeLength = Integer.parseInt(compoundIncludeTag.substring(0, endOfFirstLength));
  String firstAppliedInclude = compoundIncludeTag.substring(endOfFirstLength + 1, endOfFirstLength + 1 + firstIncludeLength);
  IncludeInfo firstIncludeInfo = new IncludeInfo(new Tag(firstAppliedInclude));
  String compoundIncludeTag1 = compoundIncludeTag.substring(endOfFirstLength + 1 + firstIncludeLength + 1);
  int endOfSecondLength = compoundIncludeTag1.indexOf(SEPARATOR);
  int secondIncludeLength = Integer.parseInt(compoundIncludeTag1.substring(0, endOfSecondLength));
  String secondAppliedInclude = compoundIncludeTag1.substring(endOfSecondLength + 1, endOfSecondLength + 1 + secondIncludeLength);
  IncludeInfo secondIncludeInfo = new IncludeInfo(new Tag(secondAppliedInclude));
  return Lists.newArrayList(firstIncludeInfo, secondIncludeInfo);
}

代码示例来源:origin: io.digdag/digdag-core

public Object construct(Node node)
{
  switch (node.getTag().getValue()) {
  case "!include":
    // TODO use implicit resolver (Resolver.addImplicitResolver) to convert "<include: path.dig" to new Tag("!include")?
    return "!include:" + java.util.UUID.randomUUID().toString();
  }
  throw new TagException(
      "could not determine a constructor for the tag " + node.getTag(),
      node.getStartMark());
}

代码示例来源:origin: org.raml/raml-parser

private void updateIncludeTag(Node templateValue, Tag parentTag)
{
  if (parentTag.startsWith(INCLUDE_APPLIED_TAG))
  {
    Tag currentTag = templateValue.getTag();
    if (currentTag.startsWith(INCLUDE_APPLIED_TAG))
    {
      String parentTagValue = parentTag.getValue();
      String currentTagValue = currentTag.getValue();
      templateValue.setTag(new Tag(INCLUDE_COMPOUND_APPLIED_TAG //
                     + parentTagValue.length() + SEPARATOR + parentTagValue //
                     + SEPARATOR //
                     + currentTagValue.length() + SEPARATOR + currentTagValue));
    }
    else
    {
      templateValue.setTag(parentTag);
    }
  }
}

代码示例来源:origin: CodeCrafter47/BungeeTabListPlus

for (Subtype subtype : subtypes) {
  if (!subtype.tag().isEmpty()) {
    if (subtype.tag().equals(node.getTag().getValue())) {
      node.setType(subtype.type());
      node.setTag(new Tag(subtype.type()));

代码示例来源:origin: info.magnolia.core/magnolia-configuration

final Matcher definitionReferenceMatcher = INHERITANCE_PATTERN.matcher(node.getTag().getValue());
if (!definitionReferenceMatcher.matches()) {
  reportProblem(
      .withTitle("Mis-configured definition dependency")
      .withDetails(String.format("Tag [%s] does not match the inheritance pattern !inherit:<type>:<referenceId>",
          node.getTag().getValue()))
      .build());
  return baseData;

代码示例来源:origin: info.magnolia.core/magnolia-configuration

final Matcher resourcePathMatcher = INCLUSION_MATCHER.matcher(node.getTag().getValue());
if (!resourcePathMatcher.matches()) {
  reportProblem(
          .withTitle("Mis-configured YAML resource dependency")
          .withDetails(String.format("Tag [%s] does not match the inclusion pattern !include:<yaml_resource_path>",
              node.getTag().getValue()))
          .build());
  return baseData;

代码示例来源:origin: pl.droidsonroids.yaml/snakeyaml

ImplicitTuple tuple = new ImplicitTuple(node.getTag().equals(detectedTag), node
    .getTag().equals(defaultTag));
ScalarEvent event = new ScalarEvent(tAlias, node.getTag().getValue(), tuple,
    scalarNode.getValue(), null, null, scalarNode.getStyle());
this.emitter.emit(event);
boolean implicitS = node.getTag().equals(this.resolver.resolve(NodeId.sequence,
    null, true));
this.emitter.emit(new SequenceStartEvent(tAlias, node.getTag().getValue(),
    implicitS, null, null, seqNode.getFlowStyle()));
List<Node> list = seqNode.getValue();
Tag implicitTag = this.resolver.resolve(NodeId.mapping, null, true);
boolean implicitM = node.getTag().equals(implicitTag);
this.emitter.emit(new MappingStartEvent(tAlias, node.getTag().getValue(),
    implicitM, null, null, ((CollectionNode) node).getFlowStyle()));
MappingNode mnode = (MappingNode) node;

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

ImplicitTuple tuple = new ImplicitTuple(node.getTag().equals(detectedTag), node
    .getTag().equals(defaultTag));
ScalarEvent event = new ScalarEvent(tAlias, node.getTag().getValue(), tuple,
    scalarNode.getValue(), null, null, scalarNode.getStyle());
this.emitter.emit(event);
boolean implicitS = node.getTag().equals(this.resolver.resolve(NodeId.sequence,
    null, true));
this.emitter.emit(new SequenceStartEvent(tAlias, node.getTag().getValue(),
    implicitS, null, null, seqNode.getFlowStyle()));
List<Node> list = seqNode.getValue();
Tag implicitTag = this.resolver.resolve(NodeId.mapping, null, true);
boolean implicitM = node.getTag().equals(implicitTag);
this.emitter.emit(new MappingStartEvent(tAlias, node.getTag().getValue(),
    implicitM, null, null, ((CollectionNode) node).getFlowStyle()));
MappingNode mnode = (MappingNode) node;

代码示例来源:origin: harbby/presto-connectors

ImplicitTuple tuple = new ImplicitTuple(node.getTag().equals(detectedTag), node
    .getTag().equals(defaultTag));
ScalarEvent event = new ScalarEvent(tAlias, node.getTag().getValue(), tuple,
    scalarNode.getValue(), null, null, scalarNode.getStyle());
this.emitter.emit(event);
boolean implicitS = node.getTag().equals(this.resolver.resolve(NodeId.sequence,
    null, true));
this.emitter.emit(new SequenceStartEvent(tAlias, node.getTag().getValue(),
    implicitS, null, null, seqNode.getFlowStyle()));
List<Node> list = seqNode.getValue();
Tag implicitTag = this.resolver.resolve(NodeId.mapping, null, true);
boolean implicitM = node.getTag().equals(implicitTag);
this.emitter.emit(new MappingStartEvent(tAlias, node.getTag().getValue(),
    implicitM, null, null, ((CollectionNode) node).getFlowStyle()));
MappingNode mnode = (MappingNode) node;

相关文章