org.jboss.dna.graph
Class GraphImporter
java.lang.Object
org.jboss.dna.graph.GraphImporter
public class GraphImporter
- extends Object
- Author:
- Randall Hauch, John Verhaeg
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GraphImporter
public GraphImporter(Graph graph)
getContext
public ExecutionContext getContext()
- Get the context in which the importer will be executed.
- Returns:
- the execution context; never null
getGraph
public Graph getGraph()
- The graph that this importer uses.
- Returns:
- the graph; never null
importXml
public Graph.Batch importXml(URI uri,
Location location)
throws IOException,
SAXException,
RepositorySourceException
- Read the content from the supplied URI and import into the repository at the supplied location.
- Parameters:
uri - the URI where the importer can read the content that is to be importedlocation - the location in the repository source where the content is to be written; may not
be null
- Returns:
- the batch of requests for creating the graph content that represents the imported content
- Throws:
IllegalArgumentException - if the uri or destination path are null
IOException - if there is a problem reading the content
SAXException - if there is a problem with the SAX Parser
RepositorySourceException - if there is a problem while writing the content to the repository
source
importXml
public Graph.Batch importXml(URI uri,
Location location,
boolean skip)
throws IOException,
SAXException,
RepositorySourceException
- Read the content from the supplied URI and import into the repository at the supplied location.
- Parameters:
uri - the URI where the importer can read the content that is to be importedlocation - the location in the repository source where the content is to be written; may not
be nullskip - true if the root element should be skipped, or false if a node should be created for the root XML element
- Returns:
- the batch of requests for creating the graph content that represents the imported content
- Throws:
IllegalArgumentException - if the uri or destination path are null
IOException - if there is a problem reading the content
SAXException - if there is a problem with the SAX Parser
RepositorySourceException - if there is a problem while writing the content to the repository
source
Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.