KickJava   Java API By Example, From Geeks To Geeks.

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


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.Element;
25 import org.netbeans.modules.xslt.model.XslComponent;
26 import org.netbeans.modules.xslt.model.XslReference;
27 import org.netbeans.modules.xslt.model.XslVisitor;
28 import org.netbeans.modules.xslt.model.enums.TBoolean;
29 import org.netbeans.modules.xslt.model.enums.Validation;
30
31
32 /**
33  * @author ads
34  *
35  */

36 class ElementImpl extends TypeableNameableSeqElCtor implements Element {
37
38     ElementImpl( XslModelImpl model, org.w3c.dom.Element JavaDoc element ) {
39         super( model , element );
40     }
41     
42     
43     ElementImpl( XslModelImpl model ){
44         super( model , XslElements.ELEMENT );
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 Element.class;
63     }
64
65     /* (non-Javadoc)
66      * @see org.netbeans.modules.xslt.model.ValidationSpec#getValidation()
67      */

68     public Validation getValidation() {
69         return Validation.forString( getAttribute( XslAttributes.VALIDATION ));
70     }
71
72     /* (non-Javadoc)
73      * @see org.netbeans.modules.xslt.model.ValidationSpec#setValidation(org.netbeans.modules.xslt.model.enums.Validation)
74      */

75     public void setValidation( Validation validation ) {
76         setAttribute( XslAttributes.VALIDATION, validation );
77     }
78
79     /* (non-Javadoc)
80      * @see org.netbeans.modules.xslt.model.UseAttributesSetsSpec#getUseAttributeSets()
81      */

82     public List JavaDoc<XslReference<AttributeSet>> getUseAttributeSets() {
83         return resolveGlobalReferenceList( AttributeSet.class ,
84                 XslAttributes.USE_ATTRIBUTE_SETS);
85     }
86
87     /* (non-Javadoc)
88      * @see org.netbeans.modules.xslt.model.UseAttributesSetsSpec#setUseAttributeSets(java.util.Collection)
89      */

90     public void setUseAttributeSets( List JavaDoc<XslReference<AttributeSet>> collection ) {
91         setAttributeList( XslAttributes.USE_ATTRIBUTE_SETS, collection);
92     }
93
94
95     /* (non-Javadoc)
96      * @see org.netbeans.modules.xslt.model.InheritNamespacesSpec#getInheritNamespaces()
97      */

98     public TBoolean getInheritNamespaces() {
99         return TBoolean.forString( getAttribute(
100                 XslAttributes.INHERIT_NAMESPACES ));
101     }
102
103
104     /* (non-Javadoc)
105      * @see org.netbeans.modules.xslt.model.InheritNamespacesSpec#setInheritNamespaces(org.netbeans.modules.xslt.model.enums.TBoolean)
106      */

107     public void setInheritNamespaces( TBoolean value ) {
108         setAttribute( XslAttributes.INHERIT_NAMESPACES, value );
109     }
110
111 }
112
Popular Tags