|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.ucm.fdi.hysteria.game.parser.TextParser
public class TextParser
Field Summary | |
---|---|
protected java.lang.String |
_actualId
|
protected java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.String,java.lang.String>> |
_allExits
|
protected java.util.Hashtable<java.lang.String,Item> |
_allItems
|
protected java.util.Hashtable<java.lang.String,Location> |
_allLocs
|
protected java.util.Hashtable<java.lang.String,Obstacle> |
_allObstacles
|
protected java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.String,java.lang.String>> |
_allReactions
|
protected java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.String,java.lang.String>> |
_allReactionsFlags
|
protected java.util.Hashtable<java.lang.String,Scene> |
_allScenes
|
protected java.util.Hashtable<java.lang.String,Topic> |
_allTopics
|
protected boolean |
_atLeastOne
|
protected java.lang.String |
_author
|
protected Location |
_currentLocation
|
protected Topic |
_currentTopic
|
protected java.lang.String |
_desc
|
protected java.lang.String |
_gamePath
|
protected java.io.InputStream |
_in
|
protected java.lang.String |
_initialId
|
protected ItemRepository |
_initialInventory
|
protected Location |
_initialLocation
|
protected java.lang.String |
_name
|
protected java.util.Hashtable<java.lang.String,java.util.LinkedHashSet<java.lang.String>> |
_obstacleItemRel
|
protected java.util.Hashtable<java.lang.String,java.util.LinkedHashSet<java.lang.String>> |
_obstacleRel
|
protected boolean |
_parsed
|
protected java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.String,java.util.LinkedHashSet<java.lang.String>>> |
_reactionDisableRel
|
protected java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.String,java.util.LinkedHashSet<java.lang.String>>> |
_reactionEnableRel
|
protected java.util.Hashtable<java.lang.String,java.util.LinkedHashSet<java.lang.String>> |
_sceneDisableRel
|
protected java.util.Hashtable<java.lang.String,java.util.LinkedHashSet<java.lang.String>> |
_sceneEnableRel
|
protected java.util.Hashtable<java.lang.String,java.util.LinkedHashSet<java.lang.String>> |
_topicDisableRel
|
protected java.util.Hashtable<java.lang.String,java.util.LinkedHashSet<java.lang.String>> |
_topicEnableRel
|
protected boolean |
_unassignedInitialLocation
|
protected java.io.StreamTokenizer |
st
|
Constructor Summary | |
---|---|
TextParser(java.lang.String path)
|
Method Summary | |
---|---|
java.lang.String |
getAuthor()
It gets the game author, if the game was parsed |
java.lang.String |
getDesc()
It gets the game description, if the game was parsed |
ItemRepository |
getInitialInventory()
It gets the game initial inventory, if the game was parsed |
Location |
getInitialLocation()
It gets the initial location, if the game was parsed |
java.lang.String |
getTitle()
It gets the game title, if the game was parsed |
int |
getTotalLocations()
|
void |
parse(java.io.InputStream gameDefinition)
It tries to parse the game denoted by the Input Stream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.InputStream _in
protected boolean _parsed
protected boolean _unassignedInitialLocation
protected boolean _atLeastOne
protected Location _initialLocation
protected Location _currentLocation
protected java.lang.String _actualId
protected java.lang.String _name
protected java.lang.String _author
protected java.lang.String _desc
protected java.lang.String _initialId
protected ItemRepository _initialInventory
protected Topic _currentTopic
protected java.util.Hashtable<java.lang.String,Location> _allLocs
protected java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.String,java.lang.String>> _allExits
protected java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.String,java.lang.String>> _allReactions
protected java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.String,java.lang.String>> _allReactionsFlags
protected java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.String,java.util.LinkedHashSet<java.lang.String>>> _reactionEnableRel
protected java.util.Hashtable<java.lang.String,java.util.Hashtable<java.lang.String,java.util.LinkedHashSet<java.lang.String>>> _reactionDisableRel
protected java.util.Hashtable<java.lang.String,Obstacle> _allObstacles
protected java.util.Hashtable<java.lang.String,Item> _allItems
protected java.util.Hashtable<java.lang.String,java.util.LinkedHashSet<java.lang.String>> _obstacleRel
protected java.util.Hashtable<java.lang.String,java.util.LinkedHashSet<java.lang.String>> _obstacleItemRel
protected java.util.Hashtable<java.lang.String,java.util.LinkedHashSet<java.lang.String>> _sceneEnableRel
protected java.util.Hashtable<java.lang.String,java.util.LinkedHashSet<java.lang.String>> _topicEnableRel
protected java.util.Hashtable<java.lang.String,java.util.LinkedHashSet<java.lang.String>> _sceneDisableRel
protected java.util.Hashtable<java.lang.String,java.util.LinkedHashSet<java.lang.String>> _topicDisableRel
protected java.io.StreamTokenizer st
protected java.util.Hashtable<java.lang.String,Scene> _allScenes
protected java.util.Hashtable<java.lang.String,Topic> _allTopics
protected java.lang.String _gamePath
Constructor Detail |
---|
public TextParser(java.lang.String path)
Method Detail |
---|
public Location getInitialLocation() throws UnparsedGameDefinitionException, InvalidGameDefinitionException
UnparsedGameDefinitionException
InvalidGameDefinitionException
public java.lang.String getTitle() throws UnparsedGameDefinitionException, InvalidGameDefinitionException
UnparsedGameDefinitionException
InvalidGameDefinitionException
public java.lang.String getAuthor() throws UnparsedGameDefinitionException, InvalidGameDefinitionException
UnparsedGameDefinitionException
InvalidGameDefinitionException
public java.lang.String getDesc() throws UnparsedGameDefinitionException, InvalidGameDefinitionException
UnparsedGameDefinitionException
InvalidGameDefinitionException
public int getTotalLocations() throws UnparsedGameDefinitionException
UnparsedGameDefinitionException
public ItemRepository getInitialInventory() throws UnparsedGameDefinitionException, InvalidGameDefinitionException
UnparsedGameDefinitionException
InvalidGameDefinitionException
public void parse(java.io.InputStream gameDefinition) throws java.lang.IllegalArgumentException, InvalidGameDefinitionException
gameDefinition
- The input stream to the game
java.lang.IllegalArgumentException
InvalidGameDefinitionException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |