src/java.xml/share/classes/com/sun/xml/internal/stream/events/XMLEventFactoryImpl.java
author joehw
Thu, 21 Dec 2017 17:08:05 -0800
changeset 48412 d4412e380f6b
parent 47216 71c04702a3d5
permissions -rw-r--r--
8184431: References to @sun.com Reviewed-by: lancea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     1
/*
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
     2
 * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     4
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    10
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    15
 * accompanied this code).
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    16
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    20
 *
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    23
 * questions.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    24
 */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    25
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    26
package com.sun.xml.internal.stream.events;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    27
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    28
import java.util.Iterator;
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    29
import javax.xml.namespace.NamespaceContext;
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    30
import javax.xml.namespace.QName;
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    31
import javax.xml.stream.XMLEventFactory;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    32
import javax.xml.stream.Location;
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    33
import javax.xml.stream.events.Attribute;
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    34
import javax.xml.stream.events.Characters;
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    35
import javax.xml.stream.events.ProcessingInstruction;
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    36
import javax.xml.stream.events.Namespace;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    37
import javax.xml.stream.events.EntityDeclaration;
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    38
import javax.xml.stream.events.EntityReference;
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    39
import javax.xml.stream.events.StartDocument;
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    40
import javax.xml.stream.events.StartElement;
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    41
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    42
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    43
/**
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    44
 *
48412
d4412e380f6b 8184431: References to @sun.com
joehw
parents: 47216
diff changeset
    45
 * @author  Neeraj Bajaj, k venugopal
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    46
 */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    47
public class XMLEventFactoryImpl extends XMLEventFactory {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    48
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    49
    Location location = null;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    50
    /** Creates a new instance of XMLEventFactory */
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    51
    public XMLEventFactoryImpl() {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    52
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    53
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    54
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    55
    public Attribute createAttribute(String localName, String value) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    56
        AttributeImpl attr =  new AttributeImpl(localName, value);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    57
        if(location != null)attr.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    58
        return attr;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    59
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    60
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    61
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    62
    public Attribute createAttribute(QName name, String value) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    63
        return createAttribute(name.getPrefix(), name.getNamespaceURI(), name.getLocalPart(), value);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    64
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    65
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    66
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    67
    public Attribute createAttribute(String prefix, String namespaceURI, String localName, String value) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    68
        AttributeImpl attr =  new AttributeImpl(prefix, namespaceURI, localName, value, null);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    69
        if(location != null)attr.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    70
        return attr;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    71
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    72
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    73
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    74
    public Characters createCData(String content) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    75
        //stax doesn't have separate CDATA event. This is taken care by
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    76
        //CHRACTERS event setting the cdata flag to true.
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    77
        CharacterEvent charEvent =  new CharacterEvent(content, true);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    78
        if(location != null)charEvent.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    79
        return charEvent;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    80
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    81
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    82
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    83
    public Characters createCharacters(String content) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    84
        CharacterEvent charEvent =  new CharacterEvent(content);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    85
        if(location != null)charEvent.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    86
        return charEvent;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    87
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    88
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    89
    @Override
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    90
    public javax.xml.stream.events.Comment createComment(String text) {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    91
        CommentEvent charEvent =  new CommentEvent(text);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    92
        if(location != null)charEvent.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    93
        return charEvent;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    94
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    95
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
    96
    @Override
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    97
    public javax.xml.stream.events.DTD createDTD(String dtd) {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    98
        DTDEvent dtdEvent = new DTDEvent(dtd);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
    99
        if(location != null)dtdEvent.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   100
        return dtdEvent;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   101
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   102
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   103
    @Override
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   104
    public javax.xml.stream.events.EndDocument createEndDocument() {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   105
        EndDocumentEvent event =new EndDocumentEvent();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   106
        if(location != null)event.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   107
        return event;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   108
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   109
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   110
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   111
    public javax.xml.stream.events.EndElement createEndElement(QName name,
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   112
            Iterator<? extends Namespace> namespaces) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   113
        return createEndElement(name.getPrefix(), name.getNamespaceURI(), name.getLocalPart());
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   114
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   115
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   116
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   117
    public javax.xml.stream.events.EndElement createEndElement(
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   118
            String prefix, String namespaceUri, String localName) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   119
        EndElementEvent event =  new EndElementEvent(prefix, namespaceUri, localName);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   120
        if(location != null)event.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   121
        return event;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   122
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   123
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   124
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   125
    public javax.xml.stream.events.EndElement createEndElement(String prefix, String namespaceUri,
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   126
            String localName, Iterator<? extends Namespace> namespaces) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   127
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   128
        EndElementEvent event =  new EndElementEvent(prefix, namespaceUri, localName);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   129
        if(namespaces!=null){
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   130
            while(namespaces.hasNext())
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   131
                event.addNamespace(namespaces.next());
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   132
        }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   133
        if(location != null)event.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   134
        return event;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   135
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   136
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   137
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   138
    public EntityReference createEntityReference(String name, EntityDeclaration entityDeclaration) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   139
        EntityReferenceEvent event =  new EntityReferenceEvent(name, entityDeclaration);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   140
        if(location != null)event.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   141
        return event;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   142
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   143
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   144
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   145
    public Characters createIgnorableSpace(String content) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   146
        CharacterEvent event =  new CharacterEvent(content, false, true);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   147
        if(location != null)event.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   148
        return event;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   149
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   150
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   151
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   152
    public Namespace createNamespace(String namespaceURI) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   153
        NamespaceImpl event =  new NamespaceImpl(namespaceURI);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   154
        if(location != null)event.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   155
        return event;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   156
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   157
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   158
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   159
    public Namespace createNamespace(String prefix, String namespaceURI) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   160
        NamespaceImpl event =  new NamespaceImpl(prefix, namespaceURI);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   161
        if(location != null)event.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   162
        return event;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   163
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   164
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   165
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   166
    public ProcessingInstruction createProcessingInstruction(String target, String data) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   167
        ProcessingInstructionEvent event =  new ProcessingInstructionEvent(target, data);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   168
        if(location != null)event.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   169
        return event;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   170
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   171
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   172
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   173
    public Characters createSpace(String content) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   174
        CharacterEvent event =  new CharacterEvent(content);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   175
        if(location != null)event.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   176
        return event;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   177
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   178
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   179
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   180
    public StartDocument createStartDocument() {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   181
        StartDocumentEvent event = new StartDocumentEvent();
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   182
        if(location != null)event.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   183
        return event;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   184
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   185
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   186
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   187
    public StartDocument createStartDocument(String encoding) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   188
        StartDocumentEvent event =  new StartDocumentEvent(encoding);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   189
        if(location != null)event.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   190
        return event;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   191
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   192
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   193
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   194
    public StartDocument createStartDocument(String encoding, String version) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   195
        StartDocumentEvent event =  new StartDocumentEvent(encoding, version);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   196
        if(location != null)event.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   197
        return event;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   198
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   199
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   200
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   201
    public StartDocument createStartDocument(String encoding, String version, boolean standalone) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   202
        StartDocumentEvent event =  new StartDocumentEvent(encoding, version, standalone);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   203
        if(location != null)event.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   204
        return event;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   205
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   206
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   207
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   208
    public StartElement createStartElement(QName name, Iterator<? extends Attribute> attributes,
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   209
            Iterator<? extends Namespace> namespaces) {
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   210
        return createStartElement(name.getPrefix(), name.getNamespaceURI(),
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   211
                name.getLocalPart(), attributes, namespaces);
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   212
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   213
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   214
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   215
    public StartElement createStartElement(String prefix, String namespaceUri, String localName) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   216
        StartElementEvent event =  new StartElementEvent(prefix, namespaceUri, localName);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   217
        if(location != null)event.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   218
        return event;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   219
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   220
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   221
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   222
    public StartElement createStartElement(String prefix, String namespaceUri,
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   223
            String localName, Iterator<? extends Attribute> attributes,
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   224
            Iterator<? extends Namespace> namespaces) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   225
        return createStartElement(prefix, namespaceUri, localName, attributes, namespaces, null);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   226
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   227
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   228
    @Override
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   229
    public StartElement createStartElement(String prefix, String namespaceUri,
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   230
            String localName, Iterator<? extends Attribute> attributes,
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   231
            Iterator<? extends Namespace> namespaces, NamespaceContext context) {
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   232
        StartElementEvent elem =  new StartElementEvent(prefix, namespaceUri, localName);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   233
        elem.addAttributes(attributes);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   234
        elem.addNamespaceAttributes(namespaces);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   235
        elem.setNamespaceContext(context);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   236
        if(location != null)elem.setLocation(location);
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   237
        return elem;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   238
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   239
42802
2a03abb03c06 8170556: Warnings cleanup related to JDK-8167340
joehw
parents: 25868
diff changeset
   240
    @Override
12005
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   241
    public void setLocation(javax.xml.stream.Location location) {
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   242
        this.location = location;
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   243
    }
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   244
a754d69d5e60 7150324: Stop using drop bundles in jaxp
ohair
parents:
diff changeset
   245
}