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: IContentGroup.java 3627 2006-12-12 03:22:18Z jzhang $
023: *
024: */
025: package com.bostechcorp.cbesb.common.mdl;
026:
027: /**
028: * This interface extends ContentNode and represents a group in the content. Some
029: * of the functionality provided:
030: * <p> Get/Set name and namespace URI
031: * <p> Get/Add/Remove child elements
032: *
033: */
034: public interface IContentGroup extends IContentNode {
035:
036: /**
037: * Get name
038: *
039: * @return String
040: */
041: public String getName();
042:
043: /**
044: * Set name
045: *
046: * @param name
047: */
048: public void setName(String name);
049:
050: /**
051: * Get namespace URI
052: *
053: * @return String
054: */
055: public String getNamespaceURI();
056:
057: /**
058: * Set namespace URI
059: *
060: * @param namespaceURI
061: */
062: public void setNamespaceURI(String namespaceURI);
063:
064: /**
065: * Get the count of children
066: *
067: * @return int
068: */
069: public int getChildCount();
070:
071: /**
072: * Get the index of child
073: *
074: * @param index
075: * @return ContentNode
076: */
077: public IContentNode getChildAtIndex(int index);
078:
079: /**
080: * Get all of children
081: *
082: * @return ContentNode
083: */
084: public IContentNode[] getChildren();
085:
086: /**
087: * Append child elements
088: *
089: * @param child
090: */
091: public void appendChild(IContentNode child);
092:
093: /**
094: * Insert child elements
095: *
096: * @param child
097: * @param index
098: */
099: public void insertChildAtIndex(IContentNode child, int index);
100:
101: /**
102: * Remove child elements
103: *
104: * @param index
105: */
106: public void removeChildAtIndex(int index);
107: }
|