1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-06-09 19:52:25 +00:00
plantuml/src/net/sourceforge/plantuml/cucadiagram/GroupRoot.java

294 lines
6.8 KiB
Java
Raw Normal View History

2013-12-10 19:36:50 +00:00
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
2019-01-16 18:34:41 +00:00
* (C) Copyright 2009-2020, Arnaud Roques
2013-12-10 19:36:50 +00:00
*
2016-03-06 16:47:34 +00:00
* Project Info: http://plantuml.com
2013-12-10 19:36:50 +00:00
*
2017-03-15 19:13:31 +00:00
* If you like this project or if you find it useful, you can support us at:
*
* http://plantuml.com/patreon (only 1$ per month!)
* http://plantuml.com/paypal
*
2013-12-10 19:36:50 +00:00
* This file is part of PlantUML.
*
* PlantUML is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlantUML distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
* License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
*
* Original Author: Arnaud Roques
*
*
*/
package net.sourceforge.plantuml.cucadiagram;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
2015-05-31 18:56:03 +00:00
import java.util.Map;
2018-03-09 21:37:34 +00:00
import java.util.Set;
2013-12-10 19:36:50 +00:00
2015-04-07 18:18:37 +00:00
import net.sourceforge.plantuml.FontParam;
2015-06-07 10:23:10 +00:00
import net.sourceforge.plantuml.ISkinParam;
2013-12-10 19:36:50 +00:00
import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.cucadiagram.entity.EntityFactory;
2016-01-09 12:15:40 +00:00
import net.sourceforge.plantuml.graphic.FontConfiguration;
2015-06-07 10:23:10 +00:00
import net.sourceforge.plantuml.graphic.TextBlock;
2013-12-10 19:36:50 +00:00
import net.sourceforge.plantuml.graphic.USymbol;
2015-09-28 20:42:17 +00:00
import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors;
2013-12-10 19:36:50 +00:00
import net.sourceforge.plantuml.svek.IEntityImage;
import net.sourceforge.plantuml.svek.PackageStyle;
import net.sourceforge.plantuml.svek.SingleStrategy;
import net.sourceforge.plantuml.ugraphic.UStroke;
2020-03-18 10:50:02 +00:00
import net.sourceforge.plantuml.ugraphic.color.HColor;
2013-12-10 19:36:50 +00:00
public class GroupRoot implements IGroup {
private final EntityFactory entityFactory;
public GroupRoot(EntityFactory entityFactory) {
this.entityFactory = entityFactory;
}
public Collection<ILeaf> getLeafsDirect() {
final List<ILeaf> result = new ArrayList<ILeaf>();
2019-12-10 21:45:49 +00:00
for (ILeaf ent : entityFactory.leafs()) {
2013-12-10 19:36:50 +00:00
if (ent.getParentContainer() == this) {
result.add(ent);
}
}
return Collections.unmodifiableCollection(result);
}
public boolean isGroup() {
return true;
}
public Display getDisplay() {
throw new UnsupportedOperationException();
}
public void setDisplay(Display display) {
throw new UnsupportedOperationException();
}
2017-04-05 17:37:42 +00:00
public LeafType getLeafType() {
2013-12-10 19:36:50 +00:00
throw new UnsupportedOperationException();
}
public String getUid() {
throw new UnsupportedOperationException();
}
public Url getUrl99() {
return null;
}
public Stereotype getStereotype() {
throw new UnsupportedOperationException();
}
public void setStereotype(Stereotype stereotype) {
throw new UnsupportedOperationException();
}
2015-06-07 10:23:10 +00:00
public TextBlock getBody(PortionShower portionShower, FontParam fontParam, ISkinParam skinParam) {
2013-12-10 19:36:50 +00:00
throw new UnsupportedOperationException();
}
public Code getCode() {
2019-12-10 21:45:49 +00:00
return CodeImpl.of("__ROOT__");
2013-12-10 19:36:50 +00:00
}
2020-01-12 22:13:17 +00:00
2019-12-10 21:45:49 +00:00
public String getCodeGetName() {
return getCode().getName();
2015-04-07 18:18:37 +00:00
}
2013-12-10 19:36:50 +00:00
public void addUrl(Url url) {
throw new UnsupportedOperationException();
}
public IGroup getParentContainer() {
return null;
}
public boolean containsLeafRecurse(ILeaf entity) {
throw new UnsupportedOperationException();
}
public Collection<IGroup> getChildren() {
final List<IGroup> result = new ArrayList<IGroup>();
2020-01-12 22:13:17 +00:00
if (entityFactory.namespaceSeparator.V1972()) {
for (IGroup ent : entityFactory.groups()) {
if (ent.getIdent().size() == 1) {
result.add(ent);
}
}
} else {
for (IGroup ent : entityFactory.groups()) {
if (ent.getParentContainer() == this) {
result.add(ent);
}
2013-12-10 19:36:50 +00:00
}
}
return Collections.unmodifiableCollection(result);
}
public void moveEntitiesTo(IGroup dest) {
throw new UnsupportedOperationException();
}
public int size() {
throw new UnsupportedOperationException();
}
public GroupType getGroupType() {
return null;
}
2019-12-10 21:45:49 +00:00
public Code getNamespace() {
2013-12-10 19:36:50 +00:00
throw new UnsupportedOperationException();
}
public PackageStyle getPackageStyle() {
throw new UnsupportedOperationException();
}
2017-04-05 17:37:42 +00:00
public void overrideImage(IEntityImage img, LeafType state) {
2013-12-10 19:36:50 +00:00
throw new UnsupportedOperationException();
}
public boolean isHidden() {
return false;
}
public USymbol getUSymbol() {
2015-04-07 18:18:37 +00:00
return null;
// throw new UnsupportedOperationException();
2013-12-10 19:36:50 +00:00
}
public void setUSymbol(USymbol symbol) {
throw new UnsupportedOperationException();
}
public SingleStrategy getSingleStrategy() {
return SingleStrategy.SQUARRE;
}
public boolean isRemoved() {
return false;
}
public boolean hasUrl() {
return false;
}
2015-04-07 18:18:37 +00:00
public int getHectorLayer() {
throw new UnsupportedOperationException();
}
public void setHectorLayer(int layer) {
throw new UnsupportedOperationException();
}
public int getRawLayout() {
throw new UnsupportedOperationException();
}
public char getConcurrentSeparator() {
throw new UnsupportedOperationException();
}
public void setConcurrentSeparator(char separator) {
2016-01-09 12:15:40 +00:00
// throw new UnsupportedOperationException();
2015-04-07 18:18:37 +00:00
}
2015-05-31 18:56:03 +00:00
public void putTip(String member, Display display) {
throw new UnsupportedOperationException();
}
public Map<String, Display> getTips() {
throw new UnsupportedOperationException();
}
2015-06-07 10:23:10 +00:00
public Bodier getBodier() {
throw new UnsupportedOperationException();
}
2015-09-28 20:42:17 +00:00
public Colors getColors(ISkinParam skinParam) {
return Colors.empty();
}
public void setColors(Colors colors) {
throw new UnsupportedOperationException();
}
2020-03-18 10:50:02 +00:00
public void setSpecificColorTOBEREMOVED(ColorType type, HColor color) {
2015-09-28 20:42:17 +00:00
throw new UnsupportedOperationException();
}
public void setSpecificLineStroke(UStroke specificLineStroke) {
throw new UnsupportedOperationException();
}
2016-07-04 19:06:50 +00:00
public FontConfiguration getFontConfigurationForTitle(ISkinParam skinParam) {
2015-09-28 20:42:17 +00:00
throw new UnsupportedOperationException();
}
2018-03-09 21:37:34 +00:00
public void addStereotag(Stereotag tag) {
throw new UnsupportedOperationException();
}
public Set<Stereotag> stereotags() {
2016-01-09 12:15:40 +00:00
throw new UnsupportedOperationException();
}
2019-02-09 21:56:24 +00:00
public void setLegend(DisplayPositionned legend) {
throw new UnsupportedOperationException();
}
public DisplayPositionned getLegend() {
throw new UnsupportedOperationException();
}
2019-12-10 21:45:49 +00:00
public Ident getIdent() {
return Ident.empty();
}
2020-04-05 15:13:04 +00:00
public boolean isAloneAndUnlinked() {
throw new UnsupportedOperationException();
}
2020-04-19 16:04:39 +00:00
public void setThisIsTogether() {
throw new UnsupportedOperationException();
}
2013-12-10 19:36:50 +00:00
}