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;
020:
021: import java.util.List;
022:
023: /**
024: * <pre>
025: * <xs:element name="analyze-string" substitutionGroup="xsl:instruction">
026: * <xs:complexType>
027: * <xs:complexContent>
028: * <xs:extension base="xsl:element-only-versioned-element-type">
029: * <xs:sequence>
030: * <xs:element ref="xsl:matching-substring" minOccurs="0"/>
031: * <xs:element ref="xsl:non-matching-substring" minOccurs="0"/>
032: * <xs:element ref="xsl:fallback" minOccurs="0" maxOccurs="unbounded"/>
033: * </xs:sequence>
034: * <xs:attribute name="select" type="xsl:expression" use="required"/>
035: * <xs:attribute name="regex" type="xsl:avt" use="required"/>
036: * <xs:attribute name="flags" type="xsl:avt" default=""/>
037: * </xs:extension>
038: * </xs:complexContent>
039: * </xs:complexType>
040: * </xs:element>
041: *
042: * </pre>
043: * @author ads
044: *
045: */
046: public interface AnalyzeString extends SelectSpec, SequenceElement {
047:
048: String REGEX = "regex"; // NOI18N
049:
050: String FLAGS = "flags"; // NOI18N
051:
052: /**
053: * @return MatchingSubstring child component
054: */
055: MatchingSubstring getMatchingSubstring();
056:
057: /**
058: * Set new MatchingSubstring child component.
059: * @param child new MatchingSubstring component
060: */
061: void setMatchingSubstring(MatchingSubstring child);
062:
063: /**
064: * @return NonMatchingSubstring child component
065: */
066: NonMatchingSubstring getNonMatchingSubstring();
067:
068: /**
069: * Set new NonMatchingSubstring child component.
070: * @param child
071: */
072: void setNonMatchingSubstring(NonMatchingSubstring child);
073:
074: /**
075: * @return unmodifiable list of fallback children components
076: */
077: List<Fallback> getFallbacks();
078:
079: /**
080: * Append new fallback child in the end of fallback children list.
081: * @param fallback new fallback child
082: */
083: void appendFallback(Fallback fallback);
084:
085: /**
086: * Insert new fallback child element at <code>position</code>.
087: * @param fallback new fallback child
088: * @param position index in fallback children list
089: */
090: void addFallback(Fallback fallback, int position);
091:
092: /**
093: * Removes <code>fallback</code> child.
094: * @param fallback child component
095: */
096: void removeFallback(Fallback fallback);
097:
098: /**
099: * @return "regex" attribute value
100: */
101: AttributeValueTemplate getRegex();
102:
103: /**
104: * Set "regex" attribute value.
105: * @param avt new attribute value
106: */
107: void setRegex(AttributeValueTemplate avt);
108:
109: /**
110: * @return "regex" attribute value
111: */
112: AttributeValueTemplate getFlags();
113:
114: /**
115: * Set "flags" attribute value.
116: * @param avt new attribute value
117: */
118: void setFlags(AttributeValueTemplate avt);
119: }
|