/** * Set the number of children for this node * * @param numberOfChildren the number of children * @throws IllegalArgumentException if the number of childre is negative * @throws IllegalStateException if the request is frozen */ public void setNumberOfChildren( int numberOfChildren ) { checkNotFrozen(); CheckArg.isNonNegative(numberOfChildren, "numberOfChildren"); this.numberOfChildren = numberOfChildren; }
/** * Add a property that was read from the {@link RepositoryConnection} * * @param properties the properties that were read * @throws IllegalArgumentException if the property is null * @throws IllegalStateException if the request is frozen */ public void addProperties( Iterable<Property> properties ) { checkNotFrozen(); for (Property property : properties) { this.properties.put(property.getName(), property); } }
/** * Add a property that was read from the {@link RepositoryConnection} * * @param property the property that was read * @return the previous property that had the same name, or null if there was no previously-recorded property with the same * name * @throws IllegalArgumentException if the property is null * @throws IllegalStateException if the request is frozen */ public Property addProperty( Property property ) { checkNotFrozen(); return this.properties.put(property.getName(), property); }
/** * Add a property that was read from the {@link RepositoryConnection} * * @param properties the properties that were read * @throws IllegalArgumentException if the property is null * @throws IllegalStateException if the request is frozen */ public void addProperties( Property... properties ) { checkNotFrozen(); for (Property property : properties) { this.properties.put(property.getName(), property); } }
/** * Sets the actual and complete location of the node whose properties have been read. This method must be called when * processing the request, and the actual location must have a {@link Location#getPath() path}. * * @param actual the actual location of the node being read, or null if the {@link #at() current location} should be used * @throws IllegalArgumentException if the actual location is null or does not have a path. * @throws IllegalStateException if the request is frozen */ public void setActualLocationOfNode( Location actual ) { checkNotFrozen(); CheckArg.isNotNull(actual, "actual"); if (!actual.hasPath()) { throw new IllegalArgumentException(GraphI18n.actualLocationMustHavePath.text(actual)); } this.actualLocation = actual; }