@Override public XMLEventParser allocate(XMLEventParserContext ctx, XMLEvent event) { XMLEventParser defaultParser = null; if (ctx.isStartElement(event, ONLINE_RESOURCE)) defaultParser = new OGCOnlineResource(this.getNamespaceURI()); return ctx.allocate(event, defaultParser); }
protected void doParseEventContent(XMLEventParserContext ctx, XMLEvent event, Object... args) throws XMLStreamException { if (ctx.isStartElement(event, "Format")) { String s = ctx.getStringParser().parseString(ctx, event); if (!WWUtil.isEmpty(s)) this.formats.add(s); } else { super.doParseEventContent(ctx, event, args); } }
@Override public XMLEventParser allocate(XMLEventParserContext ctx, XMLEvent event) { XMLEventParser defaultParser = null; if (ctx.isStartElement(event, ONLINE_RESOURCE)) { defaultParser = new OGCOnlineResource(this.getNamespaceURI()); } else if (ctx.isStartElement(event, CONTACT_INFORMATION)) defaultParser = new OGCContactInformation(this.getNamespaceURI()); else if (ctx.isStartElement(event, KEYWORD_LIST)) defaultParser = new StringSetXMLEventParser(this.getNamespaceURI(), KEYWORD); return ctx.allocate(event, defaultParser); }
@Override protected void doParseEventContent(XMLEventParserContext ctx, XMLEvent event, Object... args) throws XMLStreamException { if (ctx.isStartElement(event, HTTP)) { this.addProtocol(event.asStartElement().getName().getLocalPart()); } else if (ctx.isStartElement(event, GET) || ctx.isStartElement(event, POST)) { this.addRequestMethod(event.asStartElement().getName().getLocalPart()); } else if (ctx.isStartElement(event, ONLINE_RESOURCE)) { XMLEventParser parser = this.allocate(ctx, event); if (parser != null) { Object o = parser.parse(ctx, event, args); if (o != null && o instanceof OGCOnlineResource) this.addOnlineResource((OGCOnlineResource) o); } } }
public XMLEventParser allocate(XMLEventParserContext ctx, XMLEvent event) { if (ctx.isStartElement(event, CAPABILITY)) return ctx.allocate(event, new WMSCapabilityInformation(this.getNamespaceURI())); else return super.allocate(ctx, event); }
@Override protected void doParseEventContent(XMLEventParserContext ctx, XMLEvent event, Object... args) throws XMLParserException { if (ctx.isStartElement(event, NAME)) { this.setServiceName(ctx.getStringParser().parseString(ctx, event)); } else if (ctx.isStartElement(event, TITLE)) { this.setServiceTitle(ctx.getStringParser().parseString(ctx, event)); } else if (ctx.isStartElement(event, ABSTRACT)) { this.setServiceAbstract(ctx.getStringParser().parseString(ctx, event)); } else if (ctx.isStartElement(event, FEES)) { this.setFees(ctx.getStringParser().parseString(ctx, event)); } else if (ctx.isStartElement(event, ACCESS_CONSTRAINTS)) { this.setAccessConstraints(ctx.getStringParser().parseString(ctx, event)); } else if (ctx.isStartElement(event, KEYWORD_LIST)) { XMLEventParser parser = this.allocate(ctx, event); if (parser != null) { Object o = parser.parse(ctx, event, args); if (o != null && o instanceof StringSetXMLEventParser) this.setKeywords(((StringSetXMLEventParser) o).getStrings()); } } else if (ctx.isStartElement(event, ONLINE_RESOURCE)) { XMLEventParser parser = this.allocate(ctx, event); if (parser != null) { Object o = parser.parse(ctx, event, args); if (o != null && o instanceof OGCOnlineResource) this.setOnlineResource((OGCOnlineResource) o); } } else if (ctx.isStartElement(event, CONTACT_INFORMATION)) { XMLEventParser parser = this.allocate(ctx, event); if (parser != null) { Object o = parser.parse(ctx, event, args); if (o != null && o instanceof OGCContactInformation) this.setContactInformation((OGCContactInformation) o); } } }