diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /libjava/classpath/javax/xml/stream/events | |
download | cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2 cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'libjava/classpath/javax/xml/stream/events')
14 files changed, 980 insertions, 0 deletions
diff --git a/libjava/classpath/javax/xml/stream/events/Attribute.java b/libjava/classpath/javax/xml/stream/events/Attribute.java new file mode 100644 index 000000000..1824a9c02 --- /dev/null +++ b/libjava/classpath/javax/xml/stream/events/Attribute.java @@ -0,0 +1,70 @@ +/* Attribute.java -- + Copyright (C) 2005 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.xml.stream.events; + +import javax.xml.namespace.QName; + +/** + * An attribute event. + */ +public interface Attribute + extends XMLEvent +{ + + /** + * Returns the name of this attribute. + */ + QName getName(); + + /** + * Returns the normalized value of this attribute. + */ + String getValue(); + + /** + * Returns the type of this attribute. + */ + String getDTDType(); + + /** + * Indicates whether this attribute was specified in the input source, or + * just defaulted by the DTD. + */ + boolean isSpecified(); + +} diff --git a/libjava/classpath/javax/xml/stream/events/Characters.java b/libjava/classpath/javax/xml/stream/events/Characters.java new file mode 100644 index 000000000..d82009247 --- /dev/null +++ b/libjava/classpath/javax/xml/stream/events/Characters.java @@ -0,0 +1,67 @@ +/* Characters.java -- + Copyright (C) 2005 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.xml.stream.events; + +/** + * A character data (text) event. + */ +public interface Characters + extends XMLEvent +{ + + /** + * Returns the character data assocated with this event. + */ + String getData(); + + /** + * Indicates whether this text is all whitespace. + */ + boolean isWhiteSpace(); + + /** + * Indicates whether this is a CDATA section. + */ + boolean isCData(); + + /** + * Indicates whether this text is all ignorable whitespace. + */ + boolean isIgnorableWhiteSpace(); + +} diff --git a/libjava/classpath/javax/xml/stream/events/Comment.java b/libjava/classpath/javax/xml/stream/events/Comment.java new file mode 100644 index 000000000..4419e58f2 --- /dev/null +++ b/libjava/classpath/javax/xml/stream/events/Comment.java @@ -0,0 +1,52 @@ +/* Comment.java -- + Copyright (C) 2005 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.xml.stream.events; + +/** + * A comment event. + */ +public interface Comment + extends XMLEvent +{ + + /** + * Returns the comment text. + */ + String getText(); + +} diff --git a/libjava/classpath/javax/xml/stream/events/DTD.java b/libjava/classpath/javax/xml/stream/events/DTD.java new file mode 100644 index 000000000..b1a906919 --- /dev/null +++ b/libjava/classpath/javax/xml/stream/events/DTD.java @@ -0,0 +1,72 @@ +/* DTD.java -- + Copyright (C) 2005 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.xml.stream.events; + +import java.util.List; + +/** + * A DOCTYPE declaration event. + */ +public interface DTD + extends XMLEvent +{ + + /** + * Returns the body of the DTD, including the internal DTD subset. + */ + String getDocumentTypeDeclaration(); + + /** + * Returns an implementation-specific representation of the DTD, or null + * if no such representation is available. + */ + Object getProcessedDTD(); + + /** + * Returns the notations declared in the DTD. + */ + @SuppressWarnings("unchecked") + List getNotations(); + + /** + * Returns the entities declared in the DTD. + */ + @SuppressWarnings("unchecked") + List getEntities(); + +} diff --git a/libjava/classpath/javax/xml/stream/events/EndDocument.java b/libjava/classpath/javax/xml/stream/events/EndDocument.java new file mode 100644 index 000000000..fd7e3fa4f --- /dev/null +++ b/libjava/classpath/javax/xml/stream/events/EndDocument.java @@ -0,0 +1,46 @@ +/* EndDocument.java -- + Copyright (C) 2005 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.xml.stream.events; + +/** + * An end-document event. + */ +public interface EndDocument + extends XMLEvent +{ +} diff --git a/libjava/classpath/javax/xml/stream/events/EndElement.java b/libjava/classpath/javax/xml/stream/events/EndElement.java new file mode 100644 index 000000000..a6b5c3fa2 --- /dev/null +++ b/libjava/classpath/javax/xml/stream/events/EndElement.java @@ -0,0 +1,61 @@ +/* EndElement.java -- + Copyright (C) 2005 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.xml.stream.events; + +import java.util.Iterator; +import javax.xml.namespace.QName; + +/** + * An end-element event. + */ +public interface EndElement + extends XMLEvent +{ + + /** + * Returns the element name. + */ + QName getName(); + + /** + * Returns the namespaces that have gone out of scope. + */ + @SuppressWarnings("unchecked") + Iterator getNamespaces(); + +} diff --git a/libjava/classpath/javax/xml/stream/events/EntityDeclaration.java b/libjava/classpath/javax/xml/stream/events/EntityDeclaration.java new file mode 100644 index 000000000..61fa177f9 --- /dev/null +++ b/libjava/classpath/javax/xml/stream/events/EntityDeclaration.java @@ -0,0 +1,77 @@ +/* EntityDeclaration.java -- + Copyright (C) 2005,2006 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.xml.stream.events; + +/** + * An entity declaration event. + */ +public interface EntityDeclaration + extends XMLEvent +{ + + /** + * Returns the public identifier of the entity. + */ + String getPublicId(); + + /** + * Returns the system identifier of the entity. + */ + String getSystemId(); + + /** + * Returns the name of the entity. + */ + String getName(); + + /** + * Returns the name of the associated notation. + */ + String getNotationName(); + + /** + * Returns the replacement text for the entity. + */ + String getReplacementText(); + + /** + * Returns the base URI for the entity. + */ + String getBaseURI(); + +} diff --git a/libjava/classpath/javax/xml/stream/events/EntityReference.java b/libjava/classpath/javax/xml/stream/events/EntityReference.java new file mode 100644 index 000000000..27bcb040f --- /dev/null +++ b/libjava/classpath/javax/xml/stream/events/EntityReference.java @@ -0,0 +1,57 @@ +/* EntityReference.java -- + Copyright (C) 2005,2006 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.xml.stream.events; + +/** + * An entity reference event. + */ +public interface EntityReference + extends XMLEvent +{ + + /** + * Returns the declaration of this reference. + */ + EntityDeclaration getDeclaration(); + + /** + * Returns the entity name. + */ + String getName(); + +} diff --git a/libjava/classpath/javax/xml/stream/events/Namespace.java b/libjava/classpath/javax/xml/stream/events/Namespace.java new file mode 100644 index 000000000..05de86c96 --- /dev/null +++ b/libjava/classpath/javax/xml/stream/events/Namespace.java @@ -0,0 +1,62 @@ +/* Namespace.java -- + Copyright (C) 2005 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.xml.stream.events; + +/** + * A namespace declaration event. + */ +public interface Namespace + extends Attribute +{ + + /** + * Returns the namespace prefix, if any. + */ + String getPrefix(); + + /** + * Returns the namespace URI. + */ + String getNamespaceURI(); + + /** + * Indicates whether this event declares the default namespace. + */ + boolean isDefaultNamespaceDeclaration(); + +} diff --git a/libjava/classpath/javax/xml/stream/events/NotationDeclaration.java b/libjava/classpath/javax/xml/stream/events/NotationDeclaration.java new file mode 100644 index 000000000..708beb5f5 --- /dev/null +++ b/libjava/classpath/javax/xml/stream/events/NotationDeclaration.java @@ -0,0 +1,62 @@ +/* NotationDeclaration.java -- + Copyright (C) 2005 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.xml.stream.events; + +/** + * A notation declaration event. + */ +public interface NotationDeclaration + extends XMLEvent +{ + + /** + * Returns the name of the notation. + */ + String getName(); + + /** + * Returns the public identifier of the notation. + */ + String getPublicId(); + + /** + * Returns the system identifier of the notation. + */ + String getSystemId(); + +} diff --git a/libjava/classpath/javax/xml/stream/events/ProcessingInstruction.java b/libjava/classpath/javax/xml/stream/events/ProcessingInstruction.java new file mode 100644 index 000000000..340202300 --- /dev/null +++ b/libjava/classpath/javax/xml/stream/events/ProcessingInstruction.java @@ -0,0 +1,57 @@ +/* ProcessingInstruction.java -- + Copyright (C) 2005 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.xml.stream.events; + +/** + * A processing instruction event. + */ +public interface ProcessingInstruction + extends XMLEvent +{ + + /** + * Returns the processing instruction target. + */ + String getTarget(); + + /** + * Returns the processing instruction data. + */ + String getData(); + +} diff --git a/libjava/classpath/javax/xml/stream/events/StartDocument.java b/libjava/classpath/javax/xml/stream/events/StartDocument.java new file mode 100644 index 000000000..7a5434624 --- /dev/null +++ b/libjava/classpath/javax/xml/stream/events/StartDocument.java @@ -0,0 +1,79 @@ +/* StartDocument.java -- + Copyright (C) 2005 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.xml.stream.events; + +/** + * A start-document event. + */ +public interface StartDocument + extends XMLEvent +{ + + /** + * Returns the system identifier of the document entity. + */ + String getSystemId(); + + /** + * Returns the character encoding of the document. + */ + String getCharacterEncodingScheme(); + + /** + * Indicates whether the character encoding was set in the XML + * declaration. + */ + boolean encodingSet(); + + /** + * Indicates whether the document is standalone. + */ + boolean isStandalone(); + + /** + * Indicates whether the standalone parameter was set in the XML + * declaration. + */ + boolean standaloneSet(); + + /** + * Returns the XML version of the document. + */ + String getVersion(); + +} diff --git a/libjava/classpath/javax/xml/stream/events/StartElement.java b/libjava/classpath/javax/xml/stream/events/StartElement.java new file mode 100644 index 000000000..359b57eef --- /dev/null +++ b/libjava/classpath/javax/xml/stream/events/StartElement.java @@ -0,0 +1,83 @@ +/* StartElement.java -- + Copyright (C) 2005 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.xml.stream.events; + +import java.util.Iterator; +import javax.xml.namespace.NamespaceContext; +import javax.xml.namespace.QName; + +/** + * A start-element event. + */ +public interface StartElement + extends XMLEvent +{ + + /** + * Returns the element name. + */ + QName getName(); + + /** + * Returns the attributes declared on this element. + */ + @SuppressWarnings("unchecked") + Iterator getAttributes(); + + /** + * Returns the namespaces declared on this element. + */ + @SuppressWarnings("unchecked") + Iterator getNamespaces(); + + /** + * Returns an attribute by name. + */ + Attribute getAttributeByName(QName name); + + /** + * Returns a read-only namespace context associated with this event. + */ + NamespaceContext getNamespaceContext(); + + /** + * Returns the namespace URI associated with the given prefix. + */ + String getNamespaceURI(String prefix); + +} diff --git a/libjava/classpath/javax/xml/stream/events/XMLEvent.java b/libjava/classpath/javax/xml/stream/events/XMLEvent.java new file mode 100644 index 000000000..90f354667 --- /dev/null +++ b/libjava/classpath/javax/xml/stream/events/XMLEvent.java @@ -0,0 +1,135 @@ +/* XMLEvent.java -- + Copyright (C) 2005,2006 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package javax.xml.stream.events; + +import java.io.Writer; +import javax.xml.namespace.QName; +import javax.xml.stream.Location; +import javax.xml.stream.XMLStreamConstants; +import javax.xml.stream.XMLStreamException; + +/** + * An XML stream event. + */ +public interface XMLEvent + extends XMLStreamConstants +{ + + /** + * Returns the type of this event. + */ + int getEventType(); + + /** + * Returns the location of this event. + */ + Location getLocation(); + + /** + * Indicates whether this event is a start-element event. + */ + boolean isStartElement(); + + /** + * Indicates whether this event is an attribute event. + */ + boolean isAttribute(); + + /** + * Indicates whether this event is a namespace declaration event. + */ + boolean isNamespace(); + + /** + * Indicates whether this event is an end-element event. + */ + boolean isEndElement(); + + /** + * Indicates whether this event is an entity reference event. + */ + boolean isEntityReference(); + + /** + * Indicates whether this event is a processing instruction event. + */ + boolean isProcessingInstruction(); + + /** + * Indicates whether this event is a text event. + */ + boolean isCharacters(); + + /** + * Indicates whether this event is a start-document event. + */ + boolean isStartDocument(); + + /** + * Indicates whether this event is an end-document event. + */ + boolean isEndDocument(); + + /** + * Returns this event as a start-element event. + */ + StartElement asStartElement(); + + /** + * Returns this event as an end-element event. + */ + EndElement asEndElement(); + + /** + * Returns this event as a text event. + */ + Characters asCharacters(); + + /** + * Returns schema-related type information about this event, or null if + * not available. + */ + QName getSchemaType(); + + /** + * Writes this event to the specified writer. + */ + void writeAsEncodedUnicode(Writer writer) + throws XMLStreamException; + +} |