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 |
|---|---|
Location |
getExistingLocation(Location newLocation) |
protected Integer |
getLocationId(String pmguid) |
ImportReport |
importJSONAssetsFromAPI(String username,
String password,
String apiurl,
List<String> pm_guids,
ImportReport report) |
List<String> |
importJSONLocationsFromAPI(String username,
String password,
String apiurl,
ImportReport report) |
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(org.json.JSONArray assetsArray,
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(org.json.JSONArray assetsString,
ImportReport report) |
List<String> |
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(org.json.JSONArray assetsString, ImportReport report) throws NamingException, SQLException
NamingExceptionSQLExceptionpublic List<String> processLocations(String temp, ImportReport report) throws NamingException, SQLException
NamingExceptionSQLExceptionpublic Location getExistingLocation(Location newLocation) throws NamingException, SQLException
NamingExceptionSQLExceptionprotected List<Asset> parseAssets(org.json.JSONArray assetsArray, 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 importJSONAssetsFromAPI(String username, String password, String apiurl, List<String> pm_guids, ImportReport report) throws SQLException, NamingException
SQLExceptionNamingExceptionpublic List<String> importJSONLocationsFromAPI(String username, String password, String apiurl, ImportReport report) throws SQLException, NamingException
SQLExceptionNamingExceptionCopyright © 2018. All rights reserved.