/** * Creates an spl:Argument with a given property and value type. * The new Argument resource will be a blank node in a given Model. * @param model the Model * @param argProperty the property or null * @param argType the value type or null * @param optional true if the Argument shall be optional * @return the new Argument */ public static IArgument createArgument(SpinProcessor model, INode argProperty, INode argType, bool optional) { IArgument a = (IArgument)model.CreateResource(SPL.ClassArgument).As(typeof(ArgumentImpl)); if (argProperty != null) { a.AddProperty(SPL.PropertyPredicate, argProperty); } if (argType != null) { a.AddProperty(SPL.PropertyValueType, argType); } if (optional) { a.AddProperty(SPL.PropertyOptional, RDFUtil.TRUE); } return(a); }