/** * Add to the list of children that has been read the child with the given path and identification properties. The children * should be added in order. * * @param child the location of the child that was read * @throws IllegalArgumentException if the location is null * @throws IllegalStateException if the request is frozen * @see #addChild(Path, Property) * @see #addChild(Path, Property, Property...) */ public void addChild( Location child ) { checkNotFrozen(); CheckArg.isNotNull(child, "child"); this.children.add(child); }
/** * Add to the list of children that has been read the child with the given path and identification property. The children * should be added in order. * * @param pathToChild the path of the child that was just read * @param idProperty the identification property of the child that was just read * @throws IllegalArgumentException if the path or identification properties are null * @throws IllegalStateException if the request is frozen * @see #addChild(Location) * @see #addChild(Path, Property, Property...) */ public void addChild( Path pathToChild, Property idProperty ) { checkNotFrozen(); Location child = Location.create(pathToChild, idProperty); this.children.add(child); }
/** * Add to the list of children that has been read the supplied children with the given path and identification properties. The * children are added in order. * * @param children the locations of the children that were read * @throws IllegalArgumentException if the parameter is null * @throws IllegalStateException if the request is frozen * @see #addChild(Location) * @see #addChild(Path, Property) * @see #addChild(Path, Property, Property...) */ public void addChildren( Iterable<Location> children ) { checkNotFrozen(); CheckArg.isNotNull(children, "children"); for (Location child : children) { if (child != null) this.children.add(child); } }
/** * Add to the list of children that has been read the child with the given path and identification properties. The children * should be added in order. * * @param pathToChild the path of the child that was just read * @param firstIdProperty the first identification property of the child that was just read * @param remainingIdProperties the remaining identification properties of the child that was just read * @throws IllegalArgumentException if the path or identification properties are null * @throws IllegalStateException if the request is frozen * @see #addChild(Location) * @see #addChild(Path, Property) */ public void addChild( Path pathToChild, Property firstIdProperty, Property... remainingIdProperties ) { checkNotFrozen(); Location child = Location.create(pathToChild, firstIdProperty, remainingIdProperties); this.children.add(child); }
/** * Sets the actual and complete location of the node whose children have been read. This method must be called when processing * the request, and the actual location must have a {@link Location#getPath() path}. * * @param actualLocation the actual location of the node being read, or null if the {@link #of() current location} should be * used * @throws IllegalArgumentException if the actual location is null; if the actual location does not have a path; or if the * actual workspace name is null * @throws IllegalStateException if the request is frozen */ public void setActualLocationOfNode( Location actualLocation ) { checkNotFrozen(); CheckArg.isNotNull(actualLocation, "actualLocation"); assert actualLocation != null; if (!actualLocation.hasPath()) { throw new IllegalArgumentException(GraphI18n.actualLocationMustHavePath.text(actualLocation)); } this.actualOf = actualLocation; }