286N/A/*
286N/A * reserved comment block
286N/A * DO NOT REMOVE OR ALTER!
286N/A */
286N/A/*
286N/A * Copyright 2001-2004 The Apache Software Foundation.
286N/A *
286N/A * Licensed under the Apache License, Version 2.0 (the "License");
286N/A * you may not use this file except in compliance with the License.
286N/A * You may obtain a copy of the License at
286N/A *
286N/A * http://www.apache.org/licenses/LICENSE-2.0
286N/A *
286N/A * Unless required by applicable law or agreed to in writing, software
286N/A * distributed under the License is distributed on an "AS IS" BASIS,
286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
286N/A * See the License for the specific language governing permissions and
286N/A * limitations under the License.
286N/A */
286N/A
286N/Apackage com.sun.org.apache.xerces.internal.impl.xs;
286N/A
286N/Aimport com.sun.org.apache.xerces.internal.impl.xs.util.XSObjectListImpl;
286N/Aimport com.sun.org.apache.xerces.internal.xs.XSAnnotation;
286N/Aimport com.sun.org.apache.xerces.internal.xs.XSConstants;
286N/Aimport com.sun.org.apache.xerces.internal.xs.XSNamespaceItem;
286N/Aimport com.sun.org.apache.xerces.internal.xs.XSNotationDeclaration;
286N/Aimport com.sun.org.apache.xerces.internal.xs.XSObjectList;
286N/A
286N/A/**
286N/A * The XML representation for a NOTATION declaration
286N/A * schema component is a global <notation> element information item
286N/A *
286N/A * @xerces.internal
286N/A *
286N/A * @author Rahul Srivastava, Sun Microsystems Inc.
286N/A * @version $Id: XSNotationDecl.java,v 1.7 2010-11-01 04:39:55 joehw Exp $
286N/A */
286N/Apublic class XSNotationDecl implements XSNotationDeclaration {
286N/A
286N/A // name of the group
286N/A public String fName = null;
286N/A // target namespace of the group
286N/A public String fTargetNamespace = null;
286N/A // public id of the notation
286N/A public String fPublicId = null;
286N/A // system id of the notation
286N/A public String fSystemId = null;
286N/A
286N/A // optional annotation
286N/A public XSObjectList fAnnotations = null;
286N/A
286N/A // The namespace schema information item corresponding to the target namespace
286N/A // of the notation declaration, if it is globally declared; or null otherwise.
286N/A private XSNamespaceItem fNamespaceItem = null;
286N/A
286N/A /**
286N/A * Get the type of the object, i.e ELEMENT_DECLARATION.
286N/A */
286N/A public short getType() {
286N/A return XSConstants.NOTATION_DECLARATION;
286N/A }
286N/A
286N/A /**
286N/A * The <code>name</code> of this <code>XSObject</code> depending on the
286N/A * <code>XSObject</code> type.
286N/A */
286N/A public String getName() {
286N/A return fName;
286N/A }
286N/A
286N/A /**
286N/A * The namespace URI of this node, or <code>null</code> if it is
286N/A * unspecified. defines how a namespace URI is attached to schema
286N/A * components.
286N/A */
286N/A public String getNamespace() {
286N/A return fTargetNamespace;
286N/A }
286N/A
286N/A /**
286N/A * Optional if {public identifier} is present. A URI reference.
286N/A */
286N/A public String getSystemId() {
286N/A return fSystemId;
286N/A }
286N/A
286N/A /**
286N/A * Optional if {system identifier} is present. A public identifier,
286N/A * as defined in [XML 1.0 (Second Edition)].
286N/A */
286N/A public String getPublicId() {
286N/A return fPublicId;
286N/A }
286N/A
286N/A /**
286N/A * Optional. Annotation.
286N/A */
286N/A public XSAnnotation getAnnotation() {
286N/A return (fAnnotations != null) ? (XSAnnotation) fAnnotations.item(0) : null;
286N/A }
286N/A
286N/A /**
286N/A * Optional. Annotations.
286N/A */
286N/A public XSObjectList getAnnotations() {
286N/A return (fAnnotations != null) ? fAnnotations : XSObjectListImpl.EMPTY_LIST;
286N/A }
286N/A
286N/A /**
286N/A * @see org.apache.xerces.xs.XSObject#getNamespaceItem()
286N/A */
286N/A public XSNamespaceItem getNamespaceItem() {
286N/A return fNamespaceItem;
286N/A }
286N/A
286N/A void setNamespaceItem(XSNamespaceItem namespaceItem) {
286N/A fNamespaceItem = namespaceItem;
286N/A }
286N/A
286N/A} // class XSNotationDecl