com.vladsch.flexmark.util.html.Attributes.getValue()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(127)

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

Attributes.getValue介绍

暂无

代码示例

代码示例来源:origin: vsch/flexmark-java

public String getTitle() {
  return myAttributes == null ? null : myAttributes.getValue(Attribute.TITLE_ATTR);
}

代码示例来源:origin: vsch/flexmark-java

public String getTarget() {
  return myAttributes == null ? null : myAttributes.getValue(Attribute.TARGET_ATTR);
}

代码示例来源:origin: vsch/flexmark-java

String attributeValue = attributes.getValue(name).trim();
boolean relative = false;
if (attributeValue.endsWith("%")) {

代码示例来源:origin: vsch/flexmark-java

String calculateNodeId(Node node) {
  String id = htmlIdGenerator.getId(node);
  if (attributeProviderFactories.size() != 0) {
    Attributes attributes = new Attributes();
    if (id != null) attributes.replaceValue("id", id);
    for (AttributeProvider attributeProvider : myAttributeProviders) {
      attributeProvider.setAttributes(node, AttributablePart.ID, attributes);
    }
    id = attributes.getValue("id");
  }
  return id == null ? "" : id;
}

代码示例来源:origin: vsch/flexmark-java

@Override
public String getNodeId(Node node) {
  String id = htmlIdGenerator.getId(node);
  if (attributeProviderFactories.size() != 0) {
    Attributes attributes = new Attributes();
    if (id != null) attributes.replaceValue("id", id);
    for (AttributeProvider attributeProvider : attributeProviders) {
      attributeProvider.setAttributes(this.renderingNode, AttributablePart.ID, attributes);
    }
    id = attributes.getValue("id");
  }
  return id;
}

代码示例来源:origin: vsch/flexmark-java

public ResolvedLink withTitle(CharSequence title) {
  String haveTitle = myAttributes == null ? null : myAttributes.getValue(Attribute.TITLE_ATTR);
  if (title == haveTitle || haveTitle != null && haveTitle.equals(title)) return this;
  Attributes attributes = new Attributes(myAttributes);
  if (title == null) {
    attributes.remove(Attribute.TITLE_ATTR);
    if (attributes.isEmpty()) attributes = null;
  } else {
    attributes.replaceValue(Attribute.TITLE_ATTR, title);
  }
  return new ResolvedLink(myLinkType, myUrl, attributes, myStatus);
}

代码示例来源:origin: vsch/flexmark-java

public ResolvedLink withTarget(CharSequence target) {
  String haveTarget = myAttributes == null ? null : myAttributes.getValue(Attribute.TARGET_ATTR);
  if (target == haveTarget || haveTarget != null && haveTarget.equals(target)) return this;
  Attributes attributes = new Attributes(myAttributes);
  if (target == null) {
    attributes.remove(Attribute.TARGET_ATTR);
    if (attributes.isEmpty()) attributes = null;
  } else {
    attributes.replaceValue(Attribute.TARGET_ATTR, target);
  }
  return new ResolvedLink(myLinkType, myUrl, attributes, myStatus);
}

代码示例来源:origin: vsch/flexmark-java

private void setLinkAttributes(AttributablePart part, Attributes attributes) {
  if (part == LINK) {
    String linkStatus = attributes.getValue(LINK_STATUS_ATTR);
    if (LinkStatus.NOT_FOUND.isStatus(linkStatus)) {
      attributes.addValue("class", missingTargetClass);
    } else if (ZzzzzzExtension.LOCAL_ONLY.isStatus(linkStatus)) {
      attributes.addValue("class", localOnlyTargetClass);
    }
  }
}

代码示例来源:origin: vsch/flexmark-java

final Attributes attributes = context.extendRenderingNodeAttributes(useAttributes, getAttributes());
String sourcePositionAttribute = context.getHtmlOptions().sourcePositionAttribute;
String attributeValue = attributes.getValue(sourcePositionAttribute);

代码示例来源:origin: vsch/flexmark-java

String value = attributes.getValue(attrName);
out.append(sep);

代码示例来源:origin: com.vladsch.flexmark/flexmark

public String getTitle() {
  return myAttributes == null ? null : myAttributes.getValue(Attribute.TITLE_ATTR);
}

代码示例来源:origin: com.vladsch.flexmark/flexmark

public String getTarget() {
  return myAttributes == null ? null : myAttributes.getValue(Attribute.TARGET_ATTR);
}

代码示例来源:origin: vsch/flexmark-java

private void renderURL(final BasedSequence urlSrc, final DocxRendererContext docx, final String linkUrl, final Attributes attributes, final Runnable runnable) {
  P p = docx.getP();
  String linkTitle = attributes != null && attributes.contains(Attribute.TITLE_ATTR) ? attributes.getValue(Attribute.TITLE_ATTR) : "";

代码示例来源:origin: vsch/flexmark-java

imagePart = BinaryPartAbstractImage.createImagePart(docx.getPackage(), docx.getContainerPart(), bytes);
Inline inline = null;
String altText = attributes.contains("alt") ? attributes.getValue("alt") : "";
List<SectionWrapper> sections = docx.getPackage().getDocumentModel().getSections();
PageDimensions page = sections.get(sections.size() - 1).getPageDimensions();

代码示例来源:origin: com.vladsch.flexmark/flexmark

@Override
public String getNodeId(Node node) {
  String id = htmlIdGenerator.getId(node);
  if (attributeProviderFactories.size() != 0) {
    Attributes attributes = new Attributes();
    if (id != null) attributes.replaceValue("id", id);
    for (AttributeProvider attributeProvider : attributeProviders) {
      attributeProvider.setAttributes(this.renderingNode, AttributablePart.ID, attributes);
    }
    id = attributes.getValue("id");
  }
  return id;
}

代码示例来源:origin: com.vladsch.flexmark/flexmark

public ResolvedLink withTitle(CharSequence title) {
  String haveTitle = myAttributes == null ? null : myAttributes.getValue(Attribute.TITLE_ATTR);
  if (title == haveTitle || haveTitle != null && haveTitle.equals(title)) return this;
  Attributes attributes = new Attributes(myAttributes);
  if (title == null) {
    attributes.remove(Attribute.TITLE_ATTR);
    if (attributes.isEmpty()) attributes = null;
  } else {
    attributes.replaceValue(Attribute.TITLE_ATTR, title);
  }
  return new ResolvedLink(myLinkType, myUrl, attributes, myStatus);
}

代码示例来源:origin: com.vladsch.flexmark/flexmark

public ResolvedLink withTarget(CharSequence target) {
  String haveTarget = myAttributes == null ? null : myAttributes.getValue(Attribute.TARGET_ATTR);
  if (target == haveTarget || haveTarget != null && haveTarget.equals(target)) return this;
  Attributes attributes = new Attributes(myAttributes);
  if (target == null) {
    attributes.remove(Attribute.TARGET_ATTR);
    if (attributes.isEmpty()) attributes = null;
  } else {
    attributes.replaceValue(Attribute.TARGET_ATTR, target);
  }
  return new ResolvedLink(myLinkType, myUrl, attributes, myStatus);
}

代码示例来源:origin: com.vladsch.flexmark/flexmark

final Attributes attributes = context.extendRenderingNodeAttributes(useAttributes, getAttributes());
String sourcePositionAttribute = context.getHtmlOptions().sourcePositionAttribute;
String attributeValue = attributes.getValue(sourcePositionAttribute);

相关文章