Package net.sourceforge.plantuml.core
Class UmlSource
- java.lang.Object
-
- net.sourceforge.plantuml.core.UmlSource
-
public final class UmlSource extends java.lang.Object
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
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
containsIgnoreCase(java.lang.String searched)
static UmlSource
create(java.util.List<StringLocated> source, boolean checkEndingBackslash)
static UmlSource
createWithRaw(java.util.List<StringLocated> source, boolean checkEndingBackslash, java.util.List<StringLocated> rawSource)
Build the source from a text.DiagramType
getDiagramType()
Retrieve the type of the diagram.java.lang.String
getId()
java.lang.String
getLine(LineLocation n)
java.lang.String
getPlainString()
Deprecated.java.lang.String
getPlainString(java.lang.String separator)
Return the source as a single String.java.lang.String
getRawString(java.lang.String separator)
Display
getTitle()
Retrieve the title, if defined in the diagram source.int
getTotalLineCount()
Return the number of line in the diagram.boolean
getTotalLineCountLessThan5()
boolean
isEmpty()
Check if a source diagram description is empty.boolean
isStartDef()
IteratorCounter2
iterator2()
Allows to iterator over the source.UmlSource
removeInitialSkinparam()
long
seed()
-
-
-
Method Detail
-
removeInitialSkinparam
public UmlSource removeInitialSkinparam()
-
containsIgnoreCase
public boolean containsIgnoreCase(java.lang.String searched)
-
create
public static UmlSource create(java.util.List<StringLocated> source, boolean checkEndingBackslash)
-
createWithRaw
public static UmlSource createWithRaw(java.util.List<StringLocated> source, boolean checkEndingBackslash, java.util.List<StringLocated> rawSource)
Build the source from a text.- Parameters:
source
- the source of the diagramcheckEndingBackslash
-true
if an ending backslash means that a line has to be collapsed with the following one.
-
getDiagramType
public DiagramType getDiagramType()
Retrieve the type of the diagram. This is based on the first line@startfoo
.- Returns:
- the type of the diagram.
-
iterator2
public IteratorCounter2 iterator2()
Allows to iterator over the source.- Returns:
- a iterator that allow counting line number.
-
getPlainString
@Deprecated public java.lang.String getPlainString()
Deprecated.
-
getPlainString
public java.lang.String getPlainString(java.lang.String separator)
Return the source as a single String.- Returns:
- the whole diagram source
-
getRawString
public java.lang.String getRawString(java.lang.String separator)
-
seed
public long seed()
-
getLine
public java.lang.String getLine(LineLocation n)
-
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:
true
if the diagram does not contain information.
-
getTitle
public Display getTitle()
Retrieve the title, if defined in the diagram source. Never returnnull
.
-
isStartDef
public boolean isStartDef()
-
getId
public java.lang.String getId()
-
-