Ejemplo n.º 1
0
  @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);
  }
Ejemplo n.º 2
0
 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);
   }
 }
Ejemplo n.º 3
0
 @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);
 }