mapss.dif.psdf
Class PSDFSpecificationToDIFWriter

java.lang.Object
  extended by mapss.dif.language.DIFWriter
      extended by mapss.dif.psdf.PSDFSpecificationToDIFWriter

public class PSDFSpecificationToDIFWriter
extends DIFWriter

DIF writer class for graphs of runtime type PSDF Specification.

Version:
$Id: PSDFSpecificationToDIFWriter.java 409 2007-05-13 19:47:16Z plishker $
Author:
Chai-Jui Hsu

Field Summary
 
Fields inherited from class mapss.dif.language.DIFWriter
_graph, _hierarchy
 
Constructor Summary
PSDFSpecificationToDIFWriter()
           
 
Method Summary
protected  DIFGraph _getEmptyGraph()
          Returns an empty graph with the runtime type of the graphs that are going to be written by this writer.
protected  java.lang.String _graphType()
          Returns a string containing the graph type keyword to be written into the dif file.
protected  boolean _isKeyWord(java.lang.String word)
          Checks if a string is a keyword in DIF.
protected  java.lang.String _writeActor()
          Generate the actor block.
protected  java.lang.String _writeBuiltinAttribute()
          Generate the built-in attribute block.
protected  java.lang.String _writeTopology()
          Generate the topology block.
protected  java.lang.String _writeUserDefAttribute()
          Generate the interface block.
 
Methods inherited from class mapss.dif.language.DIFWriter
_blank, _checkLabel, _getObjectName, _writeInterface, _writeParameter, _writeRefinement, compile, compile, getSupportedGraph, objectToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PSDFSpecificationToDIFWriter

public PSDFSpecificationToDIFWriter()
Method Detail

_isKeyWord

protected boolean _isKeyWord(java.lang.String word)
Checks if a string is a keyword in DIF. Keywords should not be used as labels in graphs.

Overrides:
_isKeyWord in class DIFWriter
Parameters:
word - A string to be checked.
Returns:
True if the string is a keyword in DIF.

_getEmptyGraph

protected DIFGraph _getEmptyGraph()
Returns an empty graph with the runtime type of the graphs that are going to be written by this writer.

Overrides:
_getEmptyGraph in class DIFWriter
Returns:
An empty PSDFGraph.

_graphType

protected java.lang.String _graphType()
Returns a string containing the graph type keyword to be written into the dif file.

Overrides:
_graphType in class DIFWriter
Returns:
A string.

_writeActor

protected java.lang.String _writeActor()
                                throws DIFLanguageException
Description copied from class: DIFWriter
Generate the actor block.

Overrides:
_writeActor in class DIFWriter
Returns:
The DIF specification of the actor block .
Throws:
DIFLanguageException

_writeBuiltinAttribute

protected java.lang.String _writeBuiltinAttribute()
                                           throws DIFLanguageException
Generate the built-in attribute block.

Overrides:
_writeBuiltinAttribute in class DIFWriter
Returns:
The DIF specification of the built-in attribute block.
Throws:
DIFLanguageException

_writeTopology

protected java.lang.String _writeTopology()
                                   throws DIFLanguageException
Generate the topology block.

Overrides:
_writeTopology in class DIFWriter
Returns:
The DIF specification of the topology block .
Throws:
DIFLanguageException

_writeUserDefAttribute

protected java.lang.String _writeUserDefAttribute()
                                           throws DIFLanguageException
Description copied from class: DIFWriter
Generate the interface block. All user defined arrtibutes regarding to nodes are writen in the actor block. At this time, user-defined attributes for graph and edges are allowed to be value only.

Overrides:
_writeUserDefAttribute in class DIFWriter
Returns:
The DIF specification of the interface block .
Throws:
DIFLanguageException