public class IORelationAdapter extends AbstractIOResourceAdapter
properties| Constructor and Description |
|---|
IORelationAdapter() |
| Modifier and Type | Method and Description |
|---|---|
IOResources |
extractResources(String repo,
Collection<DocumentRef> sources)
Extract relations involving given documents.
|
protected List<Statement> |
filterMatchingStatements(List<Statement> statements) |
protected DocumentRef |
getDocumentRef(RelationManager relManager,
QNameResource resource) |
protected Statement |
getFilteredStatement(Statement statement) |
protected List<Statement> |
getMatchingStatements(Graph graph,
Resource resource) |
protected RelationManager |
getRelationManager() |
void |
getResourcesAsXML(OutputStream out,
IOResources resources)
Export resources as XML.
|
IOResources |
loadResourcesFromXML(InputStream in)
Returns resources built from given stream.
|
void |
setProperties(Map<String,Serializable> properties)
Set properties.
|
void |
storeResources(IOResources resources)
Persists resources.
|
IOResources |
translateResources(String repo,
IOResources resources,
DocumentTranslationMap map)
Returns translated resources once copy has been done, passing a correspondence map.
|
protected static Statement |
updateDate(Statement statement,
Literal newDate,
List<Resource> properties) |
getBooleanProperty, getProperties, getStringArrayProperty, getStringProperty, setBooleanProperty, setStringArrayProperty, setStringPropertypublic IORelationAdapter()
public void setProperties(Map<String,Serializable> properties)
IOResourceAdaptersetProperties in interface IOResourceAdaptersetProperties in class AbstractIOResourceAdapterprotected RelationManager getRelationManager()
protected List<Statement> getMatchingStatements(Graph graph, Resource resource)
protected Statement getFilteredStatement(Statement statement)
protected List<Statement> filterMatchingStatements(List<Statement> statements)
protected DocumentRef getDocumentRef(RelationManager relManager, QNameResource resource)
public IOResources extractResources(String repo, Collection<DocumentRef> sources)
The adapter properties will filter which relations must be taken into account.
extractResources in interface IOResourceAdapterextractResources in class AbstractIOResourceAdapterrepo - TODOsources - locations of documents to consider. Has to include documents children if needed.public void getResourcesAsXML(OutputStream out, IOResources resources)
IOResourceAdaptergetResourcesAsXML in interface IOResourceAdaptergetResourcesAsXML in class AbstractIOResourceAdapterout - stream where export will be written.resources - resources previously extracted thanks to
IOResourceAdapter.extractResources(String, Collection) or
IOResourceAdapter.translateResources(String, IOResources, DocumentTranslationMap)public IOResources loadResourcesFromXML(InputStream in)
IOResourceAdapterloadResourcesFromXML in interface IOResourceAdapterloadResourcesFromXML in class AbstractIOResourceAdapterpublic void storeResources(IOResources resources)
IOResourceAdapterstoreResources in interface IOResourceAdapterstoreResources in class AbstractIOResourceAdapterresources - resources previously extracted thanks to
IOResourceAdapter.extractResources(String, Collection) or
IOResourceAdapter.translateResources(String, IOResources, DocumentTranslationMap)protected static Statement updateDate(Statement statement, Literal newDate, List<Resource> properties)
public IOResources translateResources(String repo, IOResources resources, DocumentTranslationMap map)
IOResourceAdaptertranslateResources in interface IOResourceAdaptertranslateResources in class AbstractIOResourceAdapterrepo - target repository for resources.resources - resources previously extracted thanks to
IOResourceAdapter.extractResources(String, Collection)map - correspondence map between old locations and new ones.Copyright © 2016 Nuxeo SA. All rights reserved.