热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.apache.ws.commons.schema.XmlSchemaSimpleTypeRestriction.getFacets()方法的使用及代码示例

本文整理了Java中org.apache.ws.commons.schema.XmlSchemaSimpleTypeRestriction.getFacets()方法的一些代码示例,展示了XmlSch

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

XmlSchemaSimpleTypeRestriction.getFacets介绍

暂无

代码示例

代码示例来源:origin: apache/cxf

private boolean isEnumeration(XmlSchemaSimpleTypeRestriction restriction) {
if ((restriction == null) || (restriction.getFacets().isEmpty())
|| (restriction.getBaseTypeName() == null)) {
return false;
}
for (XmlSchemaFacet facet : restriction.getFacets()) {
if (facet instanceof XmlSchemaEnumerationFacet) {
return true;
}
}
return false;
}

代码示例来源:origin: org.apache.cxf/cxf-core

/**
* Return true if a simple type is a straightforward XML Schema representation of an enumeration.
* If we discover schemas that are 'enum-like' with more complex structures, we might
* make this deal with them.
* @param type Simple type, possible an enumeration.
* @return true for an enumeration.
*/
public static boolean isEumeration(XmlSchemaSimpleType type) {
XmlSchemaSimpleTypeContent cOntent= type.getContent();
if (!(content instanceof XmlSchemaSimpleTypeRestriction)) {
return false;
}
XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) content;
List facets = restriction.getFacets();
for (XmlSchemaFacet facet : facets) {
if (!(facet instanceof XmlSchemaEnumerationFacet)) {
return false;
}
}
return true;
}

代码示例来源:origin: org.apache.cxf/cxf-api

/**
* Return true if a simple type is a straightforward XML Schema representation of an enumeration.
* If we discover schemas that are 'enum-like' with more complex structures, we might
* make this deal with them.
* @param type Simple type, possible an enumeration.
* @return true for an enumeration.
*/
public static boolean isEumeration(XmlSchemaSimpleType type) {
XmlSchemaSimpleTypeContent cOntent= type.getContent();
if (!(content instanceof XmlSchemaSimpleTypeRestriction)) {
return false;
}
XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) content;
List facets = restriction.getFacets();
for (XmlSchemaFacet facet : facets) {
if (!(facet instanceof XmlSchemaEnumerationFacet)) {
return false;
}
}
return true;
}

代码示例来源:origin: org.apache.cxf/cxf-common-utilities

/**
* Return true if a simple type is a straightforward XML Schema representation of an enumeration.
* If we discover schemas that are 'enum-like' with more complex structures, we might
* make this deal with them.
* @param type Simple type, possible an enumeration.
* @return true for an enumeration.
*/
public static boolean isEumeration(XmlSchemaSimpleType type) {
XmlSchemaSimpleTypeContent cOntent= type.getContent();
if (!(content instanceof XmlSchemaSimpleTypeRestriction)) {
return false;
}
XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) content;
List facets = restriction.getFacets();
for (XmlSchemaFacet facet : facets) {
if (!(facet instanceof XmlSchemaEnumerationFacet)) {
return false;
}
}
return true;
}

代码示例来源:origin: apache/cxf

/**
* Return true if a simple type is a straightforward XML Schema representation of an enumeration.
* If we discover schemas that are 'enum-like' with more complex structures, we might
* make this deal with them.
* @param type Simple type, possible an enumeration.
* @return true for an enumeration.
*/
public static boolean isEumeration(XmlSchemaSimpleType type) {
XmlSchemaSimpleTypeContent cOntent= type.getContent();
if (!(content instanceof XmlSchemaSimpleTypeRestriction)) {
return false;
}
XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) content;
List facets = restriction.getFacets();
for (XmlSchemaFacet facet : facets) {
if (!(facet instanceof XmlSchemaEnumerationFacet)) {
return false;
}
}
return true;
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

/**
* Return true if a simple type is a straightforward XML Schema representation of an enumeration.
* If we discover schemas that are 'enum-like' with more complex structures, we might
* make this deal with them.
* @param type Simple type, possible an enumeration.
* @return true for an enumeration.
*/
public static boolean isEumeration(XmlSchemaSimpleType type) {
XmlSchemaSimpleTypeContent cOntent= type.getContent();
if (!(content instanceof XmlSchemaSimpleTypeRestriction)) {
return false;
}
XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) content;
List facets = restriction.getFacets();
for (XmlSchemaFacet facet : facets) {
if (!(facet instanceof XmlSchemaEnumerationFacet)) {
return false;
}
}
return true;
}

代码示例来源:origin: apache/cxf

/**
* Retrieve the string values for an enumeration.
* @param type
*/
public static List enumeratorValues(XmlSchemaSimpleType type) {
XmlSchemaSimpleTypeContent cOntent= type.getContent();
XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) content;
List facets = restriction.getFacets();
List values = new ArrayList<>();
for (XmlSchemaFacet facet : facets) {
XmlSchemaEnumerationFacet enumFacet = (XmlSchemaEnumerationFacet) facet;
values.add(enumFacet.getValue().toString());
}
return values;
}

代码示例来源:origin: org.apache.cxf/cxf-core

/**
* Retrieve the string values for an enumeration.
* @param type
*/
public static List enumeratorValues(XmlSchemaSimpleType type) {
XmlSchemaSimpleTypeContent cOntent= type.getContent();
XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) content;
List facets = restriction.getFacets();
List values = new ArrayList<>();
for (XmlSchemaFacet facet : facets) {
XmlSchemaEnumerationFacet enumFacet = (XmlSchemaEnumerationFacet) facet;
values.add(enumFacet.getValue().toString());
}
return values;
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

/**
* Retrieve the string values for an enumeration.
* @param type
*/
public static List enumeratorValues(XmlSchemaSimpleType type) {
XmlSchemaSimpleTypeContent cOntent= type.getContent();
XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) content;
List facets = restriction.getFacets();
List values = new ArrayList();
for (XmlSchemaFacet facet : facets) {
XmlSchemaEnumerationFacet enumFacet = (XmlSchemaEnumerationFacet) facet;
values.add(enumFacet.getValue().toString());
}
return values;
}

代码示例来源:origin: org.apache.cxf/cxf-api

/**
* Retrieve the string values for an enumeration.
* @param type
*/
public static List enumeratorValues(XmlSchemaSimpleType type) {
XmlSchemaSimpleTypeContent cOntent= type.getContent();
XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) content;
List facets = restriction.getFacets();
List values = new ArrayList();
for (XmlSchemaFacet facet : facets) {
XmlSchemaEnumerationFacet enumFacet = (XmlSchemaEnumerationFacet) facet;
values.add(enumFacet.getValue().toString());
}
return values;
}

代码示例来源:origin: org.apache.cxf/cxf-common-utilities

/**
* Retrieve the string values for an enumeration.
* @param type
* @return
*/
public static List enumeratorValues(XmlSchemaSimpleType type) {
XmlSchemaSimpleTypeContent cOntent= type.getContent();
XmlSchemaSimpleTypeRestriction restriction = (XmlSchemaSimpleTypeRestriction) content;
List facets = restriction.getFacets();
List values = new ArrayList();
for (XmlSchemaFacet facet : facets) {
XmlSchemaEnumerationFacet enumFacet = (XmlSchemaEnumerationFacet) facet;
values.add(enumFacet.getValue().toString());
}
return values;
}

代码示例来源:origin: apache/cxf

private Enum createCorbaEnum(XmlSchemaSimpleTypeRestriction restrictionType, QName name,
QName schematypeName) {
Enum corbaEnum = new Enum();
corbaEnum.setType(schematypeName);
corbaEnum.setName(name.getLocalPart());
corbaEnum.setQName(name);
corbaEnum.setRepositoryID(REPO_STRING + name.getLocalPart().replace('.', '/') + IDL_VERSION);
for (XmlSchemaFacet f : restrictionType.getFacets()) {
XmlSchemaEnumerationFacet val = (XmlSchemaEnumerationFacet)f;
Enumerator enumerator = new Enumerator();
enumerator.setValue(val.getValue().toString());
corbaEnum.getEnumerator().add(enumerator);
}
return corbaEnum;
}

代码示例来源:origin: apache/cxf

@Override
public void writeSchema(XmlSchema root) {
XmlSchemaSimpleType simple = new XmlSchemaSimpleType(root, true);
simple.setName(getSchemaType().getLocalPart());
XmlSchemaSimpleTypeRestriction restriction = new XmlSchemaSimpleTypeRestriction();
restriction.setBaseTypeName(Constants.XSD_STRING);
simple.setContent(restriction);
Object[] cOnstants= getTypeClass().getEnumConstants();
List facets = restriction.getFacets();
for (Object constant : constants) {
XmlSchemaEnumerationFacet f = new XmlSchemaEnumerationFacet();
f.setValue(getValue(constant));
facets.add(f);
}
}

代码示例来源:origin: org.apache.cxf/cxf-rt-databinding-aegis

@Override
public void writeSchema(XmlSchema root) {
XmlSchemaSimpleType simple = new XmlSchemaSimpleType(root, true);
simple.setName(getSchemaType().getLocalPart());
XmlSchemaSimpleTypeRestriction restriction = new XmlSchemaSimpleTypeRestriction();
restriction.setBaseTypeName(Constants.XSD_STRING);
simple.setContent(restriction);
Object[] cOnstants= getTypeClass().getEnumConstants();
List facets = restriction.getFacets();
for (Object constant : constants) {
XmlSchemaEnumerationFacet f = new XmlSchemaEnumerationFacet();
f.setValue(getValue(constant));
facets.add(f);
}
}

代码示例来源:origin: raml-org/raml-java-parser

@Nonnull
protected XmlSchemaType createNumberSchemaType(NumberResolvedType numberTypeDefinition, QName baseType)
{
final XmlSchemaSimpleType simpleType = new XmlSchemaSimpleType(schema, false);
final XmlSchemaSimpleTypeRestriction cOntent= new XmlSchemaSimpleTypeRestriction();
content.setBaseTypeName(baseType);
if (numberTypeDefinition.getMinimum() != null)
{
final XmlSchemaMinInclusiveFacet minLength = new XmlSchemaMinInclusiveFacet();
minLength.setValue(numberTypeDefinition.getMinimum());
content.getFacets().add(minLength);
}
if (numberTypeDefinition.getMaximum() != null)
{
final XmlSchemaMaxInclusiveFacet maxLength = new XmlSchemaMaxInclusiveFacet();
maxLength.setValue(numberTypeDefinition.getMaximum());
content.getFacets().add(maxLength);
}
simpleType.setContent(content);
return simpleType;
}

代码示例来源:origin: org.raml/raml-parser-2

@Nonnull
protected XmlSchemaType createNumberSchemaType(NumberResolvedType numberTypeDefinition, QName baseType)
{
final XmlSchemaSimpleType simpleType = new XmlSchemaSimpleType(schema, false);
final XmlSchemaSimpleTypeRestriction cOntent= new XmlSchemaSimpleTypeRestriction();
content.setBaseTypeName(baseType);
if (numberTypeDefinition.getMinimum() != null)
{
final XmlSchemaMinInclusiveFacet minLength = new XmlSchemaMinInclusiveFacet();
minLength.setValue(numberTypeDefinition.getMinimum());
content.getFacets().add(minLength);
}
if (numberTypeDefinition.getMaximum() != null)
{
final XmlSchemaMaxInclusiveFacet maxLength = new XmlSchemaMaxInclusiveFacet();
maxLength.setValue(numberTypeDefinition.getMaximum());
content.getFacets().add(maxLength);
}
simpleType.setContent(content);
return simpleType;
}

代码示例来源:origin: raml-org/raml-java-parser

content.getFacets().add(minLength);
content.getFacets().add(maxLength);
content.getFacets().add(enumValue);
content.getFacets().add(patternFacet);

代码示例来源:origin: org.raml/raml-parser-2

content.getFacets().add(minLength);
content.getFacets().add(maxLength);
content.getFacets().add(enumValue);
content.getFacets().add(patternFacet);

代码示例来源:origin: apache/cxf

XmlSchemaMaxLengthFacet maxLengthFacet = new XmlSchemaMaxLengthFacet();
maxLengthFacet.setValue(boundNode.toString());
restriction.getFacets().add(maxLengthFacet);
simpleType.setContent(restriction);

代码示例来源:origin: apache/cxf

enumSchemaSimpleTypeRestriction.getFacets().add(enumeration);

推荐阅读
  • XML介绍与使用的概述及标签规则
    本文介绍了XML的基本概念和用途,包括XML的可扩展性和标签的自定义特性。同时还详细解释了XML标签的规则,包括标签的尖括号和合法标识符的组成,标签必须成对出现的原则以及特殊标签的使用方法。通过本文的阅读,读者可以对XML的基本知识有一个全面的了解。 ... [详细]
  • 本文介绍了如何使用JSONObiect和Gson相关方法实现json数据与kotlin对象的相互转换。首先解释了JSON的概念和数据格式,然后详细介绍了相关API,包括JSONObject和Gson的使用方法。接着讲解了如何将json格式的字符串转换为kotlin对象或List,以及如何将kotlin对象转换为json字符串。最后提到了使用Map封装json对象的特殊情况。文章还对JSON和XML进行了比较,指出了JSON的优势和缺点。 ... [详细]
  • 本文介绍了Android中的assets目录和raw目录的共同点和区别,包括获取资源的方法、目录结构的限制以及列出资源的能力。同时,还解释了raw目录中资源文件生成的ID,并说明了这些目录的使用方法。 ... [详细]
  • 本文讨论了在shiro java配置中加入Shiro listener后启动失败的问题。作者引入了一系列jar包,并在web.xml中配置了相关内容,但启动后却无法正常运行。文章提供了具体引入的jar包和web.xml的配置内容,并指出可能的错误原因。该问题可能与jar包版本不兼容、web.xml配置错误等有关。 ... [详细]
  • 本文整理了Java中java.lang.NoSuchMethodError.getMessage()方法的一些代码示例,展示了NoSuchMethodErr ... [详细]
  • Spring源码解密之默认标签的解析方式分析
    本文分析了Spring源码解密中默认标签的解析方式。通过对命名空间的判断,区分默认命名空间和自定义命名空间,并采用不同的解析方式。其中,bean标签的解析最为复杂和重要。 ... [详细]
  • 本文介绍了Redis的基础数据结构string的应用场景,并以面试的形式进行问答讲解,帮助读者更好地理解和应用Redis。同时,描述了一位面试者的心理状态和面试官的行为。 ... [详细]
  • Java容器中的compareto方法排序原理解析
    本文从源码解析Java容器中的compareto方法的排序原理,讲解了在使用数组存储数据时的限制以及存储效率的问题。同时提到了Redis的五大数据结构和list、set等知识点,回忆了作者大学时代的Java学习经历。文章以作者做的思维导图作为目录,展示了整个讲解过程。 ... [详细]
  • eclipse学习(第三章:ssh中的Hibernate)——11.Hibernate的缓存(2级缓存,get和load)
    本文介绍了eclipse学习中的第三章内容,主要讲解了ssh中的Hibernate的缓存,包括2级缓存和get方法、load方法的区别。文章还涉及了项目实践和相关知识点的讲解。 ... [详细]
  • 本文详细介绍了Spring的JdbcTemplate的使用方法,包括执行存储过程、存储函数的call()方法,执行任何SQL语句的execute()方法,单个更新和批量更新的update()和batchUpdate()方法,以及单查和列表查询的query()和queryForXXX()方法。提供了经过测试的API供使用。 ... [详细]
  • 标题: ... [详细]
  • flowable工作流 流程变量_信也科技工作流平台的技术实践
    1背景随着公司业务发展及内部业务流程诉求的增长,目前信息化系统不能够很好满足期望,主要体现如下:目前OA流程引擎无法满足企业特定业务流程需求,且移动端体 ... [详细]
  • 先看官方文档TheJavaTutorialshavebeenwrittenforJDK8.Examplesandpracticesdescribedinthispagedontta ... [详细]
  • 重入锁(ReentrantLock)学习及实现原理
    本文介绍了重入锁(ReentrantLock)的学习及实现原理。在学习synchronized的基础上,重入锁提供了更多的灵活性和功能。文章详细介绍了重入锁的特性、使用方法和实现原理,并提供了类图和测试代码供读者参考。重入锁支持重入和公平与非公平两种实现方式,通过对比和分析,读者可以更好地理解和应用重入锁。 ... [详细]
  • EPPlus绘制刻度线的方法及示例代码
    本文介绍了使用EPPlus绘制刻度线的方法,并提供了示例代码。通过ExcelPackage类和List对象,可以实现在Excel中绘制刻度线的功能。具体的方法和示例代码在文章中进行了详细的介绍和演示。 ... [详细]
author-avatar
含糊hagle
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有