|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.dna.graph.util.GraphImporter
public class GraphImporter
| Nested Class Summary | |
|---|---|
protected class |
GraphImporter.ImportedContentUsingSequencer
|
protected class |
GraphImporter.ImporterCommands
|
protected class |
GraphImporter.ImporterContext
|
static interface |
GraphImporter.ImportSpecification
|
protected class |
GraphImporter.SingleRepositorySourceConnectionFactory
|
protected class |
GraphImporter.UriImportedContent
|
| Constructor Summary | |
|---|---|
GraphImporter(RepositoryConnectionFactory sources,
ExecutionContext context)
|
|
| Method Summary | |
|---|---|
protected Path |
extractInputPathFrom(URI contentUri)
|
ExecutionContext |
getContext()
Get the context in which the importer will be executed. |
protected void |
importWithSequencer(StreamSequencer sequencer,
URI contentUri,
String mimeType,
String sourceName,
Path destinationPathInSource,
NodeConflictBehavior conflictBehavior)
Use the supplied sequencer to read the content at the given URI (with the specified MIME type) and write that content to the repository source into the specified location. |
GraphImporter.ImportSpecification |
importXml(File file)
Import the content from the supplied XML file, specifying on the returned GraphImporter.ImportSpecification where the content is
to be imported. |
GraphImporter.ImportSpecification |
importXml(String pathToFile)
Import the content from the XML file at the supplied file location, specifying on the returned GraphImporter.ImportSpecification
where the content is to be imported. |
GraphImporter.ImportSpecification |
importXml(URI uri)
Import the content from the XML file at the supplied URI, specifying on the returned GraphImporter.ImportSpecification where the
content is to be imported. |
void |
importXml(URI uri,
String sourceName,
Path destinationPathInSource)
Read the content from the supplied URI and import into the repository at the supplied location. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GraphImporter(RepositoryConnectionFactory sources,
ExecutionContext context)
| Method Detail |
|---|
public ExecutionContext getContext()
public GraphImporter.ImportSpecification importXml(URI uri)
GraphImporter.ImportSpecification where the
content is to be imported.
uri - the URI where the importer can read the content that is to be imported
IllegalArgumentException - if the uri or destination path are nullpublic GraphImporter.ImportSpecification importXml(String pathToFile)
GraphImporter.ImportSpecification
where the content is to be imported.
pathToFile - the path to the XML file that should be imported.
IllegalArgumentException - if the uri or destination path are nullpublic GraphImporter.ImportSpecification importXml(File file)
GraphImporter.ImportSpecification where the content is
to be imported.
file - the XML file that should be imported.
IllegalArgumentException - if the uri or destination path are null
public void importXml(URI uri,
String sourceName,
Path destinationPathInSource)
throws IOException,
RepositorySourceException
uri - the URI where the importer can read the content that is to be importedsourceName - the name of the source into which the content is to be importeddestinationPathInSource - the path in the repository source where the content is to be
written; may not be null
IllegalArgumentException - if the uri or destination path are null
IOException - if there is a problem reading the content
RepositorySourceException - if there is a problem while writing the content to the repository
source
protected void importWithSequencer(StreamSequencer sequencer,
URI contentUri,
String mimeType,
String sourceName,
Path destinationPathInSource,
NodeConflictBehavior conflictBehavior)
throws IOException,
RepositorySourceException
repository source into the specified location.
sequencer - the sequencer that should be used; may not be nullcontentUri - the URI where the content can be found; may not be nullmimeType - the MIME type for the content; may not be nullsourceName - the name of the source into which the content is to be importeddestinationPathInSource - the path in the repository source where the content is to be
written; may not be nullconflictBehavior - the behavior when a node is to be created when an existing node already exists; defaults to
NodeConflictBehavior.UPDATE if null
IOException - if there is a problem reading the content
RepositorySourceException - if there is a problem while writing the content to the repository
sourceprotected Path extractInputPathFrom(URI contentUri)
contentUri -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||