20 package net.sf.gridarta.model.artifact;
22 import java.io.BufferedReader;
24 import java.io.IOException;
25 import java.io.Reader;
26 import java.io.StringReader;
49 import org.jetbrains.annotations.NotNull;
100 final File file =
new File(
"*string*");
120 final StringBuilder objectText =
new StringBuilder();
121 for (
final String attribute : attributes) {
122 objectText.append(attribute);
123 objectText.append(
'\n');
125 baseArchetype.setObjectText(objectText.toString());
135 final Reader reader =
new StringReader(artifacts);
136 try (BufferedReader bufferedReader =
new BufferedReader(reader)) {
137 artifactParser.
loadArtifact(bufferedReader, errorViewCollector,
"",
"panel",
"folder");
int getArchetypeCount()
Returns the number of defined archetypes.
A FaceObjects for regression tests.
Convenience class for adding messages to a ErrorView instance using a fixed category name...
void parseArtifacts(@NotNull final String artifacts)
Parses artifacts definitions.
An ArchetypeParser for regression tests.
Reading and writing of maps, handling of paths.
TestParser()
Creates a new instance.
TestParser(@NotNull final TestErrorView errorView)
Creates a new instance.
Gridarta can handle frame information of animations and allow the selection of an animation using a t...
final AnimationObjects animationObjects
The AnimationObjects instance.
An AnimationObjects for regression tests.
Base implementation of ArchetypeSet.
A MapArchObject implementation for testing purposes.
Base package of all Gridarta classes.
An Archetype implementation for testing purposes.
int getArchetypeCount()
Returns the number of Archetypes available.
R getArchetype(@NotNull String archetypeName)
Returns an Archetype by its name.
An Exception indicating that an Archetype name is not unique.
void loadArtifact(@NotNull final ErrorViewCollector errorViewCollector, @NotNull final File f, @NotNull final String archPath, @NotNull final String panelName, @NotNull final String folderName)
Loads one artifact.
AnimationObjects is a container for AnimationObjects.
final ArchetypeSet< TestGameObject, TestMapArchObject, TestArchetype > archetypeSet
The ArchetypeSet instance.
void addArchetype(@NotNull final String archetypeName, @NotNull final String... attributes)
Adds a new archetype.
GameObjects are the objects based on Archetypes found on maps.
A GameObjectFactory for regression tests.
Archetype< TestGameObject, TestMapArchObject, TestArchetype > getArchetype(@NotNull final String archetypeName)
Returns an Archetype by name.
FaceObjects is a container for FaceObjects.
void addArchetype(@NotNull R archetype)
Adds an Archetype to this Set.
Exception thrown if an Archetype does not exist.
An ArchetypeFactory implementation for testing purposes.
final FaceObjectProviders faceObjectProviders
The FaceObjectProviders instance.
Provider for faces of GameObjects and Archetypes.
The face is the appearance of an object.
final ErrorViewCollector errorViewCollector
The ErrorViewCollector instance.
Parser for artifacts definitions.
Creates ImageIcon instances from resources.
An Archetype implementation for testing purposes.
A GameObject implementation for testing purposes.
Interface that captures similarities between different ArchetypeSet implementations.
Abstract base implementation of ArchetypeParser.
Parser for artifact definitions.
An ErrorView suitable for unit tests.
final ArtifactParser< TestGameObject, TestMapArchObject, TestArchetype > artifactParser
The ArtifactParser instance.
An AbstractArchetypeBuilder for regression tests.