gpt4 book ai didi

org.apache.chemistry.opencmis.commons.impl.XMLUtils.readText()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 07:24:40 26 4
gpt4 key购买 nike

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

XMLUtils.readText介绍

[英]Parses a tag that contains text.
[中]解析包含文本的标记。

代码示例

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-commons-impl

protected String readText(final XMLStreamReader parser) throws XMLStreamException {
  assert parser != null;
  return XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH);
}

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-android-client

protected String readText(final XmlPullParser parser) throws XmlPullParserException {
  return XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH);
}

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-client-bindings

/**
   * Parses a text tag and convert it into an integer.
   */
  private static AtomElement parseBigInteger(XMLStreamReader parser) throws XMLStreamException {
    QName name = parser.getName();
    return new AtomElement(name, new BigInteger(XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH)));
  }
}

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-client-bindings

/**
 * Parses a text tag.
 */
private static AtomElement parseText(XMLStreamReader parser) throws XMLStreamException {
  QName name = parser.getName();
  return new AtomElement(name, XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH));
}

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-android-client

/**
   * Parses a text tag and convert it into an integer.
   */
  private static AtomElement parseBigInteger(XmlPullParser parser) throws XmlPullParserException {
    QName name = new QName(parser.getNamespace(), parser.getName());
    return new AtomElement(name, new BigInteger(XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH)));
  }
}

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-android-client

/**
 * Parses a text tag.
 * 
 * @throws XmlPullParserException
 */
private static AtomElement parseText(XmlPullParser parser) throws XmlPullParserException {
  QName name = new QName(parser.getNamespace(), parser.getName());
  return new AtomElement(name, XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH));
}

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-client-bindings

if (XMLConstants.NAMESPACE_RESTATOM.equals(tagName.getNamespaceURI())) {
  if (TAG_TEMPLATE_TEMPLATE.equals(tagName.getLocalPart())) {
    result.put("template", XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH));
  } else if (TAG_TEMPLATE_TYPE.equals(tagName.getLocalPart())) {
    result.put("type", XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH));
  } else {
    XMLUtils.skip(parser);

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-client-bindings

/**
 * Parses a collection tag.
 */
private static AtomElement parseCollection(XMLStreamReader parser) throws XMLStreamException {
  QName name = parser.getName();
  Map<String, String> result = new HashMap<String, String>();
  result.put("href", parser.getAttributeValue(null, "href"));
  XMLUtils.next(parser);
  while (true) {
    int event = parser.getEventType();
    if (event == XMLStreamConstants.START_ELEMENT) {
      QName tagName = parser.getName();
      if (XMLConstants.NAMESPACE_RESTATOM.equals(tagName.getNamespaceURI())
          && TAG_COLLECTION_TYPE.equals(tagName.getLocalPart())) {
        result.put("collectionType", XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH));
      } else {
        XMLUtils.skip(parser);
      }
    } else if (event == XMLStreamConstants.END_ELEMENT) {
      break;
    } else {
      if (!XMLUtils.next(parser)) {
        break;
      }
    }
  }
  XMLUtils.next(parser);
  return new AtomElement(name, result);
}

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-android-client

/**
 * Parses a collection tag.
 */
private static AtomElement parseCollection(XmlPullParser parser) throws XmlPullParserException {
  QName name = new QName(parser.getNamespace(), parser.getName());
  Map<String, String> result = new HashMap<String, String>();
  result.put("href", parser.getAttributeValue(null, "href"));
  XMLUtils.next(parser);
  while (true) {
    int event = parser.getEventType();
    if (event == XmlPullParser.START_TAG) {
      QName tagName = new QName(parser.getNamespace(), parser.getName());
      if (XMLConstants.NAMESPACE_RESTATOM.equals(tagName.getNamespaceURI())
          && TAG_COLLECTION_TYPE.equals(tagName.getLocalPart())) {
        result.put("collectionType", XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH));
      } else {
        XMLUtils.skip(parser);
      }
    } else if (event == XmlPullParser.END_TAG) {
      break;
    } else {
      if (!XMLUtils.next(parser)) {
        break;
      }
    }
  }
  XMLUtils.next(parser);
  return new AtomElement(name, result);
}

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-android-client

if (XMLConstants.NAMESPACE_RESTATOM.equals(tagName.getNamespaceURI())) {
  if (TAG_TEMPLATE_TEMPLATE.equals(tagName.getLocalPart())) {
    result.put("template", XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH));
  } else if (TAG_TEMPLATE_TYPE.equals(tagName.getLocalPart())) {
    result.put("type", XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH));
  } else {
    XMLUtils.skip(parser);

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-server-bindings

parseAtomContent(parser);
} else if (TAG_TITLE.equals(name.getLocalPart())) {
  atomTitle = XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH);
} else {
  XMLUtils.skip(parser);

代码示例来源:origin: org.apache.chemistry.opencmis/chemistry-opencmis-server-bindings

cmisContentStream.setMimeType(XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH));
} else if (TAG_BASE64.equals(name.getLocalPart())) {
  TempStoreOutputStream tsos = readBase64(parser, cmisContentStream.getMimeType(),
  cmisContentStream.setFileName(XMLUtils.readText(parser, XMLConstraints.MAX_STRING_LENGTH));
} else {
  XMLUtils.skip(parser);

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com