/** * Create a property with the given name and values, obtained from an attribute name and value in the XML content. * <p> * By default, this method creates a property by directly using the values as the values of the property. * </p> * * @param propertyName the name of the property; never null * @param values the attribute values * @return the property; may not be null */ protected Property createProperty( Name propertyName, Collection<Object> values ) { return propertyFactory.create(propertyName, values); }
/** * Create a property with the given name and value, obtained from an attribute name and value in the XML content. * <p> * By default, this method creates a property by directly using the value as the sole value of the property. * </p> * * @param propertyName the name of the property; never null * @param value the attribute value * @return the property; may not be null */ protected Property createProperty( Name propertyName, Object value ) { propertyValues[0] = value; return propertyFactory.create(propertyName, propertyValues); }
public Create<T> and( UUID uuid ) { PropertyFactory factory = getContext().getPropertyFactory(); properties.put(ModeShapeLexicon.UUID, factory.create(ModeShapeLexicon.UUID, uuid)); return this; }
public CreateAt<Graph> and( UUID uuid ) { PropertyFactory factory = getContext().getPropertyFactory(); properties.add(factory.create(ModeShapeLexicon.UUID, uuid)); return this; }
public On<BatchConjunction> to( Iterator<?> values ) { List<Object> valueList = new LinkedList<Object>(); while (values.hasNext()) { Object value = values.next(); valueList.add(value); } return set(getContext().getPropertyFactory().create(propertyName, valueList)); } };
public On<Conjunction<Graph>> to( Iterator<?> values ) { List<Object> valueList = new LinkedList<Object>(); while (values.hasNext()) { Object value = values.next(); valueList.add(value); } return set(getContext().getPropertyFactory().create(propertyName, valueList)); } };
public Create<T> and( Name name, Object... values ) { PropertyFactory factory = getContext().getPropertyFactory(); properties.put(name, factory.create(name, values)); return this; }
public CreateAt<Graph> and( Name name, Object... values ) { ExecutionContext context = getContext(); PropertyFactory factory = context.getPropertyFactory(); properties.add(factory.create(name, values)); return this; }
public On<BatchConjunction> to( Iterable<?> values ) { List<Object> valueList = new LinkedList<Object>(); for (Object value : values) { value = convertReferenceValue(value); valueList.add(value); } return set(getContext().getPropertyFactory().create(propertyName, valueList)); }
public On<Conjunction<Graph>> to( Iterable<?> values ) { List<Object> valueList = new LinkedList<Object>(); for (Object value : values) { value = convertReferenceValue(value); valueList.add(value); } return set(getContext().getPropertyFactory().create(propertyName, valueList)); }
private Property property( Name name, Object... values ) { return context.getPropertyFactory().create(name, values); }
protected On<Conjunction<Graph>> toValue( Object value ) { return set(getContext().getPropertyFactory().create(propertyName, value)); }
protected On<BatchConjunction> toValue( Object value ) { return set(getContext().getPropertyFactory().create(propertyName, value)); }
public Create<T> and( String name, Object... values ) { ExecutionContext context = getContext(); PropertyFactory factory = context.getPropertyFactory(); NameFactory nameFactory = context.getValueFactories().getNameFactory(); Name propertyName = nameFactory.create(name); properties.put(propertyName, factory.create(propertyName, values)); return this; }
public CreateAt<Graph> and( String name, Object... values ) { ExecutionContext context = getContext(); PropertyFactory factory = context.getPropertyFactory(); NameFactory nameFactory = context.getValueFactories().getNameFactory(); properties.add(factory.create(nameFactory.create(name), values)); return this; }
public On<Conjunction<Graph>> to( Object[] values ) { for (int i = 0, len = values.length; i != len; ++i) { values[i] = convertReferenceValue(values[i]); } return set(getContext().getPropertyFactory().create(propertyName, values)); }
public On<BatchConjunction> to( Object[] values ) { for (int i = 0, len = values.length; i != len; ++i) { values[i] = convertReferenceValue(values[i]); } return set(getContext().getPropertyFactory().create(propertyName, values)); }
public On<BatchConjunction> to( Object value ) { value = convertReferenceValue(value); return set(getContext().getPropertyFactory().create(propertyName, value)); }
public On<Conjunction<Graph>> to( Location location ) { Reference value = (Reference)convertReferenceValue(location); return set(getContext().getPropertyFactory().create(propertyName, value)); }
public On<Conjunction<Graph>> to( Object value ) { value = convertReferenceValue(value); return set(getContext().getPropertyFactory().create(propertyName, value)); }