Class BaSyxPersistenceRecipe
- java.lang.Object
-
- de.iip_ecosphere.platform.support.aas.basyx.BaSyxPersistenceRecipe
-
- All Implemented Interfaces:
de.iip_ecosphere.platform.support.aas.PersistenceRecipe
class BaSyxPersistenceRecipe extends java.lang.Object implements de.iip_ecosphere.platform.support.aas.PersistenceRecipeA persistence recipe for BaSyx AAS. This implementation is internally based on short ids. Limitations:- This class does not consider concept descriptions or assets when reading directly from XML.
- Might be this is not enough for reading models uniquely back directly from XML.
- Reading of AASX supports only 1 AAS per AASX (BaSyx). Therefore, two classes from BaSyx taken over into IIP-Ecosphere code as they are not sufficiently usable/extensible.
- Translating AAS shortIds to file names is limited to whitespace replacement, i.e., no Umlauts etc. for now.
- Written management XML elements in AAS may contain empty xmlns attributes.
- Author:
- Holger Eichelberger, SSE
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<de.iip_ecosphere.platform.support.FileFormat,de.iip_ecosphere.platform.support.aas.PersistenceRecipe>RECIPES
-
Constructor Summary
Constructors Constructor Description BaSyxPersistenceRecipe()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private de.iip_ecosphere.platform.support.aas.PersistenceRecipefindMatching(java.io.File file)Finds a matchingPersistenceRecipeagainst the known recipes and their file formats.java.util.Collection<de.iip_ecosphere.platform.support.FileFormat>getSupportedFormats()java.util.List<de.iip_ecosphere.platform.support.aas.Aas>readFrom(java.io.File file)voidwriteTo(java.util.List<de.iip_ecosphere.platform.support.aas.Aas> aas, java.io.File file)
-
-
-
Method Detail
-
findMatching
private de.iip_ecosphere.platform.support.aas.PersistenceRecipe findMatching(java.io.File file)
Finds a matchingPersistenceRecipeagainst the known recipes and their file formats.- Parameters:
file- the file to look for- Returns:
- the persistence recipe
- Throws:
java.lang.IllegalArgumentException- if there is no matching file format/recipe
-
writeTo
public void writeTo(java.util.List<de.iip_ecosphere.platform.support.aas.Aas> aas, java.io.File file) throws java.io.IOException- Specified by:
writeToin interfacede.iip_ecosphere.platform.support.aas.PersistenceRecipe- Throws:
java.io.IOException
-
readFrom
public java.util.List<de.iip_ecosphere.platform.support.aas.Aas> readFrom(java.io.File file) throws java.io.IOException- Specified by:
readFromin interfacede.iip_ecosphere.platform.support.aas.PersistenceRecipe- Throws:
java.io.IOException
-
getSupportedFormats
public java.util.Collection<de.iip_ecosphere.platform.support.FileFormat> getSupportedFormats()
- Specified by:
getSupportedFormatsin interfacede.iip_ecosphere.platform.support.aas.PersistenceRecipe
-
-