for (SemanticType type : worksheet.getSemanticTypes().getListOfTypes()) { modeledColumnTable.put(type.getHNodeId(),"");
public void addType(SemanticType type) { ArrayList<SemanticType> typeArr = getSemanticTypeForHNodeId(type.getHNodeId()); typeArr.add(type); types.put(type.getHNodeId(), typeArr); }
public void clearSemanticTypes() { semanticTypes = new SemanticTypes(); }
worksheet.getSemanticTypes().unassignColumnSemanticType(hNodeId); columnNode.unassignUserTypes(); oldType = worksheet.getSemanticTypes().getSemanticTypeForHNodeId(hNodeId); oldSynonymTypes = worksheet.getSemanticTypes().getSynonymTypesForHNodeId(hNodeId); worksheet.getSemanticTypes().addType(newType); typesList.add(newType); worksheet.getSemanticTypes().addSynonymTypesForHNodeId(hNodeId, newSynonymTypes);
private void prepareFeatureSchema() { List<String> spatialHNodeIds = new ArrayList<>(); for (SemanticType type : worksheet.getSemanticTypes().getListOfTypes()) { for (SemanticType synonymType : worksheet .getSemanticTypes() .getSynonymTypesForHNodeId(kmlCategoryHNodeId) .getSynonyms()) { if (hasType(synonymType, KML_LABEL_PROPERTY, for (SemanticType synonymType : worksheet .getSemanticTypes() .getSynonymTypesForHNodeId(kmlLabelHNodeId) .getSynonyms()) { if (hasType(synonymType, KML_CATEGORY_PROPERTY,
worksheet.getSemanticTypes().addType(type); saveSemanticTypesInformation(worksheet, workspace, worksheet.getSemanticTypes().getListOfTypes());
worksheet.getSemanticTypes().unassignColumnSemanticType(hNodeId); List<SemanticType> suggestedSemanticTypes = new SemanticTypeUtil().getColumnSemanticSuggestions(workspace, worksheet, cn, 4, selection); saveSemanticTypesInformation(worksheet, workspace, worksheet.getSemanticTypes().getListOfTypes());
@Override public UpdateContainer undoIt(Workspace workspace) { UpdateContainer c = new UpdateContainer(); Worksheet worksheet = workspace.getWorksheet(worksheetId); if (oldType == null) { worksheet.getSemanticTypes().unassignColumnSemanticType(hNodeId); } else { worksheet.getSemanticTypes().setType(oldType); worksheet.getSemanticTypes().addSynonymTypesForHNodeId(hNodeId, oldSynonymTypes); } // Replace the current alignment with the old alignment String alignmentId = AlignmentManager.Instance().constructAlignmentId(workspace.getId(), worksheetId); AlignmentManager.Instance().addAlignmentToMap(alignmentId, oldAlignment); oldAlignment.setGraph(oldGraph); // Get the alignment update if any try { c.append(computeAlignmentAndSemanticTypesAndCreateUpdates(workspace)); } catch (Exception e) { logger.error("Error occured while unsetting the semantic type!", e); return new UpdateContainer(new ErrorUpdate( "Error occured while unsetting the semantic type!")); } return c; }
oldSemanticTypes = types.getSemanticTypeForHNodeId(hNodeId); HashMap<String, SemanticType> semanticIdMap = new HashMap<>(); for(SemanticType type : oldSemanticTypes) { String linkId = edge.getId(); SemanticType type = semanticIdMap.get(linkId); types.removeType(type); columnNode.unassignUserType(type); columnNode.setForced(false);
private void addSynonymTypesPredicateObjectMaps(TriplesMap subjTrMap, String hNodeId) { SynonymSemanticTypes synonyms = this.semanticTypes.getSynonymTypesForHNodeId(hNodeId); if (synonyms != null && !synonyms.getSynonyms().isEmpty()){ for (SemanticType synType:synonyms.getSynonyms()) {
worksheet.getSemanticTypes().addType(type);
oldType = worksheet.getSemanticTypes().getSemanticTypeForHNodeId( hNodeId); .getSynonymTypesForHNodeId(newType.getHNodeId()); worksheet.getSemanticTypes().unassignColumnSemanticType(hNodeId); worksheet.getSemanticTypes().addType(newType);
@Override public UpdateContainer undoIt(Workspace workspace) { UpdateContainer c = new UpdateContainer(); Worksheet worksheet = workspace.getWorksheet(worksheetId); if (oldType == null) { worksheet.getSemanticTypes().unassignColumnSemanticType(hNodeId); } else { worksheet.getSemanticTypes().setType(oldType); worksheet.getSemanticTypes().addSynonymTypesForHNodeId( hNodeId, oldSynonymTypes); } // Replace the current alignment with the old alignment String alignmentId = AlignmentManager.Instance().constructAlignmentId( workspace.getId(), worksheetId); AlignmentManager.Instance() .addAlignmentToMap(alignmentId, oldAlignment); oldAlignment.setGraph(oldGraph); // Get the alignment update if any try { c.append(computeAlignmentAndSemanticTypesAndCreateUpdates(workspace)); } catch (Exception e) { logger.error("Error occured while unsetting the semantic type!", e); return new UpdateContainer(new ErrorUpdate( "Error occured while unsetting the semantic type!")); } return c; }
type = new SemanticType(hNodeId, typeName, domainName, domainId, false, Origin.User, 1.00); worksheet.getSemanticTypes().addType(type);
for (SemanticType type : worksheet.getSemanticTypes().getListOfTypes()) { modeledColumnTable.put(type.getHNodeId(),"");
public void removeType(SemanticType type) { ArrayList<SemanticType> typeArr = getSemanticTypeForHNodeId(type.getHNodeId()); typeArr.remove(type); types.put(type.getHNodeId(), typeArr); }
boolean latFound = false; boolean lngFound = false; for (SemanticType type : worksheet.getSemanticTypes().getListOfTypes()) { if (type.getType().getUri().equals(SRID_PROPERTY) && type.getDomain().getUri().equals(SRID_CLASS)){ for (SemanticType type : worksheet.getSemanticTypes().getListOfTypes()) {
boolean hideable = (semTypes.getSemanticTypeForHNodeId(headerNode.getId()) == null) ? true : false;
saveSemanticTypesInformation(worksheet, workspace, worksheet.getSemanticTypes().getListOfTypes()); c.append(this.computeAlignmentAndSemanticTypesAndCreateUpdates(workspace));
ArrayList<SemanticType> semTypes = types.getSemanticTypeForHNodeId(nodeId); writer.key(JsonKeys.HNodeId.name()).value(nodeId); writer.key(JsonKeys.SemanticTypesArray.name()).array();