nu.xom.Attribute.getType()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(115)

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

Attribute.getType介绍

[英]Returns the DTD type of this attribute. If this attribute does not have a type, then Type.UNDECLARED is returned.
[中]返回此属性的DTD类型。如果此属性没有类型,则返回Type.UNDECLARED

代码示例

代码示例来源:origin: org.teiid/saxon-xom

/**
 * Determine whether this node has the is-idref property
 *
 * @return true if the node is an IDREF or IDREFS element or attribute
 */
public boolean isIdref() {
  return getNodeKind() == Type.ATTRIBUTE && (
      ((Attribute) node).getType() == Attribute.Type.IDREF ||
          ((Attribute) node).getType() == Attribute.Type.IDREFS);
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

/**
 * Determine whether this node has the is-idref property
 *
 * @return true if the node is an IDREF or IDREFS element or attribute
 */
public boolean isIdref() {
  return getNodeKind() == Type.ATTRIBUTE && (
      ((Attribute) node).getType() == Attribute.Type.IDREF ||
          ((Attribute) node).getType() == Attribute.Type.IDREFS);
}

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

/**
 * Determine whether this node has the is-idref property
 *
 * @return true if the node is an IDREF or IDREFS element or attribute
 */
public boolean isIdref() {
  return getNodeKind() == Type.ATTRIBUTE && (
      ((Attribute) node).getType() == Attribute.Type.IDREF ||
          ((Attribute) node).getType() == Attribute.Type.IDREFS);
}

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

/**
 * Determine whether this node has the is-id property
 *
 * @return true if the node is an ID
 */
public boolean isId() {
  return getNodeKind() == Type.ATTRIBUTE && ((Attribute) node).getType() == Attribute.Type.ID;
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

/**
 * Determine whether this node has the is-id property
 *
 * @return true if the node is an ID
 */
public boolean isId() {
  return getNodeKind() == Type.ATTRIBUTE && ((Attribute) node).getType() == Attribute.Type.ID;
}

代码示例来源:origin: org.teiid/saxon-xom

/**
 * Determine whether this node has the is-id property
 *
 * @return true if the node is an ID
 */
public boolean isId() {
  return getNodeKind() == Type.ATTRIBUTE && ((Attribute) node).getType() == Attribute.Type.ID;
}

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

/** Reuses XOM's way of representing attribute types */
public static byte getAttributeTypeCode(Attribute attr) {
  return (byte) attr.getType().hashCode();
}

代码示例来源:origin: org.teiid/saxon-xom

/** Reuses XOM's way of representing attribute types */
public static byte getAttributeTypeCode(Attribute attr) {
  return (byte) attr.getType().hashCode();
}

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

private void buildIDIndex(Element elem) {
  // walk the tree in reverse document order, to satisfy the XPath 1.0 rule
  // that says if an ID appears twice, the first one wins
  for (int i = elem.getChildCount(); --i >= 0; ) {
    Node child = elem.getChild(i);
    if (child instanceof Element) {
      buildIDIndex((Element) child);
    }
  }
  for (int i = elem.getAttributeCount(); --i >= 0; ) {
    Attribute att = elem.getAttribute(i);
    if (att.getType() == Attribute.Type.ID) {
      idIndex.put(att.getValue(), wrap(elem));
    }
  }
}

代码示例来源:origin: org.teiid/saxon-xom

private void buildIDIndex(Element elem) {
  // walk the tree in reverse document order, to satisfy the XPath 1.0 rule
  // that says if an ID appears twice, the first one wins
  for (int i = elem.getChildCount(); --i >= 0; ) {
    Node child = elem.getChild(i);
    if (child instanceof Element) {
      buildIDIndex((Element) child);
    }
  }
  for (int i = elem.getAttributeCount(); --i >= 0; ) {
    Attribute att = elem.getAttribute(i);
    if (att.getType() == Attribute.Type.ID) {
      idIndex.put(att.getValue(), wrap(elem));
    }
  }
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

private void buildIDIndex(Element elem) {
  // walk the tree in reverse document order, to satisfy the XPath 1.0 rule
  // that says if an ID appears twice, the first one wins
  for (int i=elem.getChildCount(); --i >= 0 ; ) {
    Node child = elem.getChild(i);
    if (child instanceof Element) {
      buildIDIndex((Element)child);
    }
  }
  for (int i=elem.getAttributeCount(); --i >= 0 ; ) {
    Attribute att = elem.getAttribute(i);
    if (att.getType() == Attribute.Type.ID) {
      idIndex.put(att.getValue(), wrap(elem));
    }
  }
}

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

if (attr.getType() != type) attr.setType(type);
attr.setValue(value);
return attr;

代码示例来源:origin: org.teiid/saxon-xom

if (attr.getType() != type) attr.setType(type);
attr.setValue(value);
return attr;

相关文章