当前位置: 首页>>代码示例>>Java>>正文


Java DefaultElement.attributeValue方法代码示例

本文整理汇总了Java中org.dom4j.tree.DefaultElement.attributeValue方法的典型用法代码示例。如果您正苦于以下问题:Java DefaultElement.attributeValue方法的具体用法?Java DefaultElement.attributeValue怎么用?Java DefaultElement.attributeValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.dom4j.tree.DefaultElement的用法示例。


在下文中一共展示了DefaultElement.attributeValue方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: handleMacrosNode

import org.dom4j.tree.DefaultElement; //导入方法依赖的package包/类
private void handleMacrosNode(Element xmlChannel) throws IOException {

    for (Object attrObj : xmlChannel.elements()) {
      DefaultElement e = (DefaultElement) attrObj;

      StringWriter sw = new StringWriter();
      XMLWriter writer = new XMLWriter(sw);
      writer.write(e.elements());

      if (this.tasker.getMacros().containsKey(e.attributeValue("name"))) {
        throw new RuntimeException("Macro " + e.attributeValue("name") + " already exists in map.");
      }

      this.tasker.getMacros().put(e.attributeValue("name"), sw.toString());
      this.tasker.getMacroAttrs().put(e.attributeValue("name"), e.attributes());
    }

  }
 
开发者ID:brunocvcunha,项目名称:taskerbox,代码行数:19,代码来源:TaskerboxXmlReader.java

示例2: handleDefaultPropertiesNode

import org.dom4j.tree.DefaultElement; //导入方法依赖的package包/类
private void handleDefaultPropertiesNode(Element xmlChannel) {
  for (Object attrObj : xmlChannel.elements()) {
    DefaultElement e = (DefaultElement) attrObj;

    String propertyValue = e.attributeValue("value");

    for (String defaultAttr : this.tasker.getDefaultProperties().keySet()) {
      propertyValue =
          propertyValue.replace("{" + defaultAttr + "}",
              this.tasker.getDefaultProperties().get(defaultAttr));
    }

    this.tasker.getDefaultProperties().put(e.attributeValue("name"), propertyValue);

  }
}
 
开发者ID:brunocvcunha,项目名称:taskerbox,代码行数:17,代码来源:TaskerboxXmlReader.java

示例3: CPResource

import org.dom4j.tree.DefaultElement; //导入方法依赖的package包/类
/**
 * this constructor is needed when building up the datamodel (parsing XML-manifest)
 * 
 * @param me
 */
public CPResource(final DefaultElement me) {
    super(me.getName());
    files = new Vector<CPFile>();
    dependencies = new Vector<CPDependency>();

    // setAttributes(me.attributes());
    setContent(me.content());

    this.identifier = me.attributeValue(CPCore.IDENTIFIER);
    this.type = me.attributeValue(CPCore.TYPE);
    this.href = me.attributeValue(CPCore.HREF);
    this.xmlbase = me.attributeValue(CPCore.BASE, "");

}
 
开发者ID:huihoo,项目名称:olat,代码行数:20,代码来源:CPResource.java

示例4: CPOrganization

import org.dom4j.tree.DefaultElement; //导入方法依赖的package包/类
/**
 * this constructor is used when the cp is built (parsing XML manifest file)
 * 
 * @param me
 */
CPOrganization(final DefaultElement me) {
    super(me.getName());
    items = new Vector<CPItem>();
    errors = new Vector<String>();
    setAttributes(me.attributes());
    setContent(me.content());

    this.identifier = me.attributeValue(CPCore.IDENTIFIER);
    this.structure = me.attributeValue(CPCore.STRUCTURE, "hierarchical");
    // this.title = me.

}
 
开发者ID:huihoo,项目名称:olat,代码行数:18,代码来源:CPOrganization.java

示例5: CPItem

import org.dom4j.tree.DefaultElement; //导入方法依赖的package包/类
/**
 * constructor is needed while building the datamodel-tree (parsing XML)
 * 
 * @param me
 */
public CPItem(final DefaultElement me, final DefaultElement parent) {
    super(me.getName());
    items = new Vector<CPItem>();
    errors = new Vector<String>();

    // setAttributes(me.attributes());
    setContent(me.content());
    this.parent = parent;
    this.identifier = me.attributeValue(CPCore.IDENTIFIER);
    this.identifierRef = me.attributeValue(CPCore.IDENTIFIERREF, "");

    final String val = me.attributeValue(CPCore.ISVISIBLE, "true");
    this.visible = (val != null && val.equals("true"));
}
 
开发者ID:huihoo,项目名称:olat,代码行数:20,代码来源:CPItem.java

示例6: CPFile

import org.dom4j.tree.DefaultElement; //导入方法依赖的package包/类
/**
 * Constructor, used when building up the cp (parsing XML-manifest)
 * 
 * @param me
 * @param xmlBase
 *            xmlBase-attribute of the parental resource-element
 * @param packageFolder
 *            TODO
 */
public CPFile(final DefaultElement me, final String xmlBase, final VFSContainer rootDir) {
    super(me.getName());
    setContent(me.content());
    this.href = me.attributeValue(CPCore.HREF);
    if (xmlBase.equals("")) {
        file = (VFSLeaf) rootDir.resolve(href);
    } else {
        file = (VFSLeaf) rootDir.resolve(xmlBase + "/" + href);
    }
}
 
开发者ID:huihoo,项目名称:olat,代码行数:20,代码来源:CPFile.java

示例7: CPManifest

import org.dom4j.tree.DefaultElement; //导入方法依赖的package包/类
/**
 * this constructor is used when building up the cp (parsing XML)
 * 
 * @param me
 */
public CPManifest(final CPCore cp, final DefaultElement me) {
    super(me.getName());
    errors = new Vector<String>();
    this.identifier = me.attributeValue(CPCore.IDENTIFIER);
    this.schemaLocation = me.attributeValue(CPCore.SCHEMALOCATION);
    this.setNamespace(me.getNamespace());
    this.cp = cp;
    // FIXME: namespaces ! xmlns
    setContent(me.content());
}
 
开发者ID:huihoo,项目名称:olat,代码行数:16,代码来源:CPManifest.java

示例8: CPDependency

import org.dom4j.tree.DefaultElement; //导入方法依赖的package包/类
/**
 * this constructor is neeeded when building up the cp (parsing XML manifest file)
 * 
 * @param me
 */
public CPDependency(final DefaultElement me) {
    super(me.getName());
    identifierRef = me.attributeValue(CPCore.IDENTIFIERREF);
    if (identifierRef.equals(null)) {
        throw new OLATRuntimeException(CPOrganizations.class, "Invalid IMS-Manifest ( <dependency> element without identifierref )", new Exception());
    }
}
 
开发者ID:huihoo,项目名称:olat,代码行数:13,代码来源:CPDependency.java


注:本文中的org.dom4j.tree.DefaultElement.attributeValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。