本文整理汇总了Java中net.sourceforge.plantuml.core.DiagramDescription类的典型用法代码示例。如果您正苦于以下问题:Java DiagramDescription类的具体用法?Java DiagramDescription怎么用?Java DiagramDescription使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DiagramDescription类属于net.sourceforge.plantuml.core包,在下文中一共展示了DiagramDescription类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateDiagramDescription
import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription generateDiagramDescription(OutputStream os, int numImage,
FileFormatOption fileFormatOption) throws IOException {
if (blocks.size() == 0) {
noStartumlFound(os, fileFormatOption);
return null;
}
for (BlockUml b : blocks) {
final Diagram system = b.getDiagram();
final int nbInSystem = system.getNbImages();
if (numImage < nbInSystem) {
// final CMapData cmap = new CMapData();
final ImageData imageData = system.exportDiagram(os, numImage, fileFormatOption);
if (imageData.containsCMapData()) {
return ((DiagramDescriptionImpl) system.getDescription()).withCMapData(imageData
.getCMapData("plantuml"));
}
return system.getDescription();
}
numImage -= nbInSystem;
}
Log.error("numImage is too big = " + numImage);
return null;
}
示例2: generateDiagramDescription
import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription generateDiagramDescription(OutputStream os, int numImage, FileFormatOption fileFormatOption)
throws IOException {
if (blocks.size() == 0) {
noStartumlFound(os, fileFormatOption);
return null;
}
for (BlockUml b : blocks) {
final Diagram system = b.getDiagram();
final int nbInSystem = system.getNbImages();
if (numImage < nbInSystem) {
// final CMapData cmap = new CMapData();
final ImageData imageData = system.exportDiagram(os, numImage, fileFormatOption);
if (imageData.containsCMapData()) {
return ((DiagramDescriptionImpl) system.getDescription()).withCMapData(imageData
.getCMapData("plantuml"));
}
return system.getDescription();
}
numImage -= nbInSystem;
}
Log.error("numImage is too big = " + numImage);
return null;
}
示例3: processImage
import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public void processImage(String fileName) throws IOException {
if (fileName.startsWith("/")) {
throw new IllegalArgumentException();
}
final SourceStringReader sourceStringReader = new SourceStringReader(incoming.get(fileName));
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final FileFormat format = FileFormat.PNG;
final DiagramDescription desc = sourceStringReader.generateDiagramDescription(baos,
new FileFormatOption(format));
final String pngFileName = format.changeName(fileName, 0);
final String errorFileName = pngFileName.substring(0, pngFileName.length() - 4) + ".err";
synchronized (this) {
outgoing.remove(pngFileName);
outgoing.remove(errorFileName);
if (desc != null && desc.getDescription() != null) {
outgoing.put(pngFileName, baos.toByteArray());
if (desc.getDescription().startsWith("(Error)")) {
final ByteArrayOutputStream errBaos = new ByteArrayOutputStream();
sourceStringReader.generateImage(errBaos, new FileFormatOption(FileFormat.ATXT));
errBaos.close();
outgoing.put(errorFileName, errBaos.toByteArray());
}
}
}
}
示例4: processImage
import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public void processImage(String fileName) throws IOException {
if (fileName.startsWith("/")) {
throw new IllegalArgumentException();
}
final String pngFileName = getFutureFileName(fileName);
boolean done = false;
try {
final SourceStringReader sourceStringReader = new SourceStringReader(incoming.get(fileName));
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final FileFormat format = getFileFormat();
final DiagramDescription desc = sourceStringReader.generateDiagramDescription(baos, new FileFormatOption(
format));
final String errorFileName = pngFileName.substring(0, pngFileName.length() - 4) + ".err";
synchronized (this) {
outgoing.remove(pngFileName);
futureOutgoing.remove(pngFileName);
outgoing.remove(errorFileName);
if (desc != null && desc.getDescription() != null) {
outgoing.put(pngFileName, baos.toByteArray());
done = true;
if (desc.getDescription().startsWith("(Error)")) {
final ByteArrayOutputStream errBaos = new ByteArrayOutputStream();
sourceStringReader.generateImage(errBaos, new FileFormatOption(FileFormat.ATXT));
errBaos.close();
outgoing.put(errorFileName, errBaos.toByteArray());
}
}
}
} finally {
if (done == false) {
outgoing.put(pngFileName, new byte[0]);
}
}
}
示例5: getDescription
import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
final StringBuilder sb = new StringBuilder();
for (Diagram d : diagrams) {
if (sb.length() > 0) {
sb.append(" ");
}
sb.append(d.getDescription());
}
return new DiagramDescriptionImpl(sb.toString(), getClass());
}
示例6: getDescription
import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
return new DiagramDescriptionImpl("(Project)", getClass());
}
示例7: getDescription
import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
return new DiagramDescriptionImpl("(Dedication)", getClass());
}
示例8: getDescription
import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
return new DiagramDescriptionImpl("(Je Suis Charlie)", getClass());
}
示例9: getDescription
import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
return new DiagramDescriptionImpl("(Easter Eggs)", getClass());
}
示例10: getDescription
import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
return new DiagramDescriptionImpl("(Lost)", getClass());
}
示例11: getDescription
import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
return new DiagramDescriptionImpl("(Path)", getClass());
}
示例12: getDescription
import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
return new DiagramDescriptionImpl("(Apple //e)", getClass());
}
示例13: getDescription
import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
return new DiagramDescriptionImpl("(RIP)", getClass());
}
示例14: getDescription
import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
return new DiagramDescriptionImpl("activity3", getClass());
}
示例15: getDescription
import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
return new DiagramDescriptionImpl("(Sprites)", getClass());
}