KickJava   Java API By Example, From Geeks To Geeks.

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


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 org.netbeans.modules.xslt.model.AttributeValueTemplate;
22 import org.netbeans.modules.xslt.model.Sort;
23 import org.netbeans.modules.xslt.model.XslComponent;
24 import org.netbeans.modules.xslt.model.XslVisitor;
25 import org.netbeans.modules.xslt.model.enums.TBoolean;
26 import org.w3c.dom.Element JavaDoc;
27
28
29 /**
30  * @author ads
31  *
32  */

33 class SortImpl extends SequenceElementConstructorImpl implements Sort {
34
35     SortImpl( XslModelImpl model, Element JavaDoc element ) {
36         super( model , element );
37     }
38     
39     SortImpl( XslModelImpl model ) {
40         super( model , XslElements.SORT );
41     }
42
43     /* (non-Javadoc)
44      * @see org.netbeans.modules.xslt.model.impl.XslComponentImpl#accept(org.netbeans.modules.xslt.model.XslVisitor)
45      */

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

55     @Override JavaDoc
56     public Class JavaDoc<? extends XslComponent> getComponentType()
57     {
58         return Sort.class;
59     }
60
61     /* (non-Javadoc)
62      * @see org.netbeans.modules.xslt.model.CollationSpec#getCollation()
63      */

64     public String JavaDoc getCollation() {
65         return getAttribute( XslAttributes.COLLATION );
66     }
67
68     /* (non-Javadoc)
69      * @see org.netbeans.modules.xslt.model.CollationSpec#setCollation(java.lang.String)
70      */

71     public void setCollation( String JavaDoc value ) {
72         setAttribute( XslAttributes.COLLATION, value );
73     }
74
75     /* (non-Javadoc)
76      * @see org.netbeans.modules.xslt.model.LangSpec#getLang()
77      */

78     public AttributeValueTemplate getLang() {
79         return AttributeValueTemplateImpl.creatAttributeValueTemplate( this,
80                 XslAttributes.LANG );
81     }
82
83     /* (non-Javadoc)
84      * @see org.netbeans.modules.xslt.model.LangSpec#setLang(org.netbeans.modules.xslt.model.AttributeValueTemplate)
85      */

86     public void setLang( AttributeValueTemplate avt ) {
87         setAttribute( XslAttributes.LANG, avt);
88     }
89
90     /* (non-Javadoc)
91      * @see org.netbeans.modules.xslt.model.Sort#getCaseOrder()
92      */

93     public AttributeValueTemplate getCaseOrder() {
94         return AttributeValueTemplateImpl.creatAttributeValueTemplate( this ,
95                 XslAttributes.CASE_ORDER );
96     }
97
98     /* (non-Javadoc)
99      * @see org.netbeans.modules.xslt.model.Sort#getDataType()
100      */

101     public AttributeValueTemplate getDataType() {
102         return AttributeValueTemplateImpl.creatAttributeValueTemplate( this ,
103                 XslAttributes.DATA_TYPE );
104     }
105
106     /* (non-Javadoc)
107      * @see org.netbeans.modules.xslt.model.Sort#getOrder()
108      */

109     public AttributeValueTemplate getOrder() {
110         return AttributeValueTemplateImpl.creatAttributeValueTemplate( this ,
111                 XslAttributes.ORDER );
112     }
113
114     /* (non-Javadoc)
115      * @see org.netbeans.modules.xslt.model.Sort#getStable()
116      */

117     public TBoolean getStable() {
118         return TBoolean.forString( getAttribute(XslAttributes.STABLE ));
119     }
120
121     /* (non-Javadoc)
122      * @see org.netbeans.modules.xslt.model.Sort#setCaseOrder(org.netbeans.modules.xslt.model.AttributeValueTemplate)
123      */

124     public void setCaseOrder( AttributeValueTemplate value ) {
125         setAttribute( XslAttributes.CASE_ORDER, value);
126     }
127
128     /* (non-Javadoc)
129      * @see org.netbeans.modules.xslt.model.Sort#setDataType(org.netbeans.modules.xslt.model.AttributeValueTemplate)
130      */

131     public void setDataType( AttributeValueTemplate value ) {
132         setAttribute( XslAttributes.DATA_TYPE, value);
133     }
134
135     /* (non-Javadoc)
136      * @see org.netbeans.modules.xslt.model.Sort#setOrder(org.netbeans.modules.xslt.model.AttributeValueTemplate)
137      */

138     public void setOrder( AttributeValueTemplate value ) {
139         setAttribute( XslAttributes.ORDER, value);
140     }
141
142     /* (non-Javadoc)
143      * @see org.netbeans.modules.xslt.model.Sort#setStable(org.netbeans.modules.xslt.model.enums.TBoolean)
144      */

145     public void setStable( TBoolean value ) {
146         setAttribute( XslAttributes.STABLE, value);
147     }
148     
149 }
150
Popular Tags