*
* @param parent the location of the parent
* @return the object used to start creating a node
*/
public CreateNode<Conjunction<Graph>> createUnder( final Location parent ) {
final NameFactory nameFactory = getContext().getValueFactories().getNameFactory();
CheckArg.isNotNull(parent, "parent");
return new CreateNode<Conjunction<Graph>>() {
public Conjunction<Graph> node( String name,
Property... properties ) {
Name child = nameFactory.create(name);
requests.createNode(parent, getCurrentWorkspaceName(), child, properties);
return nextGraph;
}
public Conjunction<Graph> node( String name,
Iterator<Property> properties ) {
Name child = nameFactory.create(name);
requests.createNode(parent, getCurrentWorkspaceName(), child, properties);
return nextGraph;
}
public Conjunction<Graph> node( String name,
Iterable<Property> properties ) {
Name child = nameFactory.create(name);
requests.createNode(parent, getCurrentWorkspaceName(), child, properties.iterator());
return nextGraph;
}
};
}