public class OGraphMLReader extends Object
Constructor and Description |
---|
OGraphMLReader(OrientBaseGraph graph) |
Modifier and Type | Method and Description |
---|---|
OGraphMLReader |
defineEdgeAttributeStrategy(String iAttributeName,
OGraphMLImportStrategy iStrategy)
Define custom strategy to use for edge attribute.
|
OGraphMLReader |
defineVertexAttributeStrategy(String iAttributeName,
OGraphMLImportStrategy iStrategy)
Define custom strategy to use for vertex attribute.
|
int |
getBatchSize() |
OCommandOutputListener |
getOutput() |
int |
getVertexLabelIndex() |
void |
inputGraph(com.tinkerpop.blueprints.Graph inputGraph,
InputStream graphMLInputStream)
Input the GraphML stream data into the graph.
|
OGraphMLReader |
inputGraph(com.tinkerpop.blueprints.Graph inputGraph,
InputStream graphMLInputStream,
int bufferSize,
String vertexIdKey,
String edgeIdKey,
String edgeLabelKey)
Input the GraphML stream data into the graph.
|
void |
inputGraph(com.tinkerpop.blueprints.Graph inputGraph,
String filename)
Input the GraphML stream data into the graph.
|
OGraphMLReader |
inputGraph(com.tinkerpop.blueprints.Graph inputGraph,
String filename,
int bufferSize,
String vertexIdKey,
String edgeIdKey,
String edgeLabelKey)
Input the GraphML stream data into the graph.
|
OGraphMLReader |
inputGraph(InputStream graphMLInputStream)
Input the GraphML stream data into the graph.
|
OGraphMLReader |
inputGraph(InputStream graphMLInputStream,
int bufferSize)
Input the GraphML stream data into the graph.
|
OGraphMLReader |
inputGraph(String filename)
Input the GraphML stream data into the graph.
|
OGraphMLReader |
inputGraph(String filename,
int bufferSize)
Input the GraphML stream data into the graph.
|
boolean |
isStoreVertexIds() |
protected void |
mapId(Map<String,ORID> vertexMappedIdMap,
String vertexId,
ORID rid) |
protected void |
printStatus(XMLStreamReader input,
long importedVertices,
long importedEdges) |
void |
setBatchSize(int batchSize) |
void |
setEdgeIdKey(String edgeIdKey) |
void |
setEdgeLabelKey(String edgeLabelKey) |
OGraphMLReader |
setOptions(Map<String,List<String>> opts) |
OGraphMLReader |
setOutput(OCommandOutputListener output) |
void |
setStoreVertexIds(boolean storeVertexIds) |
void |
setVertexIdKey(String vertexIdKey) |
void |
setVertexLabelIndex(int vertexLabelIndex) |
public OGraphMLReader(OrientBaseGraph graph)
graph
- the graph to populate with the GraphML datapublic OGraphMLReader defineVertexAttributeStrategy(String iAttributeName, OGraphMLImportStrategy iStrategy)
iAttributeName
- attribute nameiStrategy
- strategy implementationpublic OGraphMLReader defineEdgeAttributeStrategy(String iAttributeName, OGraphMLImportStrategy iStrategy)
iAttributeName
- attribute nameiStrategy
- strategy implementationpublic void inputGraph(com.tinkerpop.blueprints.Graph inputGraph, InputStream graphMLInputStream) throws IOException
inputGraph
- the graph to populate with the GraphML datagraphMLInputStream
- an InputStream of GraphML dataIOException
- thrown when the GraphML data is not correctly formattedpublic void inputGraph(com.tinkerpop.blueprints.Graph inputGraph, String filename) throws IOException
inputGraph
- the graph to populate with the GraphML datafilename
- name of a file containing GraphML dataIOException
- thrown when the GraphML data is not correctly formattedpublic OGraphMLReader inputGraph(com.tinkerpop.blueprints.Graph inputGraph, String filename, int bufferSize, String vertexIdKey, String edgeIdKey, String edgeLabelKey) throws IOException
inputGraph
- the graph to populate with the GraphML datafilename
- name of a file containing GraphML databufferSize
- the amount of elements to hold in memory before committing a transactions
(only valid for TransactionalGraphs)vertexIdKey
- if the id of a vertex is a <data/> property, fetch it from the data
property.edgeIdKey
- if the id of an edge is a <data/> property, fetch it from the data
property.edgeLabelKey
- if the label of an edge is a <data/> property, fetch it from the data
property.IOException
- thrown when the GraphML data is not correctly formattedpublic OGraphMLReader inputGraph(com.tinkerpop.blueprints.Graph inputGraph, InputStream graphMLInputStream, int bufferSize, String vertexIdKey, String edgeIdKey, String edgeLabelKey) throws IOException
inputGraph
- the graph to populate with the GraphML datagraphMLInputStream
- an InputStream of GraphML databufferSize
- the amount of elements to hold in memory before committing a transactions
(only valid for TransactionalGraphs)vertexIdKey
- if the id of a vertex is a <data/> property, fetch it from the data
property.edgeIdKey
- if the id of an edge is a <data/> property, fetch it from the data
property.edgeLabelKey
- if the label of an edge is a <data/> property, fetch it from the data
property.IOException
- thrown when the GraphML data is not correctly formattedpublic int getVertexLabelIndex()
public void setVertexLabelIndex(int vertexLabelIndex)
public void setVertexIdKey(String vertexIdKey)
vertexIdKey
- if the id of a vertex is a <data/> property, fetch it from the data
property.public void setEdgeIdKey(String edgeIdKey)
edgeIdKey
- if the id of an edge is a <data/> property, fetch it from the data
property.public void setEdgeLabelKey(String edgeLabelKey)
edgeLabelKey
- if the label of an edge is a <data/> property, fetch it from the data
property.public OGraphMLReader inputGraph(InputStream graphMLInputStream) throws IOException
graphMLInputStream
- an InputStream of GraphML dataIOException
- thrown when the GraphML data is not correctly formattedpublic OGraphMLReader inputGraph(String filename) throws IOException
filename
- name of a file containing GraphML dataIOException
- thrown when the GraphML data is not correctly formattedpublic OGraphMLReader inputGraph(InputStream graphMLInputStream, int bufferSize) throws IOException
graphMLInputStream
- an InputStream of GraphML databufferSize
- the amount of elements to hold in memory before committing a transactions
(only valid for TransactionalGraphs)IOException
- thrown when the GraphML data is not correctly formattedpublic OGraphMLReader inputGraph(String filename, int bufferSize) throws IOException
filename
- name of a file containing GraphML databufferSize
- the amount of elements to hold in memory before committing a transactions
(only valid for TransactionalGraphs)IOException
- thrown when the GraphML data is not correctly formattedpublic boolean isStoreVertexIds()
public void setStoreVertexIds(boolean storeVertexIds)
public OGraphMLReader setOptions(Map<String,List<String>> opts)
public int getBatchSize()
public void setBatchSize(int batchSize)
public OCommandOutputListener getOutput()
public OGraphMLReader setOutput(OCommandOutputListener output)
protected void printStatus(XMLStreamReader input, long importedVertices, long importedEdges)
Copyright © 2009–2020 OrientDB. All rights reserved.