/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * This file is part of PlantUML. * * Licensed under The MIT License (Massachusetts Institute of Technology License) * * See http://opensource.org/licenses/MIT * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * * 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; import java.util.Map; import net.sourceforge.plantuml.FontParam; import net.sourceforge.plantuml.ISkinParam; import net.sourceforge.plantuml.Url; import net.sourceforge.plantuml.cucadiagram.entity.EntityFactory; import net.sourceforge.plantuml.graphic.FontConfiguration; import net.sourceforge.plantuml.graphic.HtmlColor; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.USymbol; import net.sourceforge.plantuml.graphic.color.ColorType; import net.sourceforge.plantuml.graphic.color.Colors; import net.sourceforge.plantuml.svek.IEntityImage; import net.sourceforge.plantuml.svek.PackageStyle; import net.sourceforge.plantuml.svek.SingleStrategy; import net.sourceforge.plantuml.ugraphic.UStroke; public class GroupRoot implements IGroup { private final EntityFactory entityFactory; public GroupRoot(EntityFactory entityFactory) { this.entityFactory = entityFactory; } public Collection getLeafsDirect() { final List result = new ArrayList(); for (ILeaf ent : entityFactory.getLeafs().values()) { 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(); } public LeafType getEntityType() { 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(); } public TextBlock getBody(PortionShower portionShower, FontParam fontParam, ISkinParam skinParam) { throw new UnsupportedOperationException(); } public Code getCode() { return Code.of("__ROOT__"); } public LongCode getLongCode() { return null; } public void addUrl(Url url) { throw new UnsupportedOperationException(); } public IGroup getParentContainer() { return null; } public boolean containsLeafRecurse(ILeaf entity) { throw new UnsupportedOperationException(); } public Collection getChildren() { final List result = new ArrayList(); for (IGroup ent : entityFactory.getGroups().values()) { if (ent.getParentContainer() == this) { result.add(ent); } } return Collections.unmodifiableCollection(result); } public void moveEntitiesTo(IGroup dest) { throw new UnsupportedOperationException(); } public int size() { throw new UnsupportedOperationException(); } public GroupType getGroupType() { return null; } public Code getNamespace2() { throw new UnsupportedOperationException(); } public PackageStyle getPackageStyle() { throw new UnsupportedOperationException(); } public void overideImage(IEntityImage img, LeafType state) { throw new UnsupportedOperationException(); } public boolean isHidden() { return false; } public USymbol getUSymbol() { return null; // throw new UnsupportedOperationException(); } public void setUSymbol(USymbol symbol) { throw new UnsupportedOperationException(); } public SingleStrategy getSingleStrategy() { return SingleStrategy.SQUARRE; } public boolean isRemoved() { return false; } public boolean hasUrl() { return false; } 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) { // throw new UnsupportedOperationException(); } public void putTip(String member, Display display) { throw new UnsupportedOperationException(); } public Map getTips() { throw new UnsupportedOperationException(); } public Bodier getBodier() { throw new UnsupportedOperationException(); } public Colors getColors(ISkinParam skinParam) { return Colors.empty(); } public void setColors(Colors colors) { throw new UnsupportedOperationException(); } public void setSpecificColorTOBEREMOVED(ColorType type, HtmlColor color) { throw new UnsupportedOperationException(); } public void setSpecificLineStroke(UStroke specificLineStroke) { throw new UnsupportedOperationException(); } public void applyStroke(String s) { throw new UnsupportedOperationException(); } public void applyStroke(Colors colors) { throw new UnsupportedOperationException(); } public FontConfiguration getFontConfigurationForTitle(ISkinParam skinParam) { throw new UnsupportedOperationException(); } }