|
Nuxeo Enterprise Platform 5.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.nuxeo.ecm.platform.io.api.AbstractIOResourceAdapter
org.nuxeo.ecm.platform.relations.io.IORelationAdapter
public class IORelationAdapter
Adapter for import/export of relations
Field Summary |
---|
Fields inherited from class org.nuxeo.ecm.platform.io.api.AbstractIOResourceAdapter |
---|
properties |
Constructor Summary | |
---|---|
IORelationAdapter()
|
Method Summary | |
---|---|
IOResources |
extractResources(String repo,
Collection<DocumentRef> sources)
Extract relations involving given documents. |
protected List<Statement> |
filterMatchingStatements(List<Statement> statements)
|
protected CoreSession |
getCoreSession(String repo)
Opens a system session |
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)
|
Methods inherited from class org.nuxeo.ecm.platform.io.api.AbstractIOResourceAdapter |
---|
getBooleanProperty, getProperties, getStringArrayProperty, getStringProperty, setBooleanProperty, setStringArrayProperty, setStringProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IORelationAdapter()
Method Detail |
---|
public void setProperties(Map<String,Serializable> properties)
IOResourceAdapter
setProperties
in interface IOResourceAdapter
setProperties
in class AbstractIOResourceAdapter
protected CoreSession getCoreSession(String repo) throws Exception
Exception
protected RelationManager getRelationManager() throws Exception
Exception
protected List<Statement> getMatchingStatements(Graph graph, Resource resource) throws CloneNotSupportedException
CloneNotSupportedException
protected Statement getFilteredStatement(Statement statement) throws CloneNotSupportedException
CloneNotSupportedException
protected List<Statement> filterMatchingStatements(List<Statement> statements) throws CloneNotSupportedException
CloneNotSupportedException
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 IOResourceAdapter
extractResources
in class AbstractIOResourceAdapter
repo
- TODOsources
- locations of documents to consider. Has to include
documents children if needed.
public void getResourcesAsXML(OutputStream out, IOResources resources)
IOResourceAdapter
getResourcesAsXML
in interface IOResourceAdapter
getResourcesAsXML
in class AbstractIOResourceAdapter
resources
- resources previously extracted thanks to
IOResourceAdapter.extractResources(String, Collection)
or
IOResourceAdapter.translateResources(String, IOResources, DocumentTranslationMap)
public IOResources loadResourcesFromXML(InputStream in)
IOResourceAdapter
loadResourcesFromXML
in interface IOResourceAdapter
loadResourcesFromXML
in class AbstractIOResourceAdapter
public void storeResources(IOResources resources)
IOResourceAdapter
storeResources
in interface IOResourceAdapter
storeResources
in class AbstractIOResourceAdapter
resources
- 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)
IOResourceAdapter
translateResources
in interface IOResourceAdapter
translateResources
in class AbstractIOResourceAdapter
repo
- target repository for resources.resources
- resources previously extracted thanks to
IOResourceAdapter.extractResources(String, Collection)
map
- correspondence map between old locations and new ones.
|
Nuxeo Enterprise Platform 5.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |