本文整理了Java中org.eclipse.persistence.oxm.XMLField.getLeafElementType()
方法的一些代码示例,展示了XMLField.getLeafElementType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLField.getLeafElementType()
方法的具体详情如下:
包路径:org.eclipse.persistence.oxm.XMLField
类名称:XMLField
方法名:getLeafElementType
暂无
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
public QName getDefaultRootElementType() {
if (defaultRootElementField != null) {
return defaultRootElementField.getLeafElementType();
}
return null;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
public QName getDefaultRootElementType() {
if (defaultRootElementField != null) {
return defaultRootElementField.getLeafElementType();
}
return null;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
public QName getDefaultRootElementType() {
if (defaultRootElementField != null) {
return defaultRootElementField.getLeafElementType();
}
return null;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
protected QName getSchemaType(XMLField xmlField, Object value, AbstractSession session) {
QName schemaType = null;
if(xmlField.getLeafElementType() != null){
schemaType = xmlField.getLeafElementType();
}else if (xmlField.isTypedTextField()) {
schemaType = xmlField.getXMLType(value.getClass());
} else if (xmlField.isUnionField()) {
return getSingleValueToWriteForUnion((XMLUnionField) xmlField, value, session);
} else if (xmlField.getSchemaType() != null) {
schemaType = xmlField.getSchemaType();
}
return schemaType;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
if(xmlField.getLeafElementType() != null){
schemaType = xmlField.getLeafElementType();
}else if (xmlField.isUnionField()) {
return getValueToWriteForUnion((XMLUnionField)xmlField, value, session);
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
*/
public boolean shouldAddXsiType(XMLRecord record, ClassDescriptor descriptor) {
XMLDescriptor xmlDescriptor = (XMLDescriptor) descriptor;
if ((getReferenceDescriptor() == null) && (xmlDescriptor.getSchemaReference() != null)) {
if (descriptor.hasInheritance()) {
XMLField indicatorField = (XMLField) descriptor.getInheritancePolicy().getClassIndicatorField();
if ((indicatorField.getLastXPathFragment().getNamespaceURI() != null) && indicatorField.getLastXPathFragment().getNamespaceURI().equals(XMLConstants.SCHEMA_INSTANCE_URL)
&& indicatorField.getLastXPathFragment().getLocalName().equals(XMLConstants.SCHEMA_TYPE_ATTRIBUTE)) {
return false;
}
}
XMLSchemaReference xmlRef = xmlDescriptor.getSchemaReference();
if ((xmlRef.getType() == XMLSchemaReference.COMPLEX_TYPE) && xmlRef.isGlobalDefinition()) {
QName ctxQName = xmlRef.getSchemaContextAsQName(xmlDescriptor.getNamespaceResolver());
QName leafType = ((XMLField) getField()).getLeafElementType();
if ((leafType == null) || (!ctxQName.equals(record.getLeafElementType()))) {
return true;
}
}
}
return false;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
*/
public boolean shouldAddXsiType(XMLRecord record, ClassDescriptor aDescriptor) {
XMLDescriptor xmlDescriptor = (XMLDescriptor) aDescriptor;
if ((getReferenceDescriptor() == null) && (xmlDescriptor.getSchemaReference() != null)) {
if (aDescriptor.hasInheritance()) {
XMLField indicatorField = (XMLField) aDescriptor.getInheritancePolicy().getClassIndicatorField();
if ((indicatorField.getLastXPathFragment().getNamespaceURI() != null) //
&& indicatorField.getLastXPathFragment().getNamespaceURI().equals(XMLConstants.SCHEMA_INSTANCE_URL) //
&& indicatorField.getLastXPathFragment().getLocalName().equals(XMLConstants.SCHEMA_TYPE_ATTRIBUTE)) {
return false;
}
}
XMLSchemaReference xmlRef = xmlDescriptor.getSchemaReference();
if ((xmlRef.getType() == XMLSchemaReference.COMPLEX_TYPE) && xmlRef.isGlobalDefinition()) {
QName ctxQName = xmlRef.getSchemaContextAsQName(xmlDescriptor.getNamespaceResolver());
QName leafType = ((XMLField) getField()).getLeafElementType();
if ((leafType == null) || (!ctxQName.equals(record.getLeafElementType()))) {
return true;
}
}
}
return false;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
if (newElementClass == null) {
QName leafElementType = ((XMLField) getField()).getLeafElementType();
if (leafElementType != null) {
XPathQName leafElementXPathQName = new XPathQName(leafElementType, ((XMLRecord) nestedRow).isNamespaceAware());
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
if (newElementClass == null) {
QName leafElementType = ((XMLField) getField()).getLeafElementType();
if (leafElementType != null) {
XPathQName leafElementXPathQName = new XPathQName(leafElementType, ((XMLRecord) nestedRow).isNamespaceAware());
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
if (classValue == null) {
QName leafElementType = ((XMLField) getField()).getLeafElementType();
if (leafElementType != null) {
XPathQName leafElementXPathQName = new XPathQName(leafElementType, ((XMLRecord) nestedRow).isNamespaceAware());
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
if (classValue == null) {
QName leafElementType = ((XMLField) getField()).getLeafElementType();
if (leafElementType != null) {
XPathQName leafElementXPathQName = new XPathQName(leafElementType, ((XMLRecord) nestedRow).isNamespaceAware());
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
if (newElementClass == null) {
QName leafElementType = ((XMLField) getField()).getLeafElementType();
if (leafElementType != null) {
Object indicator = aDescriptor.getInheritancePolicy().getClassIndicatorMapping().get(leafElementType);
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
if (classValue == null) {
QName leafElementType = ((XMLField) getField()).getLeafElementType();
if (leafElementType != null) {
Object indicator = aDescriptor.getInheritancePolicy().getClassIndicatorMapping().get(leafElementType);
内容来源于网络,如有侵权,请联系作者删除!