@Override public MutablePrismSchema createPrismSchema(String namespace) { return new PrismSchemaImpl(namespace, prismContext); } }
@Override public MutablePrismSchema createPrismSchema() { return new PrismSchemaImpl(prismContext); }
public static PrismSchema parse(Element element, EntityResolver resolver, boolean isRuntime, String shortDescription, boolean allowDelayedItemDefinitions, PrismContext prismContext) throws SchemaException { return parse(element, resolver, new PrismSchemaImpl(prismContext), isRuntime, shortDescription, allowDelayedItemDefinitions, prismContext); }
public static PrismSchema parse(Element element, boolean isRuntime, String shortDescription, PrismContext prismContext) throws SchemaException { return parse(element, ((PrismContextImpl) prismContext).getEntityResolver(), new PrismSchemaImpl(prismContext), isRuntime, shortDescription, false, prismContext); }
Element importElement = DOMUtil.createSubElement(schemaElement, DOMUtil.XSD_IMPORT_ELEMENT); importElement.setAttribute(DOMUtil.XSD_ATTR_NAMESPACE.getLocalPart(), namespace); description.setSchema(new PrismSchemaImpl(prismContext)); wrappedDescriptions.add(description);
private PrismSchema constructSchema(PrismContext prismContext) { PrismSchemaImpl schema = new PrismSchemaImpl(NS_MY_SCHEMA, prismContext); MutableComplexTypeDefinition weaponTypeDef = schema.createComplexTypeDefinition(WEAPON_TYPE_QNAME).toMutable(); MutablePrismPropertyDefinition<?> kindPropertyDef = weaponTypeDef.createPropertyDefinition(WEAPON_KIND_QNAME, DOMUtil.XSD_STRING); kindPropertyDef.setDisplayName("Weapon kind"); weaponTypeDef.createPropertyDefinition(WEAPON_BRAND_LOCAL_NAME, PrismInternalTestUtil.WEAPONS_WEAPON_BRAND_TYPE_QNAME); weaponTypeDef.createPropertyDefinition(WEAPON_PASSWORD_LOCAL_NAME, PrismInternalTestUtil.DUMMY_PROTECTED_STRING_TYPE); weaponTypeDef.createPropertyDefinition(WEAPON_BLADE_LOCAL_NAME, PrismInternalTestUtil.EXTENSION_BLADE_TYPE_QNAME); MutablePrismPropertyDefinition<?> createTimestampPropertyDef = weaponTypeDef.createPropertyDefinition(WEAPON_CREATE_TIMESTAMP_QNAME, DOMUtil.XSD_DATETIME); createTimestampPropertyDef.setDisplayName("Create timestamp"); createTimestampPropertyDef.setOperational(true); schema.createPropertyContainerDefinition(WEAPON_LOCAL_NAME, WEAPON_TYPE_LOCAL_NAME); return schema; }
@Test public void testRoundTripGeneric() throws SchemaException { PrismSchemaImpl schema = new PrismSchemaImpl(SCHEMA_NS, PrismTestUtil.getPrismContext());