Package org.openprovenance.prov.dot
Class ProvToDot
- java.lang.Object
-
- org.openprovenance.prov.dot.ProvToDot
-
public class ProvToDot extends Object
Serialisation of Prov representation to DOT format.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProvToDot.Config
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_CONFIGURATION_FILEstatic StringDEFAULT_CONFIGURATION_FILE_WITH_ROLEstatic StringDEFAULT_CONFIGURATION_FILE_WITH_ROLE_NO_LABELintMAX_TOOLTIP_LENGTHstatic StringUSAGE
-
Constructor Summary
Constructors Constructor Description ProvToDot(ProvFactory pf)ProvToDot(ProvFactory pf, boolean withRoleFlag)ProvToDot(ProvFactory pf, String configurationFile)ProvToDot(ProvFactory pf, String configurationFile, String other)ProvToDot(ProvFactory pf, ProvToDot.Config config)
-
Method Summary
-
-
-
Field Detail
-
DEFAULT_CONFIGURATION_FILE
public static final String DEFAULT_CONFIGURATION_FILE
- See Also:
- Constant Field Values
-
DEFAULT_CONFIGURATION_FILE_WITH_ROLE
public static final String DEFAULT_CONFIGURATION_FILE_WITH_ROLE
- See Also:
- Constant Field Values
-
DEFAULT_CONFIGURATION_FILE_WITH_ROLE_NO_LABEL
public static final String DEFAULT_CONFIGURATION_FILE_WITH_ROLE_NO_LABEL
- See Also:
- Constant Field Values
-
USAGE
public static final String USAGE
- See Also:
- Constant Field Values
-
MAX_TOOLTIP_LENGTH
public int MAX_TOOLTIP_LENGTH
-
-
Constructor Detail
-
ProvToDot
public ProvToDot(ProvFactory pf)
-
ProvToDot
public ProvToDot(ProvFactory pf, boolean withRoleFlag)
-
ProvToDot
public ProvToDot(ProvFactory pf, ProvToDot.Config config)
-
ProvToDot
public ProvToDot(ProvFactory pf, String configurationFile)
-
ProvToDot
public ProvToDot(ProvFactory pf, String configurationFile, String other)
-
-
Method Detail
-
qualifiedNameToString
public String qualifiedNameToString(QualifiedName qName)
-
localnameToString
public String localnameToString(QualifiedName qName)
-
getDeserialiser
public ProvPrinterConfigDeserialiser getDeserialiser()
-
init
public void init(String configurationFile)
-
init
public void init(InputStream is)
-
init
public void init(ProvPrinterConfiguration configuration)
-
convert
public void convert(Document graph, String dotFile, String pdfFile, String title) throws FileNotFoundException, IOException
- Throws:
FileNotFoundExceptionIOException
-
convert
public void convert(Document graph, String dotFile, OutputStream pdfStream, String title) throws FileNotFoundException, IOException
- Throws:
FileNotFoundExceptionIOException
-
convert
public void convert(Document graph, String dotFile, String title) throws FileNotFoundException, IOException
- Throws:
FileNotFoundExceptionIOException
-
convert
public void convert(Document graph, String dotFile, String aFile, String type, String title) throws FileNotFoundException, IOException
- Throws:
FileNotFoundExceptionIOException
-
convert
public void convert(Document graph, OutputStream os, String type, String title)
-
convert
public void convert(Document graph, String dotFile, OutputStream os, String type, String title) throws FileNotFoundException, IOException
- Throws:
FileNotFoundExceptionIOException
-
convert
public void convert(Document graph, File file, String title) throws FileNotFoundException
- Throws:
FileNotFoundException
-
convert
public void convert(Document graph, OutputStream os, String title)
-
convert
public void convert(Document doc, PrintStream out, String title)
-
convert
public void convert(Bundle bun, PrintStream out)
-
emitAnnotations
public void emitAnnotations(HasOther node, PrintStream out)
-
emitActivity
public void emitActivity(Activity p, PrintStream out)
-
emitEntity
public void emitEntity(Entity a, PrintStream out)
-
emitAgent
public void emitAgent(Agent ag, PrintStream out)
-
emitAnnotations
public void emitAnnotations(String id, HasOther statement, PrintStream out)
-
annotationId
public QualifiedName annotationId(QualifiedName id, String node)
-
addAnnotationLinkProperties
public HashMap<String,String> addAnnotationLinkProperties(HasOther ann, HashMap<String,String> properties)
-
addActivityShape
public HashMap<String,String> addActivityShape(Activity p, HashMap<String,String> properties)
-
addBlankNodeShape
public HashMap<String,String> addBlankNodeShape(HashMap<String,String> properties)
-
addActivityLabel
public HashMap<String,String> addActivityLabel(Activity p, HashMap<String,String> properties)
-
addActivityColor
public HashMap<String,String> addActivityColor(Activity p, HashMap<String,String> properties)
-
addColors
public HashMap<String,String> addColors(HasOther object, HashMap<String,String> properties)
-
addEntityShape
public HashMap<String,String> addEntityShape(Entity p, HashMap<String,String> properties)
-
addEntityColor
public HashMap<String,String> addEntityColor(Entity a, HashMap<String,String> properties)
-
addEntityLabel
public HashMap<String,String> addEntityLabel(Entity p, HashMap<String,String> properties)
-
addAgentShape
public HashMap<String,String> addAgentShape(Agent p, HashMap<String,String> properties)
-
addAgentLabel
public HashMap<String,String> addAgentLabel(Agent p, HashMap<String,String> properties)
-
addAgentColor
public HashMap<String,String> addAgentColor(Agent a, HashMap<String,String> properties)
-
addAnnotationShape
public HashMap<String,String> addAnnotationShape(HasOther ann, HashMap<String,String> properties)
-
addAnnotationLabel
public HashMap<String,String> addAnnotationLabel(HasOther ann, HashMap<String,String> properties)
-
countOthers
public int countOthers(HasOther ann)
-
nonEmptyLocalName
public String nonEmptyLocalName(QualifiedName name)
-
addAnnotationColor
public HashMap<String,String> addAnnotationColor(HasOther ann, HashMap<String,String> properties)
-
emitDependency
public void emitDependency(Relation e, PrintStream out)
-
addRelationAttributes
public HashMap<String,String> addRelationAttributes(String accountLabel, Relation e, HashMap<String,String> properties)
-
getRelationPrintRole
public boolean getRelationPrintRole(Relation edge)
-
emitElement
public void emitElement(QualifiedName name, HashMap<String,String> properties, PrintStream out)
-
emitBlankNode
public void emitBlankNode(String bnid, HashMap<String,String> properties, PrintStream out)
-
emitRelation
public void emitRelation(String src, String dest, HashMap<String,String> properties, PrintStream out, boolean directional)
-
emitProperties
public void emitProperties(StringBuffer sb, HashMap<String,String> properties)
-
setLayout
public void setLayout(String layout)
-
-