public class PlaymappingImporter extends Importer
accessibilityTypes, agecategoryTypes, assetTypeToLocationCategory, assHandler, assListHandler, equipmenttypePAtoPM, equipmenttypePMtoPA, equipmentTypes, facilityTypes, locationHandler, locationTypes, parkingTypes, postfix| Constructor and Description |
|---|
PlaymappingImporter(String project) |
| Modifier and Type | Method and Description |
|---|---|
protected Integer |
getLocationId(String pmguid) |
Location |
getMergedLocation(Location newLocation) |
ImportReport |
importJSONFromAPI(String username,
String password,
String apiurl) |
void |
importString(String stringResult,
String apiurl,
ImportReport report) |
void |
init() |
protected Integer[] |
parseAgecategories(org.json.JSONObject assetJSON) |
protected Asset |
parseAsset(org.json.JSONObject assetJSON,
Integer locationId,
Map<Integer,Set<Integer>> locationTypes) |
protected List<Asset> |
parseAssets(String assetsString,
Map<Integer,Set<Integer>> assetTypes) |
protected List<Location> |
parseChildLocations(String locations) |
protected Map<String,Object> |
parseImageAndWord(org.json.JSONObject image) |
protected List<Map<String,Object>> |
parseImagesAndWords(org.json.JSONArray images)
Parse images and documents (=words).
|
protected Location |
parseLocation(org.json.JSONObject json) |
ImportReport |
processAssets(String assetsString,
ImportReport report) |
void |
processLocations(String temp,
ImportReport report) |
assetExists, getAssetId, getAssetType, getEquipmentType, getLocationId, getLocationId, getPostfix, getProject, getResponse, locationExists, saveAccessibility, saveAsset, saveAssetsAgeCategories, saveComment, saveFacilities, saveImagesAndWords, saveLocation, saveLocationAgeCategory, saveLocationTypes, setProjectpublic PlaymappingImporter(String project)
public void init()
public ImportReport processAssets(String assetsString, ImportReport report) throws NamingException, SQLException
NamingExceptionSQLExceptionpublic void processLocations(String temp, ImportReport report) throws NamingException, SQLException
NamingExceptionSQLExceptionpublic Location getMergedLocation(Location newLocation) throws NamingException, SQLException
NamingExceptionSQLExceptionprotected List<Asset> parseAssets(String assetsString, Map<Integer,Set<Integer>> assetTypes) throws NamingException, SQLException
NamingExceptionSQLExceptionprotected Asset parseAsset(org.json.JSONObject assetJSON, Integer locationId, Map<Integer,Set<Integer>> locationTypes)
protected Integer[] parseAgecategories(org.json.JSONObject assetJSON)
protected Location parseLocation(org.json.JSONObject json)
protected List<Map<String,Object>> parseImagesAndWords(org.json.JSONArray images)
images - The images or documents to be parsedprotected Integer getLocationId(String pmguid) throws NamingException, SQLException
NamingExceptionSQLExceptionpublic void importString(String stringResult, String apiurl, ImportReport report) throws NamingException, SQLException
NamingExceptionSQLExceptionpublic ImportReport importJSONFromAPI(String username, String password, String apiurl) throws SQLException, NamingException
SQLExceptionNamingExceptionCopyright © 2018. All rights reserved.