Package org.openprovenance.prov.dot
Class ProvToDot
- java.lang.Object
-
- org.openprovenance.prov.dot.ProvToDot
-
- All Implemented Interfaces:
DotProperties,ProvShorthandNames,RecommendedProvVisualProperties
public class ProvToDot extends Object implements DotProperties, RecommendedProvVisualProperties, ProvShorthandNames
Serialisation of Prov representation to DOT format.
-
-
Field Summary
Fields Modifier and Type Field Description intMAX_TOOLTIP_LENGTH-
Fields inherited from interface org.openprovenance.prov.dot.DotProperties
DOT_ARROWHEAD, DOT_ARROWSHAPE_ODIAMOND, DOT_ARROWSHAPE_OINV, DOT_ARROWTAIL, DOT_COLOUR, DOT_DIR, DOT_DIRECTED_EDGE, DOT_FILLCOLOUR, DOT_FONTCOLOUR, DOT_FONTSIZE, DOT_LABEL, DOT_LABELANGLE, DOT_LABELDISTANCE, DOT_LABELFONTSIZE, DOT_PENWIDTH, DOT_ROTATION, DOT_SHAPE, DOT_SIDES, DOT_STYLE, DOT_TAILLABEL, DOT_TOOLTIP, DOT_UNDIRECTED_EDGE, DOT_URL, DOT_WIDTH
-
Fields inherited from interface org.openprovenance.prov.dot.ProvShorthandNames
PROV_SHORTHAND_ALTERNATE, PROV_SHORTHAND_ASSOCIATION, PROV_SHORTHAND_ATTRIBUTION, PROV_SHORTHAND_COMMUNICATION, PROV_SHORTHAND_DELEGATION, PROV_SHORTHAND_DERIVATION, PROV_SHORTHAND_END, PROV_SHORTHAND_GENERATION, PROV_SHORTHAND_INFLUENCE, PROV_SHORTHAND_INVALIDATION, PROV_SHORTHAND_MEMBERSHIP, PROV_SHORTHAND_MENTION, PROV_SHORTHAND_SPECIALIZATION, PROV_SHORTHAND_START, PROV_SHORTHAND_USAGE
-
Fields inherited from interface org.openprovenance.prov.dot.RecommendedProvVisualProperties
ACTIVITY_COLOUR, ACTIVITY_FILL_COLOUR, ACTIVITY_SHAPE, ACTIVITY_SIDES, ACTIVITY_STYLE, AGENT_FILLCOLOUR, AGENT_SHAPE, AGENT_STYLE, ANNOTATION_SHAPE, ENTITY_COLOUR, ENTITY_FILLCOLOUR, ENTITY_STYLE
-
-
Constructor Summary
Constructors Constructor Description ProvToDot(ProvFactory pf)
-
Method Summary
-
-
-
Constructor Detail
-
ProvToDot
public ProvToDot(ProvFactory pf)
-
-
Method Detail
-
qualifiedNameToString
public String qualifiedNameToString(QualifiedName qName)
-
localnameToString
public String localnameToString(QualifiedName qName)
-
setMaxStringLength
public void setMaxStringLength(Integer maxStringLength)
-
convert
public void convert(Document graph, String dotFile, String pdfFile, String title) throws IOException
- Throws:
IOException
-
convert
public void convert(Document graph, String dotFile, OutputStream pdfStream, String title) throws IOException
- Throws:
IOException
-
convert
public void convert(Document graph, String dotFile, String title) throws IOException
- Throws:
IOException
-
convert
public void convert(Document graph, String dotFile, String aFile, String type, String title) throws IOException
- Throws:
IOException
-
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 IOException
- Throws:
IOException
-
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)
-
emitActivity
public void emitActivity(Activity p, PrintStream out)
-
emitEntity
public void emitEntity(Entity e, 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 ignoredId, String node)
-
addAnnotationLinkProperties
public Map<String,String> addAnnotationLinkProperties(HasOther ignoredAnn, Map<String,String> properties)
-
addActivityShape
public Map<String,String> addActivityShape(Activity ignoredActivity, Map<String,String> properties)
-
addActivityLabel
public Map<String,String> addActivityLabel(Activity p, Map<String,String> properties)
-
addActivityColor
public Map<String,String> addActivityColor(Activity p, Map<String,String> properties)
-
addAgentShape
public Map<String,String> addAgentShape(Agent ignoredAgent, Map<String,String> properties)
-
addAgentLabel
public Map<String,String> addAgentLabel(Agent agent, Map<String,String> properties)
-
addAgentColor
public Map<String,String> addAgentColor(Agent agent, Map<String,String> properties)
-
addAnnotationShape
public Map<String,String> addAnnotationShape(HasOther ignoredAnn, Map<String,String> properties)
-
addAnnotationLabel
public Map<String,String> addAnnotationLabel(HasOther ann, Map<String,String> properties)
-
countOthers
public int countOthers(HasOther ann)
-
nonEmptyLocalName
public String nonEmptyLocalName(QualifiedName name)
-
addAnnotationColor
public Map<String,String> addAnnotationColor(HasOther ann, Map<String,String> properties)
-
emitDependency
public void emitDependency(Relation e, PrintStream out)
-
emitElement
public void emitElement(QualifiedName name, StatementOrBundle.Kind kind, Map<String,String> properties, PrintStream out)
-
emitBlankNode
public void emitBlankNode(String bnid, Map<String,String> properties, PrintStream out)
-
emitRelation
public void emitRelation(StatementOrBundle.Kind kind, String src, String dest, Map<String,String> properties, PrintStream out, boolean directional)
-
emitProperties
public void emitProperties(StringBuffer sb, Map<String,String> properties)
-
setLayout
public void setLayout(String layout)
-
-