public class DataAccessImpl extends Object implements DataAccess
Constructor and Description |
---|
DataAccessImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
deleteUserData(String file,
String instance)
Deletes a User from the XML file.
|
void |
deleteUserDataInChe(String instance)
Deletes a given user from CHE
|
ArrayList<OntologyInstance> |
getEmptyCHEFormFields(String instance)
Gets empty ontology instances for creating a user interface
|
ArrayList<OntologyInstance> |
getEmptyProfile(String profile)
Gets an empty ontology profile to create a user interface
|
ArrayList<OntologyInstance> |
getFormFields(String file)
Gets the Datafields of a XML instance to generate a view for
userinterface
|
boolean |
saveUserData(String path,
OntologyInstance ontologyInstance)
Saves a new Userprofile
|
void |
saveUserDataInCHE(OntologyInstance ont)
Saves user in CHE.
|
void |
updateUserData(String id,
HashMap<String,ArrayList<Subprofile>> subprofiles)
Updates a given user in CHE
|
void |
updateUserData(String file,
String id,
HashMap<String,ArrayList<Subprofile>> subprofiles)
Updates User in XML representation
|
public ArrayList<OntologyInstance> getFormFields(String file)
DataAccess
getFormFields
in interface DataAccess
file
- xml file, which is unmarshalledpublic void updateUserData(String file, String id, HashMap<String,ArrayList<Subprofile>> subprofiles)
DataAccess
updateUserData
in interface DataAccess
file
- xml file to updateid
- ID of the usersubprofiles
- A list of updated Subprofilespublic boolean saveUserData(String path, OntologyInstance ontologyInstance)
DataAccess
saveUserData
in interface DataAccess
path
- xml file in which to saveontologyInstance
- the Userinstance for savingpublic boolean deleteUserData(String file, String instance)
DataAccess
deleteUserData
in interface DataAccess
file
- file where the user is persisted.instance
- the user as instancepublic ArrayList<OntologyInstance> getEmptyProfile(String profile)
DataAccess
getEmptyProfile
in interface DataAccess
profile
- the xml file with the ontology profilepublic void saveUserDataInCHE(OntologyInstance ont)
DataAccess
saveUserDataInCHE
in interface DataAccess
ont
- the user instancepublic ArrayList<OntologyInstance> getEmptyCHEFormFields(String instance)
DataAccess
getEmptyCHEFormFields
in interface DataAccess
instance
- the type (user/device) of ontology instancepublic void updateUserData(String id, HashMap<String,ArrayList<Subprofile>> subprofiles)
DataAccess
updateUserData
in interface DataAccess
id
- Id of the usersubprofiles
- the Subprofiles of the userpublic void deleteUserDataInChe(String instance)
DataAccess
deleteUserDataInChe
in interface DataAccess
instance
- the user, who will be deletedCopyright © 2018 universAAL Consortium. All rights reserved.