1 /**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21 
22 package org.apache.openoffice.ooxml.schema.model.base;
23 
24 import org.apache.openoffice.ooxml.schema.model.attribute.Attribute;
25 import org.apache.openoffice.ooxml.schema.model.attribute.AttributeGroup;
26 import org.apache.openoffice.ooxml.schema.model.attribute.AttributeGroupReference;
27 import org.apache.openoffice.ooxml.schema.model.attribute.AttributeReference;
28 import org.apache.openoffice.ooxml.schema.model.complex.All;
29 import org.apache.openoffice.ooxml.schema.model.complex.Any;
30 import org.apache.openoffice.ooxml.schema.model.complex.Choice;
31 import org.apache.openoffice.ooxml.schema.model.complex.ComplexContent;
32 import org.apache.openoffice.ooxml.schema.model.complex.ComplexType;
33 import org.apache.openoffice.ooxml.schema.model.complex.ComplexTypeReference;
34 import org.apache.openoffice.ooxml.schema.model.complex.Element;
35 import org.apache.openoffice.ooxml.schema.model.complex.ElementReference;
36 import org.apache.openoffice.ooxml.schema.model.complex.Extension;
37 import org.apache.openoffice.ooxml.schema.model.complex.Group;
38 import org.apache.openoffice.ooxml.schema.model.complex.GroupReference;
39 import org.apache.openoffice.ooxml.schema.model.complex.OccurrenceIndicator;
40 import org.apache.openoffice.ooxml.schema.model.complex.Sequence;
41 import org.apache.openoffice.ooxml.schema.model.simple.BuiltIn;
42 import org.apache.openoffice.ooxml.schema.model.simple.List;
43 import org.apache.openoffice.ooxml.schema.model.simple.Restriction;
44 import org.apache.openoffice.ooxml.schema.model.simple.SimpleContent;
45 import org.apache.openoffice.ooxml.schema.model.simple.SimpleType;
46 import org.apache.openoffice.ooxml.schema.model.simple.SimpleTypeReference;
47 import org.apache.openoffice.ooxml.schema.model.simple.Union;
48 
49 /** Interface for the visitor pattern.
50  *  Use a node visitor instead of INode/NodeType and casting INode to a derived
51  *  class.
52  *  See also the default implementation NodeVisitorAdapter.
53  */
54 public interface INodeVisitor
55 {
56     // Complex nodes.
Visit(final All aAll)57     void Visit (final All aAll);
Visit(final Any aAny)58     void Visit (final Any aAny);
Visit(final ComplexContent aComplexContent)59     void Visit (final ComplexContent aComplexContent);
Visit(final ComplexType aNode)60     void Visit (final ComplexType aNode);
Visit(final ComplexTypeReference aTypeReference)61     void Visit (final ComplexTypeReference aTypeReference);
Visit(final Choice aChoice)62     void Visit (final Choice aChoice);
Visit(final Element aElement)63     void Visit (final Element aElement);
Visit(final ElementReference aElementReference)64     void Visit (final ElementReference aElementReference);
Visit(final Extension aNode)65     void Visit (final Extension aNode);
Visit(final Group aGroup)66     void Visit (final Group aGroup);
Visit(final GroupReference aGroupReference)67     void Visit (final GroupReference aGroupReference);
Visit(final OccurrenceIndicator aOccurrenceIndicator)68     void Visit (final OccurrenceIndicator aOccurrenceIndicator);
Visit(final Sequence aNode)69     void Visit (final Sequence aNode);
70 
71     // Simple nodes.
Visit(final BuiltIn aType)72     void Visit (final BuiltIn aType);
Visit(final List aList)73     void Visit (final List aList);
Visit(final Restriction aRestriction)74     void Visit (final Restriction aRestriction);
Visit(final SimpleContent aSimpleContent)75     void Visit (final SimpleContent aSimpleContent);
Visit(final SimpleType aSimpleType)76     void Visit (final SimpleType aSimpleType);
Visit(final SimpleTypeReference aSimpleTypeReference)77     void Visit (final SimpleTypeReference aSimpleTypeReference);
Visit(final Union aUnion)78     void Visit (final Union aUnion);
79 
80     // Attributes.
Visit(final AttributeGroup attributeGroup)81     void Visit (final AttributeGroup attributeGroup);
Visit(final AttributeReference attributeReference)82     void Visit (final AttributeReference attributeReference);
Visit(final Attribute attribute)83     void Visit (final Attribute attribute);
Visit(final AttributeGroupReference attributeGroupReference)84     void Visit (final AttributeGroupReference attributeGroupReference);
85 }
86