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


Java XMLExtendedStreamReader.hasNext方法代码示例

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


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

示例1: readElement

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException {
    PathAddress address = PathAddress.pathAddress(PathElement.pathElement(SUBSYSTEM, SmppExtension.SUBSYSTEM_NAME));

    final ModelNode subsystem = new ModelNode();
    subsystem.get(OP).set(ADD);
    subsystem.get(OP_ADDR).set(address.toModelNode());
    list.add(subsystem);

    // mbean elements
    while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
        switch (Namespace.forUri(reader.getNamespaceURI())) {
            case SMPPEXT_1_0: {
                final String tagName = reader.getLocalName();
                if (tagName.equals(SmppMbeanDefinition.MBEAN)) {
                    parseMbean(reader, address, list);
                }
                break;
            }
            default: {
                throw unexpectedElement(reader);
            }
        }
    }
}
 
开发者ID:RestComm,项目名称:smpp-extensions,代码行数:29,代码来源:SmppSubsystemParser.java

示例2: parseObjectReplicator

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
private ModelNode parseObjectReplicator(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
   	if (reader.getAttributeCount() > 0) {
   		for(int i=0; i<reader.getAttributeCount(); i++) {
   			String attrName = reader.getAttributeLocalName(i);
   			String attrValue = reader.getAttributeValue(i);
   			
   			Element element = Element.forName(attrName, Element.DISTRIBUTED_CACHE);
   			switch(element) {
   			case DC_STACK_ATTRIBUTE:
   				node.get(element.getModelName()).set(attrValue);
   				break;
               default: 
                   throw ParseUtils.unexpectedAttribute(reader, i);
   			}    			
   		}
   	}
       while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT));
   	return node;
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:20,代码来源:TeiidSubsystemParser.java

示例3: parsePg

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
private ModelNode parsePg(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
	if (reader.getAttributeCount() > 0) {
		for(int i=0; i<reader.getAttributeCount(); i++) {
			String attrName = reader.getAttributeLocalName(i);
			String attrValue = reader.getAttributeValue(i);
			Element element = Element.forName(attrName, Element.PG_ELEMENT);
			
			switch(element) {
			case PG_MAX_LOB_SIZE_ALLOWED_ELEMENT:
				node.get(element.getModelName()).set(attrValue);
				break;
			default:
				throw ParseUtils.unexpectedAttribute(reader, i);    			
			}
		}
	}
    while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT));
	return node;
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:20,代码来源:TeiidSubsystemParser.java

示例4: parseTruststore

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
private ModelNode parseTruststore(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
	if (reader.getAttributeCount() > 0) {
		for(int i=0; i<reader.getAttributeCount(); i++) {
			String attrName = reader.getAttributeLocalName(i);
			String attrValue = reader.getAttributeValue(i);
			Element element = Element.forName(attrName, Element.SSL_TRUSTSTORE_ELEMENT);
			
			switch(element) {
			case SSL_TRUSTSTORE_NAME_ATTRIBUTE:
				node.get(element.getModelName()).set(attrValue);
				break;
				
			case SSL_TRUSTSTORE_PASSWORD_ATTRIBUTE:
				node.get(element.getModelName()).setExpression(attrValue);
				break;
				
			default:
				throw ParseUtils.unexpectedAttribute(reader, i);    			
			}
		}
	}
    while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT));
	return node;
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:25,代码来源:TeiidSubsystemParser.java

示例5: parsePreparedPlanCacheConfiguration

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
private ModelNode parsePreparedPlanCacheConfiguration(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
	if (reader.getAttributeCount() > 0) {
		for(int i=0; i<reader.getAttributeCount(); i++) {
			String attrName = reader.getAttributeLocalName(i);
			String attrValue = reader.getAttributeValue(i);
			Element element = Element.forName(attrName, Element.PREPAREDPLAN_CACHE_ELEMENT);
			switch(element) {
			case PPC_CONTAINER_NAME_ELEMENT:
				node.get(element.getModelName()).set(attrValue);
				break;
			case PPC_ENABLE_ATTRIBUTE:
				node.get(element.getModelName()).set(Boolean.parseBoolean(attrValue));
				break;
			case PPC_NAME_ATTRIBUTE:
				node.get(element.getModelName()).set(attrValue);
				break;
			default: 
            	throw ParseUtils.unexpectedAttribute(reader, i);
			} 
		}
	}    	
    while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT));
	return node;
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:25,代码来源:TeiidSubsystemParser.java

示例6: parseTranslator

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
private String parseTranslator(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException {
	String translatorName = null;
	if (reader.getAttributeCount() > 0) {
		for(int i=0; i<reader.getAttributeCount(); i++) {
			String attrName = reader.getAttributeLocalName(i);
			String attrValue = reader.getAttributeValue(i);
			
			Element element = Element.forName(attrName);
			switch(element) {
			case TRANSPORT_NAME_ATTRIBUTE:
			case TRANSLATOR_NAME_ATTRIBUTE:
				translatorName = attrValue;
				break;
			case TRANSLATOR_MODULE_ATTRIBUTE:
				node.get(element.getModelName()).set(attrValue);
				break;
			default: 
            	throw ParseUtils.unexpectedAttribute(reader, i);
			}
		}
	}      	
	while (reader.hasNext() && (reader.nextTag() != XMLStreamConstants.END_ELEMENT)) {
		throw ParseUtils.unexpectedElement(reader);
	}
	return translatorName;
}
 
开发者ID:kenweezy,项目名称:teiid,代码行数:27,代码来源:TeiidSubsystemParser.java

示例7: parseSecurityConfigsElement

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
void parseSecurityConfigsElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException {

        // Handle attributes
        requireNoAttributes(reader);

        // Handle module elements
        while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
            if (reader.getNamespaceURI().equals(SwitchYardExtension.NAMESPACE)) {
                final Element element = Element.forName(reader.getLocalName());
                if (element == Element.SECURITY_CONFIG) {
                    parseSecurityConfigElement(reader, list);
                } else {
                    throw unexpectedElement(reader);
                }
            }
        }
    }
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:18,代码来源:SwitchYardSubsystemReader.java

示例8: parseModulesElement

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
void parseModulesElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException {

        // Handle attributes
        requireNoAttributes(reader);

        // Handle module elements
        while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
            if (reader.getNamespaceURI().equals(SwitchYardExtension.NAMESPACE)) {
                final Element element = Element.forName(reader.getLocalName());
                if (element == Element.MODULE) {
                    parseModuleElement(reader, list);
                } else {
                    throw unexpectedElement(reader);
                }
            }
        }
    }
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:18,代码来源:SwitchYardSubsystemReader.java

示例9: parseExtensionsElement

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
void parseExtensionsElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException {

        // Handle attributes
        requireNoAttributes(reader);

        // Handle module elements
        while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
            if (reader.getNamespaceURI().equals(SwitchYardExtension.NAMESPACE)) {
                final Element element = Element.forName(reader.getLocalName());
                if (element == Element.EXTENSION) {
                    parseExtensionElement(reader, list);
                } else {
                    throw unexpectedElement(reader);
                }
            }
        }
    }
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:18,代码来源:SwitchYardSubsystemReader.java

示例10: parseGroupToPrincipal

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
private void parseGroupToPrincipal(final XMLExtendedStreamReader reader, final ModelNode parentAddress,
        final ModelNode addOp) throws XMLStreamException {

    parseGroupToPrincipalAttributes(reader, addOp);

    boolean elementFound = false;
    while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
        requireNamespace(reader, namespace);

        final Element element = Element.forName(reader.getLocalName());
        if (elementFound) {
            throw unexpectedElement(reader);
        }
        elementFound = true;
        switch (element) {
            case MEMBERSHIP_FILTER:
                parseMembershipFilter(reader, addOp);
                break;
            default: {
                throw unexpectedElement(reader);
            }
        }
    }

    addOp.get(OP_ADDR).set(parentAddress.clone().add(GROUP_TO_PRINCIPAL));
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:27,代码来源:ManagementXml_4.java

示例11: parseNativeManagementInterface

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
private void parseNativeManagementInterface(XMLExtendedStreamReader reader, ModelNode address, List<ModelNode> list) throws XMLStreamException {
    final ModelNode operationAddress = address.clone();
    operationAddress.add(MANAGEMENT_INTERFACE, NATIVE_INTERFACE);
    final ModelNode addOp = Util.getEmptyOperation(ADD, operationAddress);

    // Handle attributes
    parseNativeManagementInterfaceAttributes(reader, addOp);

    // Handle elements
    while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
        requireNamespace(reader, namespace);
        final Element element = Element.forName(reader.getLocalName());
        switch (element) {
            case SOCKET:
                throw ControllerLogger.ROOT_LOGGER.unsupportedElement(reader.getName(),reader.getLocation(), SOCKET_BINDING);
            case SOCKET_BINDING:
                parseNativeManagementSocketBinding(reader, addOp);
                break;
            default:
                throw unexpectedElement(reader);
        }
    }

    list.add(addOp);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:26,代码来源:StandaloneXml_5.java

示例12: parseNativeManagementInterface

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
private void parseNativeManagementInterface(XMLExtendedStreamReader reader, ModelNode address, List<ModelNode> list)  throws XMLStreamException {

        final ModelNode operationAddress = address.clone();
        operationAddress.add(MANAGEMENT_INTERFACE, NATIVE_INTERFACE);
        final ModelNode addOp = Util.getEmptyOperation(ADD, operationAddress);

        // Handle attributes
        parseNativeManagementInterfaceAttributes(reader, addOp);

        // Handle elements
        while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
            requireNamespace(reader, namespace);
            final Element element = Element.forName(reader.getLocalName());
            switch (element) {
                case SOCKET:
                    parseNativeManagementSocket(reader, addOp);
                    break;
                default:
                    throw unexpectedElement(reader);
            }
        }

        list.add(addOp);
    }
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:25,代码来源:HostXml_6.java

示例13: parseServerGroupScopedRoles

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
public void parseServerGroupScopedRoles(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list) throws XMLStreamException {

        ParseUtils.requireNoAttributes(reader);

        String scopedRoleType = ServerGroupScopedRoleResourceDefinition.PATH_ELEMENT.getKey();

        while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
            requireNamespace(reader, namespace);
            final Element element = Element.forName(reader.getLocalName());
            switch (element) {
                case ROLE: {
                    parseScopedRole(reader, address, list, scopedRoleType, Element.SERVER_GROUP,
                            ServerGroupScopedRoleResourceDefinition.BASE_ROLE, ServerGroupScopedRoleResourceDefinition.SERVER_GROUPS, true);
                    break;
                }
                default: {
                    throw unexpectedElement(reader);
                }
            }
        }
    }
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:22,代码来源:AccessControlXml.java

示例14: parsePlugIns

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
private void parsePlugIns(final XMLExtendedStreamReader reader, final ModelNode realmAddress, final List<ModelNode> list)
        throws XMLStreamException {
    while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
        requireNamespace(reader, namespace);

        final Element element = Element.forName(reader.getLocalName());
        switch (element) {
            case PLUG_IN: {
                ModelNode plugIn = new ModelNode();
                plugIn.get(OP).set(ADD);
                String moduleValue = readStringAttributeElement(reader, Attribute.MODULE.getLocalName());
                final ModelNode newAddress = realmAddress.clone();
                newAddress.add(PLUG_IN, moduleValue);
                plugIn.get(OP_ADDR).set(newAddress);

                list.add(plugIn);
                break;
            }
            default: {
                throw unexpectedElement(reader);
            }
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:25,代码来源:ManagementXml_Legacy.java

示例15: parseKerberosIdentity

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
private void parseKerberosIdentity(final XMLExtendedStreamReader reader,
        final ModelNode realmAddress, final List<ModelNode> list) throws XMLStreamException {

    ModelNode kerberos = new ModelNode();
    kerberos.get(OP).set(ADD);
    ModelNode kerberosAddress = realmAddress.clone().add(SERVER_IDENTITY, KERBEROS);
    kerberos.get(OP_ADDR).set(kerberosAddress);
    list.add(kerberos);

    while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
        requireNamespace(reader, namespace);
        final Element element = Element.forName(reader.getLocalName());
        switch (element) {
            case KEYTAB:
                parseKeyTab(reader, kerberosAddress, list);
                break;
            default:
                throw unexpectedElement(reader);
        }

    }

}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:24,代码来源:ManagementXml_4.java


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