Package org.imixs.workflow.xml
Class XMLDataCollectionAdapter
- java.lang.Object
-
- org.imixs.workflow.xml.XMLDataCollectionAdapter
-
public class XMLDataCollectionAdapter extends Object
An XMLItemCollectionAdapter converts aorg.imixs.workflow.xml.XMLItemCollection
into aorg.imixs.workflow.ItemCollection
and reverse- Version:
- 1.1
- Author:
- imixs.com - Ralph Soika
- See Also:
ItemCollection
-
-
Constructor Summary
Constructors Constructor Description XMLDataCollectionAdapter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
getBytesFromStream(InputStream is)
static XMLDataCollection
getDataCollection(Collection<ItemCollection> documents)
This method transforms a Collectioninto a DocumentCollection static XMLDataCollection
getDataCollection(Collection<ItemCollection> documents, List<String> itemNames)
This method transforms a Collectioninto a XMLDocumentCollection If the attribute List is provided only the corresponding properties will be returned. static XMLDataCollection
getDataCollection(ItemCollection document)
This method transforms a single ItemCollection into a XMLDocumentCollectionstatic XMLDataCollection
getDataCollection(ItemCollection document, List<String> itemNames)
This method transforms a single ItemCollection into a XMLDocumentCollectionstatic List<ItemCollection>
putDataCollection(XMLDataCollection xmlDocuments)
This Method converts aorg.imixs.workflow.xml.DocumentCollection
into a List oforg.imixs.workflow.ItemCollection
The method returns an empty list if the collection is empty or nullstatic List<ItemCollection>
readCollection(byte[] byteInput)
This method imports an xml entity data byte array and returns a List of ItemCollection objects.static List<ItemCollection>
readCollectionFromInputStream(InputStream inputStream)
This method imports an xml entity data stream and returns a List of ItemCollection objects.static byte[]
writeItemCollection(Collection<ItemCollection> documents)
This method writes a collection of ItemCollection into a Byte array representing a XMLDataCollectionstatic byte[]
writeItemCollection(ItemCollection document)
This method writes a ItemCollection into a Byte array representing a XMLDataCollection
-
-
-
Method Detail
-
putDataCollection
public static List<ItemCollection> putDataCollection(XMLDataCollection xmlDocuments)
This Method converts aorg.imixs.workflow.xml.DocumentCollection
into a List oforg.imixs.workflow.ItemCollection
The method returns an empty list if the collection is empty or null- Parameters:
entity
-- Returns:
- ItemCollection
-
getDataCollection
public static XMLDataCollection getDataCollection(Collection<ItemCollection> documents)
This method transforms a Collectioninto a DocumentCollection - Parameters:
documents
-- Returns:
-
getDataCollection
public static XMLDataCollection getDataCollection(Collection<ItemCollection> documents, List<String> itemNames)
This method transforms a Collectioninto a XMLDocumentCollection If the attribute List is provided only the corresponding properties will be returned. - Parameters:
documents
- - collection of ItemCollection objects to be converteditemNames
- - optional list of item names to be converted. If null all items will be converted- Returns:
-
getDataCollection
public static XMLDataCollection getDataCollection(ItemCollection document)
This method transforms a single ItemCollection into a XMLDocumentCollection
-
getDataCollection
public static XMLDataCollection getDataCollection(ItemCollection document, List<String> itemNames)
This method transforms a single ItemCollection into a XMLDocumentCollection
-
readCollectionFromInputStream
public static List<ItemCollection> readCollectionFromInputStream(InputStream inputStream) throws jakarta.xml.bind.JAXBException, IOException
This method imports an xml entity data stream and returns a List of ItemCollection objects. The method can import any kind of entity data like model or configuration data an xml export of workitems.- Parameters:
inputStream
- xml input stream- Returns:
- List of ItemCollection objects
- Throws:
jakarta.xml.bind.JAXBException
IOException
-
readCollection
public static List<ItemCollection> readCollection(byte[] byteInput) throws jakarta.xml.bind.JAXBException, IOException
This method imports an xml entity data byte array and returns a List of ItemCollection objects. The method can import any kind of entity data like model or configuration data an xml export of workitems.- Parameters:
inputStream
- xml input stream- Returns:
- List of ItemCollection objects
- Throws:
jakarta.xml.bind.JAXBException
IOException
-
writeItemCollection
public static byte[] writeItemCollection(Collection<ItemCollection> documents) throws jakarta.xml.bind.JAXBException, IOException
This method writes a collection of ItemCollection into a Byte array representing a XMLDataCollection- Parameters:
inputStream
- xml input stream- Returns:
- List of ItemCollection objects
- Throws:
jakarta.xml.bind.JAXBException
IOException
-
writeItemCollection
public static byte[] writeItemCollection(ItemCollection document) throws jakarta.xml.bind.JAXBException, IOException
This method writes a ItemCollection into a Byte array representing a XMLDataCollection- Parameters:
inputStream
- xml input stream- Returns:
- List of ItemCollection objects
- Throws:
jakarta.xml.bind.JAXBException
IOException
-
getBytesFromStream
public static byte[] getBytesFromStream(InputStream is) throws IOException
- Throws:
IOException
-
-