/** * Creates new instance of property definition and adds it to the container. * <p> * This is the preferred method of creating a new definition. * * @param localName name of the property (element name) relative to the schema namespace * @param typeName XSD type of the property * @return created property definition */ public MutablePrismPropertyDefinition<?> createPropertyDefinition(String localName, QName typeName) { QName name = new QName(getSchemaNamespace(), localName); return createPropertyDefinition(name, typeName); }
/** * Creates new instance of property definition and adds it to the container. * <p> * This is the preferred method of creating a new definition. * * @param localName name of the property (element name) relative to the schema namespace * @param localTypeName XSD type of the property * @return created property definition */ public PrismPropertyDefinition createPropertyDefinition(String localName, String localTypeName) { QName name = new QName(getSchemaNamespace(), localName); QName typeName = new QName(getSchemaNamespace(), localTypeName); return createPropertyDefinition(name, typeName); }
/** * Creates new instance of property definition and adds it to the container. * <p> * This is the preferred method of creating a new definition. * * @param localName name of the property (element name) relative to the schema namespace * @param localTypeName XSD type of the property * @param minOccurs minimal number of occurrences * @param maxOccurs maximal number of occurrences (-1 means unbounded) * @return created property definition */ public PrismPropertyDefinition createPropertyDefinition(String localName, String localTypeName, int minOccurs, int maxOccurs) { QName name = new QName(getSchemaNamespace(), localName); QName typeName = new QName(getSchemaNamespace(), localTypeName); PrismPropertyDefinitionImpl propertyDefinition = createPropertyDefinition(name, typeName); propertyDefinition.setMinOccurs(minOccurs); propertyDefinition.setMaxOccurs(maxOccurs); return propertyDefinition; }