001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.xerces.impl.xs;
019:
020: import org.apache.xerces.impl.xs.util.XSObjectListImpl;
021: import org.apache.xerces.xs.XSAnnotation;
022: import org.apache.xerces.xs.XSConstants;
023: import org.apache.xerces.xs.XSNamespaceItem;
024: import org.apache.xerces.xs.XSNotationDeclaration;
025: import org.apache.xerces.xs.XSObjectList;
026:
027: /**
028: * The XML representation for a NOTATION declaration
029: * schema component is a global <notation> element information item
030: *
031: * @xerces.internal
032: *
033: * @author Rahul Srivastava, Sun Microsystems Inc.
034: * @version $Id: XSNotationDecl.java 449424 2006-09-24 16:22:30Z mrglavas $
035: */
036: public class XSNotationDecl implements XSNotationDeclaration {
037:
038: // name of the group
039: public String fName = null;
040: // target namespace of the group
041: public String fTargetNamespace = null;
042: // public id of the notation
043: public String fPublicId = null;
044: // system id of the notation
045: public String fSystemId = null;
046:
047: // optional annotation
048: public XSObjectList fAnnotations = null;
049:
050: /**
051: * Get the type of the object, i.e ELEMENT_DECLARATION.
052: */
053: public short getType() {
054: return XSConstants.NOTATION_DECLARATION;
055: }
056:
057: /**
058: * The <code>name</code> of this <code>XSObject</code> depending on the
059: * <code>XSObject</code> type.
060: */
061: public String getName() {
062: return fName;
063: }
064:
065: /**
066: * The namespace URI of this node, or <code>null</code> if it is
067: * unspecified. defines how a namespace URI is attached to schema
068: * components.
069: */
070: public String getNamespace() {
071: return fTargetNamespace;
072: }
073:
074: /**
075: * Optional if {public identifier} is present. A URI reference.
076: */
077: public String getSystemId() {
078: return fSystemId;
079: }
080:
081: /**
082: * Optional if {system identifier} is present. A public identifier,
083: * as defined in [XML 1.0 (Second Edition)].
084: */
085: public String getPublicId() {
086: return fPublicId;
087: }
088:
089: /**
090: * Optional. Annotation.
091: */
092: public XSAnnotation getAnnotation() {
093: return (fAnnotations != null) ? (XSAnnotation) fAnnotations
094: .item(0) : null;
095: }
096:
097: /**
098: * Optional. Annotations.
099: */
100: public XSObjectList getAnnotations() {
101: return (fAnnotations != null) ? fAnnotations
102: : XSObjectListImpl.EMPTY_LIST;
103: }
104:
105: /**
106: * @see org.apache.xerces.xs.XSObject#getNamespaceItem()
107: */
108: public XSNamespaceItem getNamespaceItem() {
109: return null;
110: }
111:
112: } // class XSNotationDecl
|