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


Java Node.getTextContent方法代码示例

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


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

示例1: KalturaRule

import org.w3c.dom.Node; //导入方法依赖的package包/类
public KalturaRule(Element node) throws KalturaApiException {
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("message")) {
            this.message = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("actions")) {
            this.actions = ParseUtils.parseArray(KalturaAccessControlAction.class, aNode);
            continue;
        } else if (nodeName.equals("conditions")) {
            this.conditions = ParseUtils.parseArray(KalturaCondition.class, aNode);
            continue;
        } else if (nodeName.equals("contexts")) {
            this.contexts = ParseUtils.parseArray(KalturaAccessControlContextTypeHolder.class, aNode);
            continue;
        } else if (nodeName.equals("stopProcessing")) {
            this.stopProcessing = ParseUtils.parseBool(txt);
            continue;
        } 
    }
}
 
开发者ID:ITYug,项目名称:kaltura-ce-sakai-extension,代码行数:25,代码来源:KalturaRule.java

示例2: KalturaExtendingItemMrssParameter

import org.w3c.dom.Node; //导入方法依赖的package包/类
public KalturaExtendingItemMrssParameter(Element node) throws KalturaApiException {
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("xpath")) {
            this.xpath = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("identifier")) {
            this.identifier = ParseUtils.parseObject(KalturaObjectIdentifier.class, aNode);
            continue;
        } else if (nodeName.equals("extensionMode")) {
            this.extensionMode = KalturaMrssExtensionMode.get(ParseUtils.parseInt(txt));
            continue;
        } 
    }
}
 
开发者ID:ITYug,项目名称:kaltura-ce-sakai-extension,代码行数:19,代码来源:KalturaExtendingItemMrssParameter.java

示例3: KalturaAssetParamsResourceContainer

import org.w3c.dom.Node; //导入方法依赖的package包/类
public KalturaAssetParamsResourceContainer(Element node) throws KalturaApiException {
    super(node);
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("resource")) {
            this.resource = ParseUtils.parseObject(KalturaContentResource.class, aNode);
            continue;
        } else if (nodeName.equals("assetParamsId")) {
            this.assetParamsId = ParseUtils.parseInt(txt);
            continue;
        } 
    }
}
 
开发者ID:ITYug,项目名称:kaltura-ce-sakai-extension,代码行数:17,代码来源:KalturaAssetParamsResourceContainer.java

示例4: KalturaSearch

import org.w3c.dom.Node; //导入方法依赖的package包/类
public KalturaSearch(Element node) throws KalturaApiException {
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("keyWords")) {
            this.keyWords = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("searchSource")) {
            this.searchSource = KalturaSearchProviderType.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("mediaType")) {
            this.mediaType = KalturaMediaType.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("extraData")) {
            this.extraData = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("authData")) {
            this.authData = ParseUtils.parseString(txt);
            continue;
        } 
    }
}
 
开发者ID:ITYug,项目名称:kaltura-ce-sakai-extension,代码行数:25,代码来源:KalturaSearch.java

示例5: KalturaSystemPartnerOveragedLimit

import org.w3c.dom.Node; //导入方法依赖的package包/类
public KalturaSystemPartnerOveragedLimit(Element node) throws KalturaApiException {
    super(node);
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("overagePrice")) {
            this.overagePrice = ParseUtils.parseFloat(txt);
            continue;
        } else if (nodeName.equals("overageUnit")) {
            this.overageUnit = ParseUtils.parseFloat(txt);
            continue;
        } 
    }
}
 
开发者ID:ITYug,项目名称:kaltura-ce-sakai-extension,代码行数:17,代码来源:KalturaSystemPartnerOveragedLimit.java

示例6: KalturaImageFlavorParamsOutput

import org.w3c.dom.Node; //导入方法依赖的package包/类
public KalturaImageFlavorParamsOutput(Element node) throws KalturaApiException {
    super(node);
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("densityWidth")) {
            this.densityWidth = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("densityHeight")) {
            this.densityHeight = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("sizeWidth")) {
            this.sizeWidth = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("sizeHeight")) {
            this.sizeHeight = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("depth")) {
            this.depth = ParseUtils.parseInt(txt);
            continue;
        } 
    }
}
 
开发者ID:ITYug,项目名称:kaltura-ce-sakai-extension,代码行数:26,代码来源:KalturaImageFlavorParamsOutput.java

示例7: decodeChild

import org.w3c.dom.Node; //导入方法依赖的package包/类
/**
 * Reads the specified child into the given object.
 */
protected void decodeChild(mxCodec dec, Node child, Object obj) {
  String fieldname = getFieldName(((Element) child).getAttribute("as"));

  if (fieldname == null || !isExcluded(obj, fieldname, child, false)) {
    Object template = getFieldTemplate(obj, fieldname, child);
    Object value = null;

    if (child.getNodeName().equals("add")) {
      value = ((Element) child).getAttribute("value");

      if (value == null) {
        value = child.getTextContent();
      }
    } else {
      value = dec.decode(child, template);
      // System.out.println("Decoded " + child.getNodeName() + "."
      // + fieldname + "=" + value);
    }

    addObjectValue(obj, fieldname, value, template);
  }
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:26,代码来源:mxObjectCodec.java

示例8: KalturaBaseEntryFilter

import org.w3c.dom.Node; //导入方法依赖的package包/类
public KalturaBaseEntryFilter(Element node) throws KalturaApiException {
    super(node);
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("freeText")) {
            this.freeText = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("isRoot")) {
            this.isRoot = KalturaNullableBoolean.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("categoriesFullNameIn")) {
            this.categoriesFullNameIn = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("categoryAncestorIdIn")) {
            this.categoryAncestorIdIn = ParseUtils.parseString(txt);
            continue;
        } 
    }
}
 
开发者ID:ITYug,项目名称:kaltura-ce-sakai-extension,代码行数:23,代码来源:KalturaBaseEntryFilter.java

示例9: KalturaCaptionParams

import org.w3c.dom.Node; //导入方法依赖的package包/类
public KalturaCaptionParams(Element node) throws KalturaApiException {
    super(node);
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("language")) {
            this.language = KalturaLanguage.get(ParseUtils.parseString(txt));
            continue;
        } else if (nodeName.equals("isDefault")) {
            this.isDefault = KalturaNullableBoolean.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("label")) {
            this.label = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("format")) {
            this.format = KalturaCaptionType.get(ParseUtils.parseString(txt));
            continue;
        } else if (nodeName.equals("sourceParamsId")) {
            this.sourceParamsId = ParseUtils.parseInt(txt);
            continue;
        } 
    }
}
 
开发者ID:ITYug,项目名称:kaltura-ce-sakai-extension,代码行数:26,代码来源:KalturaCaptionParams.java

示例10: KalturaSearchOperator

import org.w3c.dom.Node; //导入方法依赖的package包/类
public KalturaSearchOperator(Element node) throws KalturaApiException {
    super(node);
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("type")) {
            this.type = KalturaSearchOperatorType.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("items")) {
            this.items = ParseUtils.parseArray(KalturaSearchItem.class, aNode);
            continue;
        } 
    }
}
 
开发者ID:ITYug,项目名称:kaltura-ce-sakai-extension,代码行数:17,代码来源:KalturaSearchOperator.java

示例11: KalturaUrlResource

import org.w3c.dom.Node; //导入方法依赖的package包/类
public KalturaUrlResource(Element node) throws KalturaApiException {
    super(node);
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("url")) {
            this.url = ParseUtils.parseString(txt);
            continue;
        } 
    }
}
 
开发者ID:ITYug,项目名称:kaltura-ce-sakai-extension,代码行数:14,代码来源:KalturaUrlResource.java

示例12: test

import org.w3c.dom.Node; //导入方法依赖的package包/类
public static String test(NodeList list) {
    Node node = list.item(0);
    return "["+node.getNodeName() + ":" + node.getTextContent()+"]";
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:DocumentExtFunc.java

示例13: KalturaConversionProfileAssetParamsListResponse

import org.w3c.dom.Node; //导入方法依赖的package包/类
public KalturaConversionProfileAssetParamsListResponse(Element node) throws KalturaApiException {
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("objects")) {
            this.objects = ParseUtils.parseArray(KalturaConversionProfileAssetParams.class, aNode);
            continue;
        } else if (nodeName.equals("totalCount")) {
            this.totalCount = ParseUtils.parseInt(txt);
            continue;
        } 
    }
}
 
开发者ID:ITYug,项目名称:kaltura-ce-sakai-extension,代码行数:16,代码来源:KalturaConversionProfileAssetParamsListResponse.java

示例14: performNodeValueChecks

import org.w3c.dom.Node; //导入方法依赖的package包/类
/**
 * Performs all attribute value checks contained in the validation profile. If the validation has failed (some of the attributes
 * specified in the validation profile do not match their specified values or regex) {@link WrongNodeValue} or
 * {@link InvalidNodeValue} is thrown.
 *
 * @param sipPath path to the SIP
 * @param validationProfileDoc document with the validation profile
 * @param validationProfileId id of the validation profile
 * @throws IOException if some of the files addressed from the validation profile is not found
 * @throws XPathExpressionException if there is an error in the XPath expression
 * @throws SAXException if the validationProfileDoc cannot be parsed
 * @throws ParserConfigurationException
 */
private void performNodeValueChecks(String sipPath, Document validationProfileDoc, String validationProfileId)
        throws IOException, ParserConfigurationException, XPathExpressionException, SAXException {
    XPath xPath =  XPathFactory.newInstance().newXPath();

    NodeList nodes = (NodeList) xPath.compile("/profile/rule/nodeCheck")
            .evaluate(validationProfileDoc, XPathConstants.NODESET);
    for (int i = 0; i< nodes.getLength(); i++) {
        Element element = (Element) nodes.item(i);

        String filePath = element.getElementsByTagName("filePath").item(0).getTextContent();
        String absoluteFilePath = sipPath + filePath;

        String expression = element.getElementsByTagName("xPath").item(0).getTextContent();

        String actualValue =  ValidationChecker.findWithXPath(new FileInputStream(absoluteFilePath), expression).item(0).getTextContent();

        Node valueElement = element.getElementsByTagName("value").item(0);
        if (valueElement != null) {
            String expectedValue = valueElement.getTextContent();
            // compare with value
            if (!expectedValue.equals(actualValue)) {
                log.info("Validation of SIP with profile " + validationProfileId + " failed. Expected value of node at path \"" +
                        expression + "\" is " + expectedValue + ". Actual value is " + actualValue + ".");
                throw new WrongNodeValue(expectedValue, actualValue, absoluteFilePath, expression);                }
        } else {
            //compare with regex
            Node regexElement = element.getElementsByTagName("regex").item(0);
            String regex = regexElement.getTextContent();
            Pattern pattern = Pattern.compile(regex);
            Matcher m = pattern.matcher(actualValue);
            if (!m.matches()) {
                log.info("Validation of SIP with profile " + validationProfileId + " failed. Value " + actualValue + " of node at " +
                        "path \"" + expression + "\" does not match regex " + regex + ".");
                throw new InvalidNodeValue(regex, actualValue, absoluteFilePath, expression);                }
        }
    }
}
 
开发者ID:LIBCAS,项目名称:ARCLib,代码行数:51,代码来源:ValidationService.java

示例15: KalturaAccessControlProfile

import org.w3c.dom.Node; //导入方法依赖的package包/类
public KalturaAccessControlProfile(Element node) throws KalturaApiException {
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("id")) {
            this.id = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("partnerId")) {
            this.partnerId = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("name")) {
            this.name = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("systemName")) {
            this.systemName = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("description")) {
            this.description = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("createdAt")) {
            this.createdAt = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("updatedAt")) {
            this.updatedAt = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("isDefault")) {
            this.isDefault = KalturaNullableBoolean.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("rules")) {
            this.rules = ParseUtils.parseArray(KalturaRule.class, aNode);
            continue;
        } 
    }
}
 
开发者ID:ITYug,项目名称:kaltura-ce-sakai-extension,代码行数:37,代码来源:KalturaAccessControlProfile.java


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