001: /*
002: * ChainBuilder ESB
003: * Visual Enterprise Integration
004: *
005: * Copyright (C) 2006 Bostech Corporation
006: *
007: * This program is free software; you can redistribute it and/or modify
008: * it under the terms of the GNU General Public License as published by
009: * the Free Software Foundation; either version 2 of the License, or
010: * (at your option) any later version.
011: *
012: * This program is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * General Public License for more details.
016: *
017: * You should have received a copy of the GNU General Public License
018: * along with this program; if not, write to the Free Software
019: * Foundation, Inc.,59 Temple Place, Suite 330, Boston, MA 02111-1307
020: * USA
021: *
022: * $Id: IElementDefinition.java 6044 2007-03-18 03:55:52Z mpreston $
023: *
024: */
025: package com.bostechcorp.cbesb.common.mdl;
026:
027: import javax.xml.namespace.QName;
028:
029: /**
030: * Represents an instance of an "element" tag in an MDL document. Some of the
031: * functionality provided:
032: * a. Get/Set name and namespace URI
033: * b. Get/Set data type
034: * c. Get/Set format definition
035: * d. Get/Add/Remove child elements
036: *
037: */
038: public interface IElementDefinition {
039:
040: /**
041: * Get name.
042: *
043: * @return Returns the name.
044: */
045: public String getName();
046:
047: /**
048: * Set name.
049: *
050: * @param name The name to set.
051: */
052: public void setName(String name);
053:
054: /**
055: * Get namespace URI.
056: *
057: * @return Returns the namespaceURI.
058: */
059: public String getNamespaceURI();
060:
061: /**
062: * Set namespace URI.
063: *
064: * @param namespaceURI The namespaceURI to set.
065: */
066: public void setNamespaceURI(String namespaceURI);
067:
068: /**
069: * Get the global attribute of element.
070: *
071: * @return boolean
072: */
073: public boolean isGlobal();
074:
075: /**
076: * Set the global attribute of element.
077: *
078: * @param isGlobal
079: */
080: public void setGlobal(boolean isGlobal);
081:
082: /**
083: * Get datatype.
084: *
085: * @return Returns the datatype.
086: */
087: public QName getDatatype();
088:
089: /**
090: * Set datatype.
091: *
092: * @param namespaceURI The namespaceURI to set.
093: * @param localName The localName to set.
094: */
095: public void setDatatype(QName datatype);
096:
097: /**
098: * Get fotmat definition.
099: *
100: * @return Returns the formatDef.
101: */
102: public IFormatDefinition getFormatDefinition();
103:
104: /**
105: * Set format definition.
106: *
107: * @param formatDef The formatDef to set.
108: */
109: public void setFormatDefinition(IFormatDefinition formatDef);
110:
111: /**
112: * Get child count.
113: *
114: * @return int
115: */
116: public int getChildCount();
117:
118: /**
119: * Get the child at the specified index.
120: *
121: * @param index int
122: * @return ContentNode
123: */
124: public IContentNode getChildAtIndex(int index);
125:
126: /**
127: * Get child element.
128: *
129: * @return ContentNode
130: */
131: public IContentNode[] getChildren();
132:
133: /**
134: * Add child element.
135: *
136: * @param child IContentNode
137: */
138: public void appendChild(IContentNode child);
139:
140: /**
141: * Insert the child at the specified index.
142: *
143: * @param child IContentNode
144: * @param index int
145: */
146: public void insertChildAtIndex(IContentNode child, int index);
147:
148: /**
149: * Remove chile element.
150: *
151: * @param index
152: */
153: public void removeChildAtIndex(int index);
154:
155: /**
156: * Get the description.
157: *
158: * @return description
159: */
160: public String getDescription();
161:
162: /**
163: * Set the description.
164: *
165: * @param description String
166: */
167: public void setDescription(String description);
168:
169: /**
170: * Get the current MDLDocument object.
171: *
172: * @return The current MDLDocument object.
173: */
174: public IMDLDocument getMDLDocument();
175:
176: /**
177: * Set current MDLDocument object.
178: *
179: * @param mdlDoc The current MDLDocument object.
180: */
181: public void setMDLDocument(IMDLDocument mdlDoc);
182:
183: public boolean isIdMethodByTag();
184: }
|