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


Java XMLExtendedStreamReader.nextTag方法代码示例

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


在下文中一共展示了XMLExtendedStreamReader.nextTag方法的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: readElement

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void readElement(XMLExtendedStreamReader reader, List<ModelNode> list) throws XMLStreamException {
    ParseUtils.requireNoAttributes(reader);

    final PathAddress address = PathAddress.pathAddress(OpenShiftSubsystemExtension.SUBSYSTEM_PATH);
    final ModelNode subsystem = Util.getEmptyOperation(ADD, address.toModelNode());
    list.add(subsystem);

    while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
        if(reader.getLocalName().equals(Constants.MAX_LINE_LENGTH)) {
            final String value = parseElementNoAttributes(reader);
            OpenShiftSubsystemDefinition.MAX_LINE_LENGTH.parseAndSetParameter(value, subsystem, reader);
        } else if(reader.getLocalName().equals(Constants.METRICS_GROUP)) {
            readMetricsGroups(reader, address, list);
        } else {
            throw ParseUtils.unexpectedElement(reader);
        }
    }
}
 
开发者ID:ncdc,项目名称:jboss-openshift-metrics-module,代码行数:23,代码来源:OpenShiftSubsystemParser.java

示例11: readHistory

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
private void readHistory(XMLExtendedStreamReader reader, Namespace expectedNs, CliConfigImpl config) throws XMLStreamException {
    while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
        assertExpectedNamespace(reader, expectedNs);
        final String localName = reader.getLocalName();
        final String resolved = resolveString(reader.getElementText());
        if (ENABLED.equals(localName)) {
            config.historyEnabled = Boolean.parseBoolean(resolved);
        } else if (FILE_NAME.equals(localName)) {
            config.historyFileName = resolved;
        } else if (FILE_DIR.equals(localName)) {
            config.historyFileDir = resolved;
        } else if (MAX_SIZE.equals(localName)) {
            try {
                config.historyMaxSize = Integer.parseInt(resolved);
            } catch(NumberFormatException e) {
                throw new XMLStreamException("Failed to parse " + HISTORY + " " + MAX_SIZE + " value '" + resolved + "'", e);
            }
        } else {
            throw new XMLStreamException("Unexpected child of " + DEFAULT_CONTROLLER + ": " + localName);
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:23,代码来源:CliConfigImpl.java

示例12: parseDomainSocketBindingGroups

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
private void parseDomainSocketBindingGroups(final XMLExtendedStreamReader reader, final ModelNode address,
                                            final List<ModelNode> list, final Set<String> interfaces) throws XMLStreamException {
    HashSet<String> uniqueGroupNames = new HashSet<>();
    while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
        requireNamespace(reader, namespace);
        final Element element = Element.forName(reader.getLocalName());
        switch (element) {
            case SOCKET_BINDING_GROUP: {
                parseSocketBindingGroup(reader, interfaces, address, list, uniqueGroupNames);
                break;
            }
            default: {
                throw unexpectedElement(reader);
            }
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:18,代码来源:DomainXml_4.java

示例13: parseDiscoveryOptions

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

    // Handle elements
    while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
        requireNamespace(reader, namespace);
        final Element element = Element.forName(reader.getLocalName());
        switch (element) {
            case DISCOVERY_OPTION:
                parseDiscoveryOption(reader, address, list, discoveryOptionNames);
                break;
            case STATIC_DISCOVERY:
                parseStaticDiscoveryOption(reader, address, list, staticDiscoveryOptionNames);
                break;
            default:
                throw unexpectedElement(reader);
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:21,代码来源:HostXml_4.java

示例14: parseHandlersElement

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
void parseHandlersElement(final ModelNode operation, final XMLExtendedStreamReader reader) throws XMLStreamException {
    // No attributes
    if (reader.getAttributeCount() > 0) {
        throw unexpectedAttribute(reader, 0);
    }

    // Elements
    while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
        final Element element = Element.forName(reader.getLocalName());
        switch (element) {
            case HANDLER: {
                operation.add(readNameAttribute(reader));
                break;
            }
            default:
                throw unexpectedElement(reader);
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:20,代码来源:LoggingSubsystemParser_1_0.java

示例15: parseLocalDomainController

import org.jboss.staxmapper.XMLExtendedStreamReader; //导入方法依赖的package包/类
private void parseLocalDomainController(final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list) throws XMLStreamException {
    requireNoAttributes(reader);
    boolean hasDiscoveryOptions = false;
    Set<String> staticDiscoveryOptionNames = new HashSet<String>();
    Set<String> discoveryOptionNames = new HashSet<String>();
    while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
        requireNamespace(reader, namespace);
        final Element element = Element.forName(reader.getLocalName());
        switch (element) {
            case DISCOVERY_OPTIONS: {
                if (hasDiscoveryOptions) {
                    throw ControllerLogger.ROOT_LOGGER.alreadyDefined(element.getLocalName(), reader.getLocation());
                }
                parseDiscoveryOptions(reader, address, list, staticDiscoveryOptionNames, discoveryOptionNames);
                hasDiscoveryOptions = true;
                break;
            }
            default:
                throw unexpectedElement(reader);
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:23,代码来源:HostXml_6.java


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