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 java.util.List;
022:
023: import org.netbeans.modules.xslt.model.CharacterMap;
024: import org.netbeans.modules.xslt.model.Output;
025: import org.netbeans.modules.xslt.model.XslComponent;
026: import org.netbeans.modules.xslt.model.XslReference;
027: import org.netbeans.modules.xslt.model.XslVisitor;
028: import org.netbeans.modules.xslt.model.enums.Standalone;
029: import org.netbeans.modules.xslt.model.enums.TBoolean;
030: import org.w3c.dom.Element;
031:
032: /**
033: * @author ads
034: *
035: */
036: class OutputImpl extends QNameableImpl implements Output {
037:
038: OutputImpl(XslModelImpl model, Element element) {
039: super (model, element);
040: }
041:
042: OutputImpl(XslModelImpl model) {
043: super (model, XslElements.OUTPUT);
044: }
045:
046: /* (non-Javadoc)
047: * @see org.netbeans.modules.xslt.model.impl.XslComponentImpl#accept(org.netbeans.modules.xslt.model.XslVisitor)
048: */
049: @Override
050: public void accept(XslVisitor visitor) {
051: visitor.visit(this );
052: }
053:
054: /* (non-Javadoc)
055: * @see org.netbeans.modules.xslt.model.impl.XslComponentImpl#getComponentType()
056: */
057: @Override
058: public Class<? extends XslComponent> getComponentType() {
059: return Output.class;
060: }
061:
062: /* (non-Javadoc)
063: * @see org.netbeans.modules.xslt.model.EncodingSpec#getEncoding()
064: */
065: public String getEncoding() {
066: return getAttribute(XslAttributes.ENCODING);
067: }
068:
069: /* (non-Javadoc)
070: * @see org.netbeans.modules.xslt.model.EncodingSpec#setEncoding(java.lang.String)
071: */
072: public void setEncoding(String encoding) {
073: setAttribute(XslAttributes.ENCODING, encoding);
074: }
075:
076: /* (non-Javadoc)
077: * @see org.netbeans.modules.xslt.model.IndentSpec#getIndent()
078: */
079: public TBoolean getIndent() {
080: return TBoolean.forString(getAttribute(XslAttributes.INDENT));
081: }
082:
083: /* (non-Javadoc)
084: * @see org.netbeans.modules.xslt.model.IndentSpec#setIndent(org.netbeans.modules.xslt.model.enums.TBoolean)
085: */
086: public void setIndent(TBoolean value) {
087: setAttribute(XslAttributes.INDENT, value);
088: }
089:
090: /* (non-Javadoc)
091: * @see org.netbeans.modules.xslt.model.Output#getStandalone()
092: */
093: public Standalone getStandalone() {
094: return Standalone
095: .forString(getAttribute(XslAttributes.STANDALONE));
096: }
097:
098: /* (non-Javadoc)
099: * @see org.netbeans.modules.xslt.model.Output#setStandalone(org.netbeans.modules.xslt.model.enums.Standalone)
100: */
101: public void setStandalone(Standalone value) {
102: setAttribute(XslAttributes.STANDALONE, value);
103: }
104:
105: /* (non-Javadoc)
106: * @see org.netbeans.modules.xslt.model.Output#getUndeclarePrefixes()
107: */
108: public TBoolean getUndeclarePrefixes() {
109: return TBoolean
110: .forString(getAttribute(XslAttributes.UNDECLARE_PREFIXES));
111: }
112:
113: /* (non-Javadoc)
114: * @see org.netbeans.modules.xslt.model.Output#setUndeclarePrefixes(org.netbeans.modules.xslt.model.enums.TBoolean)
115: */
116: public void setUndeclarePrefixes(TBoolean value) {
117: setAttribute(XslAttributes.UNDECLARE_PREFIXES, value);
118: }
119:
120: /* (non-Javadoc)
121: * @see org.netbeans.modules.xslt.model.UseCharacterMapsSpec#getUseCharacterMaps()
122: */
123: public List<XslReference<CharacterMap>> getUseCharacterMaps() {
124: return resolveGlobalReferenceList(CharacterMap.class,
125: XslAttributes.USE_CHARACTER_MAPS);
126: }
127:
128: /* (non-Javadoc)
129: * @see org.netbeans.modules.xslt.model.UseCharacterMapsSpec#setUseCharacterMaps(java.util.List)
130: */
131: public void setUseCharacterMaps(
132: List<XslReference<CharacterMap>> list) {
133: setAttribute(XslAttributes.USE_CHARACTER_MAPS, list);
134: }
135:
136: }
|