Class BaSyxPersistenceRecipe
java.lang.Object
de.iip_ecosphere.platform.support.aas.basyx2.BaSyxPersistenceRecipe
- All Implemented Interfaces:
de.iip_ecosphere.platform.support.aas.PersistenceRecipe
class BaSyxPersistenceRecipe
extends Object
implements de.iip_ecosphere.platform.support.aas.PersistenceRecipe
A 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
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.iip_ecosphere.platform.support.aas.PersistenceRecipe
de.iip_ecosphere.platform.support.aas.PersistenceRecipe.FileResource -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate de.iip_ecosphere.platform.support.aas.PersistenceRecipefindMatching(File file) Finds a matchingPersistenceRecipeagainst the known recipes and their file formats.Collection<de.iip_ecosphere.platform.support.FileFormat> List<de.iip_ecosphere.platform.support.aas.Aas> voidwriteTo(List<de.iip_ecosphere.platform.support.aas.Aas> aas, File thumbnail, List<de.iip_ecosphere.platform.support.aas.PersistenceRecipe.FileResource> resources, File file) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.iip_ecosphere.platform.support.aas.PersistenceRecipe
writeTo
-
Field Details
-
RECIPES
private static final Map<de.iip_ecosphere.platform.support.FileFormat,de.iip_ecosphere.platform.support.aas.PersistenceRecipe> RECIPES
-
-
Constructor Details
-
BaSyxPersistenceRecipe
BaSyxPersistenceRecipe()
-
-
Method Details
-
findMatching
Finds a matchingPersistenceRecipeagainst the known recipes and their file formats.- Parameters:
file- the file to look for- Returns:
- the persistence recipe
- Throws:
IllegalArgumentException- if there is no matching file format/recipe
-
writeTo
public void writeTo(List<de.iip_ecosphere.platform.support.aas.Aas> aas, File thumbnail, List<de.iip_ecosphere.platform.support.aas.PersistenceRecipe.FileResource> resources, File file) throws IOException - Specified by:
writeToin interfacede.iip_ecosphere.platform.support.aas.PersistenceRecipe- Throws:
IOException
-
readFrom
- Specified by:
readFromin interfacede.iip_ecosphere.platform.support.aas.PersistenceRecipe- Throws:
IOException
-
getSupportedFormats
- Specified by:
getSupportedFormatsin interfacede.iip_ecosphere.platform.support.aas.PersistenceRecipe
-