KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xslt > model > impl > CopyImpl


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 package org.netbeans.modules.xslt.model.impl;
20
21 import java.util.List JavaDoc;
22
23 import org.netbeans.modules.xslt.model.AttributeSet;
24 import org.netbeans.modules.xslt.model.Copy;
25 import org.netbeans.modules.xslt.model.SequenceElement;
26 import org.netbeans.modules.xslt.model.XslComponent;
27 import org.netbeans.modules.xslt.model.XslReference;
28 import org.netbeans.modules.xslt.model.XslVisitor;
29 import org.netbeans.modules.xslt.model.enums.TBoolean;
30 import org.w3c.dom.Element JavaDoc;
31
32
33 /**
34  * @author ads
35  *
36  */

37 class CopyImpl extends ValidationCopyNsSpecImpl implements Copy {
38
39     CopyImpl( XslModelImpl model, Element element ) {
40         super( model , element );
41     }
42     
43     CopyImpl( XslModelImpl model ){
44         super( model , XslElements.COPY );
45     }
46
47     /* (non-Javadoc)
48      * @see org.netbeans.modules.xslt.model.impl.XslComponentImpl#accept(org.netbeans.modules.xslt.model.XslVisitor)
49      */

50     @Override JavaDoc
51     public void accept( XslVisitor visitor )
52     {
53         visitor.visit( this );
54     }
55
56     /* (non-Javadoc)
57      * @see org.netbeans.modules.xslt.model.impl.XslComponentImpl#getComponentType()
58      */

59     @Override JavaDoc
60     public Class JavaDoc<? extends XslComponent> getComponentType()
61     {
62         return Copy.class;
63     }
64
65     /* (non-Javadoc)
66      * @see org.netbeans.modules.xslt.model.UseAttributesSetsSpec#getUseAttributeSets()
67      */

68     public List JavaDoc<XslReference<AttributeSet>> getUseAttributeSets() {
69         return resolveGlobalReferenceList( AttributeSet.class,
70                 XslAttributes.USE_ATTRIBUTE_SETS );
71     }
72
73     /* (non-Javadoc)
74      * @see org.netbeans.modules.xslt.model.UseAttributesSetsSpec#setUseAttributeSets(java.util.Collection)
75      */

76     public void setUseAttributeSets( List JavaDoc<XslReference<AttributeSet>> collection ) {
77         setAttributeList( XslAttributes.USE_ATTRIBUTE_SETS , collection );
78     }
79     
80     /* (non-Javadoc)
81      * @see org.netbeans.modules.xslt.model.SequenceConstructor#addSequenceChild(org.netbeans.modules.xslt.model.SequenceElement, int)
82      */

83     public void addSequenceChild( SequenceElement element, int position ) {
84         insertAtIndex( SEQUENCE_ELEMENT, element , position );
85     }
86
87     /* (non-Javadoc)
88      * @see org.netbeans.modules.xslt.model.SequenceConstructor#appendSequenceChild(org.netbeans.modules.xslt.model.SequenceElement)
89      */

90     public void appendSequenceChild( SequenceElement element ) {
91         appendChild( SEQUENCE_ELEMENT, element );
92     }
93
94     /* (non-Javadoc)
95      * @see org.netbeans.modules.xslt.model.SequenceConstructor#getSequenceChildren()
96      */

97     public List JavaDoc<SequenceElement> getSequenceChildren() {
98         return getChildren( SequenceElement.class );
99     }
100
101     /* (non-Javadoc)
102      * @see org.netbeans.modules.xslt.model.SequenceConstructor#removeSequenceChild(org.netbeans.modules.xslt.model.SequenceElement)
103      */

104     public void removeSequenceChild( SequenceElement element ) {
105         removeChild( SEQUENCE_ELEMENT, element );
106     }
107     
108     /* (non-Javadoc)
109      * @see org.netbeans.modules.xslt.model.InheritNamespacesSpec#getInheritNamespaces()
110      */

111     public TBoolean getInheritNamespaces() {
112         return TBoolean.forString( getAttribute(
113                 XslAttributes.INHERIT_NAMESPACES ));
114     }
115
116     /* (non-Javadoc)
117      * @see org.netbeans.modules.xslt.model.InheritNamespacesSpec#setInheritNamespaces(org.netbeans.modules.xslt.model.enums.TBoolean)
118      */

119     public void setInheritNamespaces( TBoolean value ) {
120         setAttribute( XslAttributes.INHERIT_NAMESPACES, value );
121     }
122
123 }
124
Popular Tags