@Signature public Map<String, String> getSchemaTypeInfo(Environment env) { Map<String, String> result = new LinkedHashMap<String, String>(); result.put("name", getWrappedObject().getSchemaTypeInfo().getTypeName()); result.put("namespace", getWrappedObject().getSchemaTypeInfo().getTypeNamespace()); return result; }
public TypeInfo getSchemaTypeInfo() { return this.element.getSchemaTypeInfo(); }
@Override public TypeInfo getSchemaTypeInfo() { return element.getSchemaTypeInfo(); }
@Override public TypeInfo getSchemaTypeInfo() { return element.getSchemaTypeInfo(); }
/** * @see org.w3c.dom.Element#getSchemaTypeInfo() */ public TypeInfo getSchemaTypeInfo() { return getCurrentInternal().getSchemaTypeInfo(); }
/** * @see org.w3c.dom.Element#getSchemaTypeInfo() */ @Override public TypeInfo getSchemaTypeInfo() { return original.get().getSchemaTypeInfo(); }
/** * @see org.w3c.dom.Element#getSchemaTypeInfo() */ public TypeInfo getSchemaTypeInfo() { return getAtualInterno().getSchemaTypeInfo(); }
/** * @see org.w3c.dom.Element#getSchemaTypeInfo() */ @Override public TypeInfo getSchemaTypeInfo() { return original.get().getSchemaTypeInfo(); }
/** * @return * @see org.w3c.dom.Element#getSchemaTypeInfo() */ public TypeInfo getSchemaTypeInfo() { return getParent().getSchemaTypeInfo(); }
@Override public TypeInfo getSchemaTypeInfo() { final Element elem = getElement(); return elem != null ? elem.getSchemaTypeInfo() : null; }
protected boolean isElementType(String typeName) { TypeInfo typeInfo = _value.getSchemaTypeInfo(); return isType(typeInfo, typeName); }
public DOMTypeInfo getSchemaTypeInfo() { return wrap(_delegate.getSchemaTypeInfo()); }
public Set<Namespace> parseNamespaces(final Document document){ final TypeInfo typeInfo = document.getDocumentElement().getSchemaTypeInfo(); final Set<Namespace> namespaces = new HashSet<>(); if(typeInfo instanceof Node){ Node node = (Node) typeInfo; NamedNodeMap nodeMap = node.getAttributes(); IntStream.range(0, nodeMap.getLength()) .forEach(index -> { Node attributeNode = nodeMap.item(index); namespaces.add(Namespace.builder() .name(attributeNode.getNodeName()) .localName(attributeNode.getLocalName()) .value(attributeNode.getNodeValue()) .build()); }); } return namespaces; }
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elemList; Element emElem; TypeInfo elemTypeInfo; String typeNamespace; doc = (Document) load("hc_staff", false); elemList = doc.getElementsByTagName("em"); emElem = (Element) elemList.item(0); elemTypeInfo = emElem.getSchemaTypeInfo(); typeNamespace = elemTypeInfo.getTypeNamespace(); assertEquals("typeinfogettypenamespace04_1", "http://www.w3.org/1999/xhtml", typeNamespace); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; Element elem; TypeInfo elemTypeInfo; String typeName; NodeList elemList; boolean retValue; doc = (Document) load("hc_staff", false); elemList = doc.getElementsByTagName("code"); elem = (Element) elemList.item(0); elemTypeInfo = elem.getSchemaTypeInfo(); retValue = elemTypeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml", "field", 0); assertTrue("isDerived", retValue); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elemList; Element elem; TypeInfo typeInfo; boolean isDerived; doc = (Document) load("hc_staff", false); elemList = doc.getElementsByTagName("p"); elem = (Element) elemList.item(0); typeInfo = elem.getSchemaTypeInfo(); assertNotNull("typeInfoNotNull", typeInfo); isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml", "part1", 15); assertTrue("derivedFromPart1AnyMethod", isDerived); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elemList; Element elem; TypeInfo typeInfo; boolean isDerived; doc = (Document) load("hc_staff", false); elemList = doc.getElementsByTagName("p"); elem = (Element) elemList.item(0); typeInfo = elem.getSchemaTypeInfo(); assertNotNull("typeInfoNotNull", typeInfo); isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema", "anyType", 13); assertFalse("derivedFromAnyTypeNotExtension", isDerived); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elemList; Element elem; TypeInfo typeInfo; boolean isDerived; doc = (Document) load("typeinfo", false); elemList = doc.getElementsByTagName("acronym"); elem = (Element) elemList.item(0); typeInfo = elem.getSchemaTypeInfo(); assertNotNull("typeInfoNotNull", typeInfo); isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema", "anyType", 2); assertTrue("derivedFromAnyExtension", isDerived); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elemList; Element elem; TypeInfo typeInfo; boolean isDerived; doc = (Document) load("hc_staff", false); elemList = doc.getElementsByTagName("p"); elem = (Element) elemList.item(0); typeInfo = elem.getSchemaTypeInfo(); assertNotNull("typeInfoNotNull", typeInfo); isDerived = typeInfo.isDerivedFrom("http://www.w3.org/1999/xhtml", "pType", 1); assertTrue("derivedFromPTypeRestriction", isDerived); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; NodeList elemList; Element elem; TypeInfo typeInfo; boolean isDerived; doc = (Document) load("typeinfo", false); elemList = doc.getElementsByTagName("acronym"); elem = (Element) elemList.item(0); typeInfo = elem.getSchemaTypeInfo(); assertNotNull("typeInfoNotNull", typeInfo); isDerived = typeInfo.isDerivedFrom("http://www.w3.org/2001/XMLSchema", "anySimpleType", 8); assertTrue("derivedFromAnySimpleList", isDerived); } /**