Package net.sourceforge.plantuml.core
Class UmlSource
java.lang.Object
net.sourceforge.plantuml.core.UmlSource
Represents the textual source of some diagram. The source should start with a
@startfoo and end with @endfoo.
So the diagram does not have to be a UML one.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsIgnoreCase(String searched) static UmlSourcecreate(List<StringLocated> source, boolean checkEndingBackslash) static UmlSourcecreateWithRaw(List<StringLocated> source, boolean checkEndingBackslash, List<StringLocated> rawSource) Build the source from a text.Retrieve the type of the diagram.getId()Deprecated.getPlainString(String separator) Return the source as a single String.getRawString(String separator) getTitle()Retrieve the title, if defined in the diagram source.intReturn the number of line in the diagram.booleanbooleanisEmpty()Check if a source diagram description is empty.booleanAllows to iterator over the source.longseed()
-
Method Details
-
removeInitialSkinparam
-
containsIgnoreCase
-
create
-
createWithRaw
public static UmlSource createWithRaw(List<StringLocated> source, boolean checkEndingBackslash, List<StringLocated> rawSource) Build the source from a text.- Parameters:
source- the source of the diagramcheckEndingBackslash-trueif an ending backslash means that a line has to be collapsed with the following one.
-
getDiagramType
Retrieve the type of the diagram. This is based on the first line@startfoo.- Returns:
- the type of the diagram.
-
iterator2
Allows to iterator over the source.- Returns:
- a iterator that allow counting line number.
-
getPlainString
Deprecated.UsegetPlainString(String)instead, likegetPlainString("\n") -
getPlainString
Return the source as a single String.- Returns:
- the whole diagram source
-
getRawString
-
seed
public long seed() -
getTotalLineCount
public int getTotalLineCount()Return the number of line in the diagram. -
getTotalLineCountLessThan5
public boolean getTotalLineCountLessThan5() -
isEmpty
public boolean isEmpty()Check if a source diagram description is empty. Does not take comment line into account.- Returns:
trueif the diagram does not contain information.
-
getTitle
Retrieve the title, if defined in the diagram source. Never returnnull. -
isStartDef
public boolean isStartDef() -
getId
-
getPlainString(String)instead, likegetPlainString("\n")