Source:
public GraphMLTopologyProvider(GraphMLGraph graph, GraphMLServiceAccessor serviceAccessor) { super(graph.getProperty(GraphMLProperties.NAMESPACE)); m_serviceAccessor = serviceAccessor; for (GraphMLNode graphMLNode : graph.getNodes()) { GraphMLVertex newVertex = new GraphMLVertex(this.getVertexNamespace(), graphMLNode); if (newVertex.getNodeID() == null && !Strings.isNullOrEmpty((String) newVertex.getProperties().get(GraphMLProperties.FOREIGN_SOURCE)) && !Strings.isNullOrEmpty((String) newVertex.getProperties().get(GraphMLProperties.FOREIGN_ID)) ) { OnmsNode onmsNode = m_serviceAccessor.getNodeDao().findByForeignId( (String) newVertex.getProperties().get(GraphMLProperties.FOREIGN_SOURCE), (String) newVertex.getProperties().get(GraphMLProperties.FOREIGN_ID)); if (onmsNode != null) { newVertex.setNodeID(onmsNode.getId()); } } addVertices(newVertex); } for (org.opennms.features.graphml.model.GraphMLEdge eachEdge : graph.getEdges()) { GraphMLVertex sourceVertex = (GraphMLVertex) getVertex(getVertexNamespace(), eachEdge.getSource().getId()); GraphMLVertex targetVertex = (GraphMLVertex) getVertex(getVertexNamespace(), eachEdge.getTarget().getId()); if (sourceVertex == null || targetVertex == null) { continue; } GraphMLEdge newEdge = new GraphMLEdge(getEdgeNamespace(), eachEdge, sourceVertex, targetVertex); addEdges(newEdge); } setTopologyProviderInfo(createTopologyProviderInfo(graph)); defaultSzl = getDefaultSzl(graph); focusStrategy = getFocusStrategy(graph); focusIds = getFocusIds(graph); preferredLayout = graph.getProperty(GraphMLProperties.PREFERRED_LAYOUT); requiresStatusProvider = graph.getProperty(GraphMLProperties.VERTEX_STATUS_PROVIDER, Boolean.FALSE); if (focusStrategy != FocusStrategy.SPECIFIC && !focusIds.isEmpty()) { LOG.warn("Focus ids is defined, but strategy is {}. Did you mean to specify {}={}. Ignoring focusIds.", GraphMLProperties.FOCUS_STRATEGY, FocusStrategy.SPECIFIC.name()); } }

Target:
public GraphMLTopologyProvider(GraphMLGraph graph, GraphMLServiceAccessor serviceAccessor) { super(graph.getProperty(GraphMLProperties.NAMESPACE)); m_serviceAccessor = serviceAccessor; for (GraphMLNode graphMLNode : graph.getNodes()) { GraphMLVertex newVertex = new GraphMLVertex(this.getVertexNamespace(), graphMLNode); setNodeIdForVertex(newVertex); addVertices(newVertex); } for (org.opennms.features.graphml.model.GraphMLEdge eachEdge : graph.getEdges()) { GraphMLVertex sourceVertex = (GraphMLVertex) getVertex(getVertexNamespace(), eachEdge.getSource().getId()); GraphMLVertex targetVertex = (GraphMLVertex) getVertex(getVertexNamespace(), eachEdge.getTarget().getId()); if (sourceVertex == null || targetVertex == null) { continue; } GraphMLEdge newEdge = new GraphMLEdge(getEdgeNamespace(), eachEdge, sourceVertex, targetVertex); addEdges(newEdge); } setTopologyProviderInfo(createTopologyProviderInfo(graph)); defaultSzl = getDefaultSzl(graph); focusStrategy = getFocusStrategy(graph); focusIds = getFocusIds(graph); preferredLayout = graph.getProperty(GraphMLProperties.PREFERRED_LAYOUT); requiresStatusProvider = graph.getProperty(GraphMLProperties.VERTEX_STATUS_PROVIDER, Boolean.FALSE); if (focusStrategy != FocusStrategy.SPECIFIC && !focusIds.isEmpty()) { LOG.warn("Focus ids is defined, but strategy is {}. Did you mean to specify {}={}. Ignoring focusIds.", GraphMLProperties.FOCUS_STRATEGY, FocusStrategy.SPECIFIC.name()); } }