gpt4 book ai didi

com.evolveum.midpoint.xml.ns._public.common.common_3.XmlSchemaType.getDefinition()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 23:41:05 28 4
gpt4 key购买 nike

本文整理了Java中com.evolveum.midpoint.xml.ns._public.common.common_3.XmlSchemaType.getDefinition()方法的一些代码示例,展示了XmlSchemaType.getDefinition()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlSchemaType.getDefinition()方法的具体详情如下:
包路径:com.evolveum.midpoint.xml.ns._public.common.common_3.XmlSchemaType
类名称:XmlSchemaType
方法名:getDefinition

XmlSchemaType.getDefinition介绍

暂无

代码示例

代码示例来源:origin: Evolveum/midpoint

@Override
  public void assertModification(PrismObject<ResourceType> resource, int iteration) {
    List<Element> orgigElements = xmlSchemaDef.getAny();
    List<Element> newElements = resource.asObjectable().getSchema().getDefinition().getAny();
    assertEquals("Wrong number of elements in schema definition in iteration "+iteration, orgigElements.size(), newElements.size());
    // TODO look inside elements
  }
});

代码示例来源:origin: Evolveum/midpoint

private static SchemaDefinitionType createNewXmlSchemaDef(File resourceFile, int iteration, PrismContext prismContext) throws SchemaException {
  PrismObject<ResourceType> resource = parseResource(resourceFile, prismContext);
  XmlSchemaType schema = resource.asObjectable().getSchema();
  SchemaDefinitionType def;
  if (schema == null) {
    def = new SchemaDefinitionType();
    def.getAny().add(DOMUtil.createElement(DOMUtil.XSD_SCHEMA_ELEMENT));
  } else {
    def = schema.getDefinition();
    // TODO: modify it somehow
  }
  return def;
}

代码示例来源:origin: Evolveum/midpoint

@Test
public void testUnmarshallAndEqualsResourceSchema() throws JAXBException, SchemaException, FileNotFoundException {
  System.out.println("\n\n ===[testUnmarshallAndEqualsResourceSchema]===\n");
  // GIVEN
  ResourceType resource1Type = JaxbTestUtil.getInstance().unmarshalObject(new File(RESOURCE_OPENDJ_FILENAME), ResourceType.class);
  assertNotNull(resource1Type);
  SchemaDefinitionType schemaDefinition1 = resource1Type.getSchema().getDefinition();
  ResourceType resource2Type = JaxbTestUtil.getInstance().unmarshalObject(new File(RESOURCE_OPENDJ_FILENAME), ResourceType.class);
  assertNotNull(resource2Type);
  SchemaDefinitionType schemaDefinition2 = resource2Type.getSchema().getDefinition();
  // WHEN
  boolean equals = schemaDefinition1.equals(schemaDefinition2);
  // THEN
  assertTrue("Schema definition not equal", equals);
  assertEquals("Hashcode does not match", schemaDefinition1.hashCode(), schemaDefinition2.hashCode());
}

代码示例来源:origin: Evolveum/midpoint

System.out.println(ObjectTypeUtil.dump(unmarshalledResource));
XmlSchemaType unXmlSchemaType = unmarshalledResource.getSchema();
Element unXsd = unXmlSchemaType.getDefinition().getAny().get(0);
ResourceSchema unSchema = ResourceSchemaImpl.parse(unXsd, "unmarshalled resource", PrismTestUtil.getPrismContext());

代码示例来源:origin: Evolveum/midpoint

Element reparsedXsdSchemaElement = defType.getDefinition().getSchema();
ResourceSchema reparsedSchema = ResourceSchemaImpl.parse(reparsedXsdSchemaElement, "reparsed schema", prismContext);

代码示例来源:origin: Evolveum/midpoint

} else {
  assertNotNull("No schema element (JAXB)", xmlSchemaType);
  SchemaDefinitionType definition = xmlSchemaType.getDefinition();
  assertNotNull("No definition element in schema (JAXB)", definition);
  List<Element> anyElements = definition.getAny();

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com