本文整理汇总了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);
}
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
}
}
示例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);
}
}
}
}
示例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);
}
}
}
}
示例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));
}
示例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);
}
示例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);
}
示例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);
}
}
}
}
示例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);
}
}
}
}
示例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);
}
}
}