001: /*
002: * The contents of this file are subject to the terms of the Common Development
003: * and Distribution License (the License). You may not use this file except in
004: * compliance with the License.
005: *
006: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007: * or http://www.netbeans.org/cddl.txt.
008: *
009: * When distributing Covered Code, include this CDDL Header Notice in each file
010: * and include the License file at http://www.netbeans.org/cddl.txt.
011: * If applicable, add the following below the CDDL Header, with the fields
012: * enclosed by brackets [] replaced by your own identifying information:
013: * "Portions Copyrighted [year] [name of copyright owner]"
014: *
015: * The Original Software is NetBeans. The Initial Developer of the Original
016: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017: * Microsystems, Inc. All Rights Reserved.
018: */
019: package org.netbeans.modules.xslt.model.impl;
020:
021: import org.netbeans.modules.xslt.model.AttributeValueTemplate;
022: import org.netbeans.modules.xslt.model.Sort;
023: import org.netbeans.modules.xslt.model.XslComponent;
024: import org.netbeans.modules.xslt.model.XslVisitor;
025: import org.netbeans.modules.xslt.model.enums.TBoolean;
026: import org.w3c.dom.Element;
027:
028: /**
029: * @author ads
030: *
031: */
032: class SortImpl extends SequenceElementConstructorImpl implements Sort {
033:
034: SortImpl(XslModelImpl model, Element element) {
035: super (model, element);
036: }
037:
038: SortImpl(XslModelImpl model) {
039: super (model, XslElements.SORT);
040: }
041:
042: /* (non-Javadoc)
043: * @see org.netbeans.modules.xslt.model.impl.XslComponentImpl#accept(org.netbeans.modules.xslt.model.XslVisitor)
044: */
045: @Override
046: public void accept(XslVisitor visitor) {
047: visitor.visit(this );
048: }
049:
050: /* (non-Javadoc)
051: * @see org.netbeans.modules.xslt.model.impl.XslComponentImpl#getComponentType()
052: */
053: @Override
054: public Class<? extends XslComponent> getComponentType() {
055: return Sort.class;
056: }
057:
058: /* (non-Javadoc)
059: * @see org.netbeans.modules.xslt.model.CollationSpec#getCollation()
060: */
061: public String getCollation() {
062: return getAttribute(XslAttributes.COLLATION);
063: }
064:
065: /* (non-Javadoc)
066: * @see org.netbeans.modules.xslt.model.CollationSpec#setCollation(java.lang.String)
067: */
068: public void setCollation(String value) {
069: setAttribute(XslAttributes.COLLATION, value);
070: }
071:
072: /* (non-Javadoc)
073: * @see org.netbeans.modules.xslt.model.LangSpec#getLang()
074: */
075: public AttributeValueTemplate getLang() {
076: return AttributeValueTemplateImpl.creatAttributeValueTemplate(
077: this , XslAttributes.LANG);
078: }
079:
080: /* (non-Javadoc)
081: * @see org.netbeans.modules.xslt.model.LangSpec#setLang(org.netbeans.modules.xslt.model.AttributeValueTemplate)
082: */
083: public void setLang(AttributeValueTemplate avt) {
084: setAttribute(XslAttributes.LANG, avt);
085: }
086:
087: /* (non-Javadoc)
088: * @see org.netbeans.modules.xslt.model.Sort#getCaseOrder()
089: */
090: public AttributeValueTemplate getCaseOrder() {
091: return AttributeValueTemplateImpl.creatAttributeValueTemplate(
092: this , XslAttributes.CASE_ORDER);
093: }
094:
095: /* (non-Javadoc)
096: * @see org.netbeans.modules.xslt.model.Sort#getDataType()
097: */
098: public AttributeValueTemplate getDataType() {
099: return AttributeValueTemplateImpl.creatAttributeValueTemplate(
100: this , XslAttributes.DATA_TYPE);
101: }
102:
103: /* (non-Javadoc)
104: * @see org.netbeans.modules.xslt.model.Sort#getOrder()
105: */
106: public AttributeValueTemplate getOrder() {
107: return AttributeValueTemplateImpl.creatAttributeValueTemplate(
108: this , XslAttributes.ORDER);
109: }
110:
111: /* (non-Javadoc)
112: * @see org.netbeans.modules.xslt.model.Sort#getStable()
113: */
114: public TBoolean getStable() {
115: return TBoolean.forString(getAttribute(XslAttributes.STABLE));
116: }
117:
118: /* (non-Javadoc)
119: * @see org.netbeans.modules.xslt.model.Sort#setCaseOrder(org.netbeans.modules.xslt.model.AttributeValueTemplate)
120: */
121: public void setCaseOrder(AttributeValueTemplate value) {
122: setAttribute(XslAttributes.CASE_ORDER, value);
123: }
124:
125: /* (non-Javadoc)
126: * @see org.netbeans.modules.xslt.model.Sort#setDataType(org.netbeans.modules.xslt.model.AttributeValueTemplate)
127: */
128: public void setDataType(AttributeValueTemplate value) {
129: setAttribute(XslAttributes.DATA_TYPE, value);
130: }
131:
132: /* (non-Javadoc)
133: * @see org.netbeans.modules.xslt.model.Sort#setOrder(org.netbeans.modules.xslt.model.AttributeValueTemplate)
134: */
135: public void setOrder(AttributeValueTemplate value) {
136: setAttribute(XslAttributes.ORDER, value);
137: }
138:
139: /* (non-Javadoc)
140: * @see org.netbeans.modules.xslt.model.Sort#setStable(org.netbeans.modules.xslt.model.enums.TBoolean)
141: */
142: public void setStable(TBoolean value) {
143: setAttribute(XslAttributes.STABLE, value);
144: }
145:
146: }
|