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


Java DefaultElement.getName方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: CPResources

import org.dom4j.tree.DefaultElement; //导入方法依赖的package包/类
/**
 * this constructor i used when building up the cp (parsing XML manifest)
 * 
 * @param me
 */
public CPResources(final DefaultElement me) {
    super(me.getName());
    resources = new Vector<CPResource>();
    errors = new Vector<String>();

    setAttributes(me.attributes());
    setContent(me.content());
}
 
开发者ID:huihoo,项目名称:olat,代码行数:14,代码来源:CPResources.java

示例6: CPOrganizations

import org.dom4j.tree.DefaultElement; //导入方法依赖的package包/类
/**
 * this constructor is used when building up the CP (parsing XML)
 * 
 * @param me
 */
public CPOrganizations(final DefaultElement me) {
    super(me.getName());
    orgas = new Vector<CPOrganization>();
    errors = new Vector<String>();
    // setAttributes(me.attributes());
    setContent(me.content());
}
 
开发者ID:huihoo,项目名称:olat,代码行数:13,代码来源:CPOrganizations.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

示例9: addElementAfter

import org.dom4j.tree.DefaultElement; //导入方法依赖的package包/类
/**
 * adds an element to the cp. Adds it after the item with identifier "id"
 * 
 * @param newElement
 * @param id
 * @return
 */
public boolean addElementAfter(final DefaultElement newElement, final String id) {
    final DefaultElement beforeElement = rootNode.getElementByIdentifier(id);

    if (beforeElement == null) {
        return false;
    }

    if (beforeElement instanceof CPItem) {
        // beforeElement is a <item>
        // ==> newElement has to be an <item>
        final CPItem beforeItem = (CPItem) beforeElement;
        final DefaultElement parent = beforeItem.getParentElement();
        if (!(newElement instanceof CPItem)) {
            throw new OLATRuntimeException(CPOrganizations.class, "only <item> element allowed", new Exception());
        }
        if (parent instanceof CPItem) {
            final CPItem p = (CPItem) parent;
            p.addItemAt((CPItem) newElement, beforeItem.getPosition() + 1);
        } else if (parent instanceof CPOrganization) {
            final CPOrganization o = (CPOrganization) parent;
            o.addItemAt((CPItem) newElement, beforeItem.getPosition() + 1);
        } else {
            throw new OLATRuntimeException(CPOrganizations.class, "you cannot add an <item> element to a " + parent.getName() + " element", new Exception());
        }

    }

    return true;
}
 
开发者ID:huihoo,项目名称:olat,代码行数:37,代码来源:CPCore.java

示例10: CPMetadata

import org.dom4j.tree.DefaultElement; //导入方法依赖的package包/类
public CPMetadata(final DefaultElement me) {
    super(me.getName());
    setContent(me.content());
    // TODO: parse xml to LOM-Object!
}
 
开发者ID:huihoo,项目名称:olat,代码行数:6,代码来源:CPMetadata.java


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