public interface FileHeaderTransformer
FileHeader in both way :
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_PROCESS_END_TAG
default process end tag.
|
static String |
DEFAULT_PROCESS_START_TAG
default process start tag.
|
static String |
DEFAULT_SECTION_DELIMITER
default section delimiter.
|
static String |
LINE_SEPARATOR
Line separator.
|
| Modifier and Type | Method and Description |
|---|---|
String |
addHeader(String header,
String content)
Adds the header.
|
String |
boxComment(String header,
boolean withTags)
Box the given
header in a comment. |
String |
boxProcessTag(String header)
Box the given
header between process tags. |
String |
getCommentEndTag() |
String |
getCommentLinePrefix() |
String |
getCommentStartTag() |
String[] |
getDefaultAcceptedExtensions()
Get the default accepted extensions for this transformer.
|
String |
getDescription() |
String |
getName() |
String |
getProcessEndTag()
Obtain the process tag which indiciates the end of the header content.
|
String |
getProcessStartTag()
Obtains the process tag which indicates the begin of the header content.
|
String |
getSectionDelimiter()
The pattern used to separate sections of the header.
|
boolean |
isCopyrightEquals(FileHeader header1,
FileHeader header2)
Tests if the copyright of the two models are equals.
|
boolean |
isDescriptionEquals(FileHeader header1,
FileHeader header2)
Tests if the description of the two models are equals.
|
boolean |
isEmptyLineAfterHeader()
Get flag if there should be an empty line after the header.
|
boolean |
isLicenseEquals(FileHeader header1,
FileHeader header2)
Tests if the license of the two models are equals.
|
void |
setCommentEndTag(String commentEndTag)
Changes the comment end tag.
|
void |
setCommentLinePrefix(String commentLinePrefix)
Changes the comment prefix line.
|
void |
setCommentStartTag(String commentStartTag)
Changes the comment start tag.
|
void |
setDescription(String description)
Chages the description of the transformer.
|
void |
setEmptyLineAfterHeader(boolean emptyLine)
Set flag if there should be an empty line after the header.
|
void |
setName(String name)
Changes the name of the transformer.
|
void |
setProcessEndTag(String tag)
Changes the process end tag.
|
void |
setProcessStartTag(String tag)
Changes the process start tag.
|
void |
setSectionDelimiter(String headerSectionDelimiter)
Sets the header section delimiter.
|
FileHeader |
toFileHeader(String header)
Build a
FileHeader from an UNBOXED header content. |
String |
toHeaderContent(FileHeader model)
Build a fully boxed header content from the given
model. |
String |
toString(FileHeader model)
Build a UNBOXED header content from the given
model. |
String |
unboxComent(String boxedHeader)
Unbox the given boxed
boxedHeader to obtain the header content. |
String |
unboxProcessTag(String boxedHeader)
Unbox the process tag on the given boxed
boxedHeader to obtain
the brute header content. |
static final String DEFAULT_SECTION_DELIMITER
static final String DEFAULT_PROCESS_START_TAG
static final String DEFAULT_PROCESS_END_TAG
static final String LINE_SEPARATOR
String getName()
String getDescription()
String[] getDefaultAcceptedExtensions()
String getProcessStartTag()
setProcessStartTag(String) method), will use the
DEFAULT_PROCESS_START_TAGString getProcessEndTag()
setProcessEndTag(String) method), will use the
DEFAULT_PROCESS_END_TAG.String getSectionDelimiter()
setSectionDelimiter(String) method), will use the
DEFAULT_SECTION_DELIMITER.String getCommentStartTag()
String getCommentEndTag()
String getCommentLinePrefix()
boolean isEmptyLineAfterHeader()
String addHeader(String header, String content)
header - header to addcontent - content of original fileString boxComment(String header, boolean withTags)
header in a comment.header - the header content WITHOUT any comment boxingwithTags - flag to add start and end comment tags.String unboxComent(String boxedHeader)
boxedHeader to obtain the header content.boxedHeader - the boxed headerString boxProcessTag(String header)
header between process tags.header - the header content WITHOUT any comment boxinggetProcessStartTag(),
getProcessEndTag()String unboxProcessTag(String boxedHeader)
boxedHeader to obtain
the brute header content.boxedHeader - the boxed headergetProcessStartTag(),
getProcessEndTag()FileHeader toFileHeader(String header)
FileHeader from an UNBOXED header content.header - unboxed header contentString toString(FileHeader model)
model.model - the model of the file header (can not be null)String toHeaderContent(FileHeader model)
model.model - the model of the file header (can not be null)boolean isDescriptionEquals(FileHeader header1, FileHeader header2)
header1 - the first headerheader2 - the second headertrue if headers description are stricly the sameboolean isCopyrightEquals(FileHeader header1, FileHeader header2)
header1 - the first headerheader2 - the second headertrue if headers copyright are stricly the sameboolean isLicenseEquals(FileHeader header1, FileHeader header2)
header1 - the first headerheader2 - the second headertrue if headers license are stricly the same (WITHOUT ANY space)void setName(String name)
name - the new name of the transformervoid setDescription(String description)
description - the new description of the transformervoid setSectionDelimiter(String headerSectionDelimiter)
DEFAULT_SECTION_DELIMITER.headerSectionDelimiter - the new delimitervoid setProcessStartTag(String tag)
tag - the new start tagvoid setProcessEndTag(String tag)
tag - the new endtagvoid setCommentStartTag(String commentStartTag)
commentStartTag - the new comment start tagvoid setCommentEndTag(String commentEndTag)
commentEndTag - the new comment end tagvoid setCommentLinePrefix(String commentLinePrefix)
commentLinePrefix - the new comment prefix linevoid setEmptyLineAfterHeader(boolean emptyLine)
emptyLine - flag if there should be an empty line after the headerCopyright © 2010–2023. All rights reserved.