001: /*
002: * The contents of this file are subject to the terms
003: * of the Common Development and Distribution License
004: * (the "License"). You may not use this file except
005: * in compliance with the License.
006: *
007: * You can obtain a copy of the license at
008: * https://jwsdp.dev.java.net/CDDLv1.0.html
009: * See the License for the specific language governing
010: * permissions and limitations under the License.
011: *
012: * When distributing Covered Code, include this CDDL
013: * HEADER in each file and include the License file at
014: * https://jwsdp.dev.java.net/CDDLv1.0.html If applicable,
015: * add the following below this CDDL HEADER, with the
016: * fields enclosed by brackets "[]" replaced with your
017: * own identifying information: Portions Copyright [yyyy]
018: * [name of copyright owner]
019: */
020: package com.sun.xml.xsom.util;
021:
022: import com.sun.xml.xsom.XSAnnotation;
023: import com.sun.xml.xsom.XSAttGroupDecl;
024: import com.sun.xml.xsom.XSAttributeDecl;
025: import com.sun.xml.xsom.XSAttributeUse;
026: import com.sun.xml.xsom.XSComplexType;
027: import com.sun.xml.xsom.XSContentType;
028: import com.sun.xml.xsom.XSElementDecl;
029: import com.sun.xml.xsom.XSFacet;
030: import com.sun.xml.xsom.XSModelGroup;
031: import com.sun.xml.xsom.XSModelGroupDecl;
032: import com.sun.xml.xsom.XSNotation;
033: import com.sun.xml.xsom.XSParticle;
034: import com.sun.xml.xsom.XSSchema;
035: import com.sun.xml.xsom.XSSimpleType;
036: import com.sun.xml.xsom.XSWildcard;
037: import com.sun.xml.xsom.XSIdentityConstraint;
038: import com.sun.xml.xsom.XSXPath;
039: import com.sun.xml.xsom.visitor.XSFunction;
040:
041: /**
042: * Filter implementation of XSFilter.
043: * This class forwards all the method calls to another XSFunction.
044: *
045: * <p>
046: * This class is intended to be derived by client application
047: * to add some meaningful behavior.
048: *
049: * @author
050: * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
051: */
052: public class XSFunctionFilter<T> implements XSFunction<T> {
053:
054: /** This object will receive all forwarded calls. */
055: protected XSFunction<T> core;
056:
057: public XSFunctionFilter(XSFunction<T> _core) {
058: this .core = _core;
059: }
060:
061: public XSFunctionFilter() {
062: }
063:
064: public T annotation(XSAnnotation ann) {
065: return core.annotation(ann);
066: }
067:
068: public T attGroupDecl(XSAttGroupDecl decl) {
069: return core.attGroupDecl(decl);
070: }
071:
072: public T attributeDecl(XSAttributeDecl decl) {
073: return core.attributeDecl(decl);
074: }
075:
076: public T attributeUse(XSAttributeUse use) {
077: return core.attributeUse(use);
078: }
079:
080: public T complexType(XSComplexType type) {
081: return core.complexType(type);
082: }
083:
084: public T schema(XSSchema schema) {
085: return core.schema(schema);
086: }
087:
088: public T facet(XSFacet facet) {
089: return core.facet(facet);
090: }
091:
092: public T notation(XSNotation notation) {
093: return core.notation(notation);
094: }
095:
096: public T simpleType(XSSimpleType simpleType) {
097: return core.simpleType(simpleType);
098: }
099:
100: public T particle(XSParticle particle) {
101: return core.particle(particle);
102: }
103:
104: public T empty(XSContentType empty) {
105: return core.empty(empty);
106: }
107:
108: public T wildcard(XSWildcard wc) {
109: return core.wildcard(wc);
110: }
111:
112: public T modelGroupDecl(XSModelGroupDecl decl) {
113: return core.modelGroupDecl(decl);
114: }
115:
116: public T modelGroup(XSModelGroup group) {
117: return core.modelGroup(group);
118: }
119:
120: public T elementDecl(XSElementDecl decl) {
121: return core.elementDecl(decl);
122: }
123:
124: public T identityConstraint(XSIdentityConstraint decl) {
125: return core.identityConstraint(decl);
126: }
127:
128: public T xpath(XSXPath xpath) {
129: return core.xpath(xpath);
130: }
131: }
|