public class GraphMLFactory
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
GraphMLEdgeTemplate |
createGraphMLEdgeTemplate(java.lang.String id)
Create an edge template.
|
GraphMLGroupNodeTemplate |
createGraphMLGroupNodeTemplate(java.lang.String id)
Create a group node template.
|
GraphMLNodeTemplate |
createGraphMLNodeTemplate(java.lang.String id)
Create a node template.
|
GraphMLEdgeTemplate |
getGraphMLEdgeTemplate(java.lang.String id)
Return the edge template for a specified id.
|
GraphMLGroupNodeTemplate |
getGraphMLGroupNodeTemplate(java.lang.String id)
Return the group node template for a specified id.
|
GraphMLNodeTemplate |
getGraphMLNodeTemplate(java.lang.String id)
Return the node template for a specified id.
|
static GraphMLFactory |
getInstance()
Return the unique instance.
|
java.util.Map<java.lang.String,IGraphMLTemplate> |
getTemplates()
Return the templates
|
boolean |
hasEdgeTemplate(java.lang.String id)
Return true if there is a
GraphMLEdgeTemplate for a specified id. |
boolean |
hasGroupNodeTemplate(java.lang.String id)
Return true if there is a
GraphMLGroupNodeTemplate for a specified id. |
boolean |
hasNodeTemplate(java.lang.String id)
Return true if there is a
GraphMLNodeTemplate for a specified id. |
GraphMLDiagram |
newDiagram()
Creates a new diagram.
|
GraphMLDiagram |
newDiagram(DiagramDefaults defaults)
Creates a new diagram, with custom defaults.
|
GraphMLDiagram |
openDiagram(java.io.File file)
Open a graphml diagram.
|
GraphMLDiagram |
openDiagram(java.io.File file,
DiagramDefaults defaults)
Open a graphml diagram.
|
GraphMLDiagram |
openDiagram(java.net.URL url)
Open a graphml diagram.
|
GraphMLDiagram |
openDiagram(java.net.URL url,
DiagramDefaults defaults)
Open a graphml diagram.
|
void |
resetTemplates()
Reset the templates.
|
void |
saveDiagram(GraphMLDiagram diagram,
java.io.File file)
Save a diagram.
|
void |
saveDiagram(GraphMLDiagram diagram,
java.net.URL url)
Save a diagram.
|
public static GraphMLFactory getInstance()
public boolean hasNodeTemplate(java.lang.String id)
GraphMLNodeTemplate
for a specified id.id
- the idpublic boolean hasGroupNodeTemplate(java.lang.String id)
GraphMLGroupNodeTemplate
for a specified id.id
- the idpublic boolean hasEdgeTemplate(java.lang.String id)
GraphMLEdgeTemplate
for a specified id.id
- the idpublic GraphMLNodeTemplate createGraphMLNodeTemplate(java.lang.String id) throws TemplateAccessException
id
- the template idTemplateAccessException
public GraphMLNodeTemplate getGraphMLNodeTemplate(java.lang.String id) throws TemplateAccessException
id
- the template idTemplateAccessException
public GraphMLGroupNodeTemplate createGraphMLGroupNodeTemplate(java.lang.String id) throws TemplateAccessException
id
- the template idTemplateAccessException
public GraphMLGroupNodeTemplate getGraphMLGroupNodeTemplate(java.lang.String id) throws TemplateAccessException
id
- the template idTemplateAccessException
public GraphMLEdgeTemplate createGraphMLEdgeTemplate(java.lang.String id) throws TemplateAccessException
id
- the template idTemplateAccessException
public GraphMLEdgeTemplate getGraphMLEdgeTemplate(java.lang.String id) throws TemplateAccessException
id
- the template idTemplateAccessException
public void resetTemplates()
public java.util.Map<java.lang.String,IGraphMLTemplate> getTemplates()
public GraphMLDiagram newDiagram()
public GraphMLDiagram newDiagram(DiagramDefaults defaults)
defaults
- the diagram defaultspublic GraphMLDiagram openDiagram(java.net.URL url) throws java.io.IOException
url
- the diagram urljava.io.IOException
public GraphMLDiagram openDiagram(java.net.URL url, DiagramDefaults defaults) throws java.io.IOException
url
- the diagram urldefaults
- the DiagramDefaults to usejava.io.IOException
public GraphMLDiagram openDiagram(java.io.File file) throws java.io.IOException
file
- the diagram filejava.io.IOException
public GraphMLDiagram openDiagram(java.io.File file, DiagramDefaults defaults) throws java.io.IOException
file
- the diagram filedefaults
- the DiagramDefaults to usejava.io.IOException
public void saveDiagram(GraphMLDiagram diagram, java.net.URL url) throws java.io.IOException
diagram
- the diagramurl
- the URLjava.io.IOException
public void saveDiagram(GraphMLDiagram diagram, java.io.File file) throws java.io.IOException
diagram
- the diagramfile
- the filejava.io.IOException
Copyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence