001 //
002 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.1-05/30/2003 05:06 AM(java_re)-fcs
003 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
004 // Any modifications to this file will be lost upon recompilation of the source schema.
005 // Generated on: 2004.10.11 at 12:13:34 EDT
006 //
007
008 /*
009 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
010 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
011 */
012
013 package astronomy.data.spectra.impl.runtime;
014
015 import javax.xml.namespace.NamespaceContext;
016
017 /**
018 * Maintains namespace<->prefix bindings.
019 *
020 * <p>
021 * This interface extends {@link NamespaceContext} and provides
022 * an additional functionality, which is necessary to declare
023 * namespaced attributes on elements. The added method is for
024 * self-consumption by the marshaller.
025 *
026 * This object is composed into a Serializer.
027 */
028 public interface NamespaceContext2 extends NamespaceContext
029 {
030 /**
031 * Declares a new namespace binding within the current context.
032 *
033 * <p>
034 * The prefix is automatically assigned by MarshallingContext. If
035 * a given namespace URI is already declared, nothing happens.
036 *
037 * <p>
038 * It is <b>NOT</b> an error to declare the same namespace URI
039 * more than once.
040 *
041 * <p>
042 * For marshalling to work correctly, all namespace bindings
043 * for an element must be declared between its startElement method and
044 * its endAttributes event. Calling the same method with the same
045 * parameter between the endAttributes and the endElement returns
046 * the same prefix.
047 *
048 * @param requirePrefix
049 * If this parameter is true, this method must assign a prefix
050 * to this namespace, even if it's already bound to the default
051 * namespace. IOW, this method will never return null if this
052 * flag is true. This functionality is necessary to declare
053 * namespace URI used for attribute names.
054 * @param preferedPrefix
055 * If the caller has any particular preference to the
056 * prefix, pass that as a parameter. The callee will try
057 * to honor it. Set null if there's no particular preference.
058 *
059 * @return
060 * returns the assigned prefix. If the namespace is bound to
061 * the default namespace, null is returned.
062 */
063 String declareNamespace( String namespaceUri, String preferedPrefix, boolean requirePrefix );
064 }