/** * {@inheritDoc} * * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals( Object obj ) { if (obj instanceof SubgraphResults) { SubgraphResults that = (SubgraphResults)obj; return getLocation().equals(that.getLocation()) && request.equals(that.request); } else if (obj instanceof Subgraph) { Subgraph that = (Subgraph)obj; if (!getLocation().equals(that.getLocation())) return false; Iterator<SubgraphNode> thisIter = this.iterator(); Iterator<SubgraphNode> thatIter = that.iterator(); while (thisIter.hasNext() && thatIter.hasNext()) { SubgraphNode thisNode = thisIter.next(); SubgraphNode thatNode = thatIter.next(); if (!thisNode.getLocation().equals(thatNode.getLocation())) return false; if (!thisNode.getProperties().equals(thatNode.getProperties())) return false; if (!thisNode.getChildren().equals(thatNode.getChildren())) return false; } if (thisIter.hasNext() || thatIter.hasNext()) return false; return true; } return false; }
if (subgraph1.getLocation().isSame(subgraph2.getLocation())) return;
I18n msg = GraphI18n.requiredNodeDoesNotExistRelativeToNode; throw new RepositorySourceException(msg.text(ModeShapeLexicon.WORKSPACES.getString(registry), repositories.getLocation().getPath().getString(registry), repositories.getGraph().getCurrentWorkspaceName(), repositories.getGraph().getSourceName()));
CheckArg.isNotEmpty(projectionRules, "projectionRules"); String configPath = repositoryContext.getConfiguration(1) .getLocation() .getPath() .getString(context.getNamespaceRegistry());
assertThat(subgraph, is(notNullValue())); assertThat(subgraph.getMaximumDepth(), is(2)); assertThat(subgraph.getLocation(), is(Location.create(validPath)));
Location actualLocation = subgraph.getLocation(); if (!this.location.isSame(actualLocation)) {