public class SVGDocumentDataProvider extends Object implements IDocumentDataProvider
| Constructor and Description |
|---|
SVGDocumentDataProvider() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addStyle(SVGCssStyle style)
Adds the given
SVGCssStyle to the styles. |
boolean |
addStyles(Collection<SVGCssStyle> styles)
Adds the given
SVGCssStyles to the styles. |
void |
clear()
Resets the data provider clearing all the stored data and styles.
|
<TData extends SVGElementBase> |
getData(String key,
Class<TData> clazz)
Returns the data of the given key as the desired type if it exists.
|
Map<String,SVGElementBase> |
getUnmodifiableData()
Returns the
data as an unmodifiable map. |
Set<SVGCssStyle> |
getUnmodifiableStyles()
Gets the styles of the converted svg file.
|
void |
storeData(String key,
SVGElementBase data)
Sets the given data into the map.
|
public final Map<String,SVGElementBase> getUnmodifiableData()
data as an unmodifiable map.data as an unmodifiable map.public final Set<SVGCssStyle> getUnmodifiableStyles()
public boolean addStyle(SVGCssStyle style)
SVGCssStyle to the styles.style - the SVGCssStyle to add.SVGCssStyle was added otherwise false.public boolean addStyles(Collection<SVGCssStyle> styles)
SVGCssStyles to the styles.styles - the SVGCssStyles to add.SVGCssStyles were added otherwise false.public final void storeData(String key, SVGElementBase data)
key - the key of the identifier of the data, must not be null or epmty.data - the the data that should be set, must not be null.IllegalArgumentException - if either key is null or empty or data is null.public final <TData extends SVGElementBase> Optional<TData> getData(String key, Class<TData> clazz) throws SVGException
TData - desired type of the datakey - key to be used must not be null or emptyclazz - class to be used, must not be nullOptional containing the desired data or Optional.empty() if no such element exist.SVGException - if any provided parameter is null.public final void clear()
clear in interface IDocumentDataProviderCopyright © 2016 Saxonia Systems AG. All rights reserved.