private ID calcId() {
// TODO: share code with PropertyInfoImpl
if(reader().hasMethodAnnotation(XmlID.class,method)) {
return ID.ID;
} else
if(reader().hasMethodAnnotation(XmlIDREF.class,method)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
java类javax.xml.bind.annotation.XmlID的实例源码
ElementInfoImpl.java 文件源码
项目:OpenJSharp
阅读 20
收藏 0
点赞 0
评论 0
PropertyInfoImpl.java 文件源码
项目:OpenJSharp
阅读 22
收藏 0
点赞 0
评论 0
private ID calcId() {
if(seed.hasAnnotation(XmlID.class)) {
// check the type
if(!nav().isSameType(getIndividualType(), nav().ref(String.class)))
parent.builder.reportError(new IllegalAnnotationException(
Messages.ID_MUST_BE_STRING.format(getName()), seed )
);
return ID.ID;
} else
if(seed.hasAnnotation(XmlIDREF.class)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
BeanGenerator.java 文件源码
项目:OpenJSharp
阅读 24
收藏 0
点赞 0
评论 0
/**
* Generates {@link XmlJavaTypeAdapter} from {@link PropertyInfo} if necessary.
* Also generates other per-property annotations
* (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary.
*/
public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) {
CAdapter adapter = prop.getAdapter();
if (adapter != null) {
if (adapter.getAdapterIfKnown() == SwaRefAdapterMarker.class) {
field.annotate(XmlAttachmentRef.class);
} else {
// [RESULT]
// @XmlJavaTypeAdapter( Foo.class )
XmlJavaTypeAdapterWriter xjtw = field.annotate2(XmlJavaTypeAdapterWriter.class);
xjtw.value(adapter.adapterType.toType(this, EXPOSED));
}
}
switch (prop.id()) {
case ID:
field.annotate(XmlID.class);
break;
case IDREF:
field.annotate(XmlIDREF.class);
break;
}
if (prop.getExpectedMimeType() != null) {
field.annotate2(XmlMimeTypeWriter.class).value(prop.getExpectedMimeType().toString());
}
}
BeanGenerator.java 文件源码
项目:openjdk-jdk10
阅读 36
收藏 0
点赞 0
评论 0
/**
* Generates {@link XmlJavaTypeAdapter} from {@link PropertyInfo} if necessary.
* Also generates other per-property annotations
* (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary.
*/
public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) {
CAdapter adapter = prop.getAdapter();
if (adapter != null) {
if (adapter.getAdapterIfKnown() == SwaRefAdapterMarker.class) {
field.annotate(XmlAttachmentRef.class);
} else {
// [RESULT]
// @XmlJavaTypeAdapter( Foo.class )
XmlJavaTypeAdapterWriter xjtw = field.annotate2(XmlJavaTypeAdapterWriter.class);
xjtw.value(adapter.adapterType.toType(this, EXPOSED));
}
}
switch (prop.id()) {
case ID:
field.annotate(XmlID.class);
break;
case IDREF:
field.annotate(XmlIDREF.class);
break;
}
if (prop.getExpectedMimeType() != null) {
field.annotate2(XmlMimeTypeWriter.class).value(prop.getExpectedMimeType().toString());
}
}
ElementInfoImpl.java 文件源码
项目:openjdk-jdk10
阅读 27
收藏 0
点赞 0
评论 0
private ID calcId() {
// TODO: share code with PropertyInfoImpl
if(reader().hasMethodAnnotation(XmlID.class,method)) {
return ID.ID;
} else
if(reader().hasMethodAnnotation(XmlIDREF.class,method)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
PropertyInfoImpl.java 文件源码
项目:openjdk-jdk10
阅读 24
收藏 0
点赞 0
评论 0
private ID calcId() {
if(seed.hasAnnotation(XmlID.class)) {
// check the type
if(!nav().isSameType(getIndividualType(), nav().ref(String.class)))
parent.builder.reportError(new IllegalAnnotationException(
Messages.ID_MUST_BE_STRING.format(getName()), seed )
);
return ID.ID;
} else
if(seed.hasAnnotation(XmlIDREF.class)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
BeanGenerator.java 文件源码
项目:openjdk9
阅读 23
收藏 0
点赞 0
评论 0
/**
* Generates {@link XmlJavaTypeAdapter} from {@link PropertyInfo} if necessary.
* Also generates other per-property annotations
* (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary.
*/
public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) {
CAdapter adapter = prop.getAdapter();
if (adapter != null) {
if (adapter.getAdapterIfKnown() == SwaRefAdapterMarker.class) {
field.annotate(XmlAttachmentRef.class);
} else {
// [RESULT]
// @XmlJavaTypeAdapter( Foo.class )
XmlJavaTypeAdapterWriter xjtw = field.annotate2(XmlJavaTypeAdapterWriter.class);
xjtw.value(adapter.adapterType.toType(this, EXPOSED));
}
}
switch (prop.id()) {
case ID:
field.annotate(XmlID.class);
break;
case IDREF:
field.annotate(XmlIDREF.class);
break;
}
if (prop.getExpectedMimeType() != null) {
field.annotate2(XmlMimeTypeWriter.class).value(prop.getExpectedMimeType().toString());
}
}
ElementInfoImpl.java 文件源码
项目:openjdk9
阅读 22
收藏 0
点赞 0
评论 0
private ID calcId() {
// TODO: share code with PropertyInfoImpl
if(reader().hasMethodAnnotation(XmlID.class,method)) {
return ID.ID;
} else
if(reader().hasMethodAnnotation(XmlIDREF.class,method)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
PropertyInfoImpl.java 文件源码
项目:openjdk9
阅读 22
收藏 0
点赞 0
评论 0
private ID calcId() {
if(seed.hasAnnotation(XmlID.class)) {
// check the type
if(!nav().isSameType(getIndividualType(), nav().ref(String.class)))
parent.builder.reportError(new IllegalAnnotationException(
Messages.ID_MUST_BE_STRING.format(getName()), seed )
);
return ID.ID;
} else
if(seed.hasAnnotation(XmlIDREF.class)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
ChainIndexAdapter.java 文件源码
项目:v8fs
阅读 21
收藏 0
点赞 0
评论 0
@XmlID
@XmlAttribute(name = "id")
public String getIDXML() {
if (this.id.isEmpty()) {
this.id = Integer.toHexString(nextID++);
}
return this.id;
}
ElementInfoImpl.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 19
收藏 0
点赞 0
评论 0
private ID calcId() {
// TODO: share code with PropertyInfoImpl
if(reader().hasMethodAnnotation(XmlID.class,method)) {
return ID.ID;
} else
if(reader().hasMethodAnnotation(XmlIDREF.class,method)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
PropertyInfoImpl.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 29
收藏 0
点赞 0
评论 0
private ID calcId() {
if(seed.hasAnnotation(XmlID.class)) {
// check the type
if(!nav().isSameType(getIndividualType(), nav().ref(String.class)))
parent.builder.reportError(new IllegalAnnotationException(
Messages.ID_MUST_BE_STRING.format(getName()), seed )
);
return ID.ID;
} else
if(seed.hasAnnotation(XmlIDREF.class)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
BeanGenerator.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 23
收藏 0
点赞 0
评论 0
/**
* Generates {@link XmlJavaTypeAdapter} from {@link PropertyInfo} if necessary.
* Also generates other per-property annotations
* (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary.
*/
public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) {
CAdapter adapter = prop.getAdapter();
if (adapter != null) {
if (adapter.getAdapterIfKnown() == SwaRefAdapterMarker.class) {
field.annotate(XmlAttachmentRef.class);
} else {
// [RESULT]
// @XmlJavaTypeAdapter( Foo.class )
XmlJavaTypeAdapterWriter xjtw = field.annotate2(XmlJavaTypeAdapterWriter.class);
xjtw.value(adapter.adapterType.toType(this, EXPOSED));
}
}
switch (prop.id()) {
case ID:
field.annotate(XmlID.class);
break;
case IDREF:
field.annotate(XmlIDREF.class);
break;
}
if (prop.getExpectedMimeType() != null) {
field.annotate2(XmlMimeTypeWriter.class).value(prop.getExpectedMimeType().toString());
}
}
ObjectFactory.java 文件源码
项目:onvif
阅读 19
收藏 0
点赞 0
评论 0
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://www.onvif.org/ver10/advancedsecurity/wsdl", name = "CertPathValidationPolicyID", scope = GetAssignedCertPathValidationPoliciesResponse.class)
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
public JAXBElement<String> createGetAssignedCertPathValidationPoliciesResponseCertPathValidationPolicyID(String value) {
return new JAXBElement<String>(_GetAssignedCertPathValidationPoliciesResponseCertPathValidationPolicyID_QNAME, String.class, GetAssignedCertPathValidationPoliciesResponse.class, value);
}
ElementInfoImpl.java 文件源码
项目:infobip-open-jdk-8
阅读 31
收藏 0
点赞 0
评论 0
private ID calcId() {
// TODO: share code with PropertyInfoImpl
if(reader().hasMethodAnnotation(XmlID.class,method)) {
return ID.ID;
} else
if(reader().hasMethodAnnotation(XmlIDREF.class,method)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
PropertyInfoImpl.java 文件源码
项目:infobip-open-jdk-8
阅读 27
收藏 0
点赞 0
评论 0
private ID calcId() {
if(seed.hasAnnotation(XmlID.class)) {
// check the type
if(!nav().isSameType(getIndividualType(), nav().ref(String.class)))
parent.builder.reportError(new IllegalAnnotationException(
Messages.ID_MUST_BE_STRING.format(getName()), seed )
);
return ID.ID;
} else
if(seed.hasAnnotation(XmlIDREF.class)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
BeanGenerator.java 文件源码
项目:infobip-open-jdk-8
阅读 24
收藏 0
点赞 0
评论 0
/**
* Generates {@link XmlJavaTypeAdapter} from {@link PropertyInfo} if necessary.
* Also generates other per-property annotations
* (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary.
*/
public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) {
CAdapter adapter = prop.getAdapter();
if (adapter != null) {
if (adapter.getAdapterIfKnown() == SwaRefAdapterMarker.class) {
field.annotate(XmlAttachmentRef.class);
} else {
// [RESULT]
// @XmlJavaTypeAdapter( Foo.class )
XmlJavaTypeAdapterWriter xjtw = field.annotate2(XmlJavaTypeAdapterWriter.class);
xjtw.value(adapter.adapterType.toType(this, EXPOSED));
}
}
switch (prop.id()) {
case ID:
field.annotate(XmlID.class);
break;
case IDREF:
field.annotate(XmlIDREF.class);
break;
}
if (prop.getExpectedMimeType() != null) {
field.annotate2(XmlMimeTypeWriter.class).value(prop.getExpectedMimeType().toString());
}
}
ElementInfoImpl.java 文件源码
项目:cxf-plus
阅读 28
收藏 0
点赞 0
评论 0
private ID calcId() {
// TODO: share code with PropertyInfoImpl
if(reader().hasMethodAnnotation(XmlID.class,method)) {
return ID.ID;
} else
if(reader().hasMethodAnnotation(XmlIDREF.class,method)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
PropertyInfoImpl.java 文件源码
项目:cxf-plus
阅读 25
收藏 0
点赞 0
评论 0
private ID calcId() {
if (seed.hasAnnotation(XmlID.class)) {
// check the type
if (!getIndividualType().equals(nav().ref(String.class)))
parent.builder.reportError(new IllegalAnnotationException(Messages.ID_MUST_BE_STRING.format(getName()), seed));
return ID.ID;
} else if (seed.hasAnnotation(XmlIDREF.class)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
ElementInfoImpl.java 文件源码
项目:OLD-OpenJDK8
阅读 24
收藏 0
点赞 0
评论 0
private ID calcId() {
// TODO: share code with PropertyInfoImpl
if(reader().hasMethodAnnotation(XmlID.class,method)) {
return ID.ID;
} else
if(reader().hasMethodAnnotation(XmlIDREF.class,method)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
PropertyInfoImpl.java 文件源码
项目:OLD-OpenJDK8
阅读 20
收藏 0
点赞 0
评论 0
private ID calcId() {
if(seed.hasAnnotation(XmlID.class)) {
// check the type
if(!nav().isSameType(getIndividualType(), nav().ref(String.class)))
parent.builder.reportError(new IllegalAnnotationException(
Messages.ID_MUST_BE_STRING.format(getName()), seed )
);
return ID.ID;
} else
if(seed.hasAnnotation(XmlIDREF.class)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
BeanGenerator.java 文件源码
项目:OLD-OpenJDK8
阅读 23
收藏 0
点赞 0
评论 0
/**
* Generates {@link XmlJavaTypeAdapter} from {@link PropertyInfo} if necessary.
* Also generates other per-property annotations
* (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary.
*/
public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) {
CAdapter adapter = prop.getAdapter();
if (adapter != null) {
if (adapter.getAdapterIfKnown() == SwaRefAdapterMarker.class) {
field.annotate(XmlAttachmentRef.class);
} else {
// [RESULT]
// @XmlJavaTypeAdapter( Foo.class )
XmlJavaTypeAdapterWriter xjtw = field.annotate2(XmlJavaTypeAdapterWriter.class);
xjtw.value(adapter.adapterType.toType(this, EXPOSED));
}
}
switch (prop.id()) {
case ID:
field.annotate(XmlID.class);
break;
case IDREF:
field.annotate(XmlIDREF.class);
break;
}
if (prop.getExpectedMimeType() != null) {
field.annotate2(XmlMimeTypeWriter.class).value(prop.getExpectedMimeType().toString());
}
}
OnmsIpInterface.java 文件源码
项目:opennmszh
阅读 26
收藏 0
点赞 0
评论 0
/**
* <p>getInterfaceId</p>
*
* @return a {@link java.lang.String} object.
*/
@XmlID
@XmlAttribute(name="id")
@Transient
public String getInterfaceId() {
return getId().toString();
}
DataLinkInterface.java 文件源码
项目:opennmszh
阅读 22
收藏 0
点赞 0
评论 0
/**
* Get the ID as a string. This exists only for XML serialization.
*/
@XmlID
@XmlAttribute(name="id")
@Transient
public String getDataLinkInterfaceId() {
return getId().toString();
}
OnmsNode.java 文件源码
项目:opennmszh
阅读 22
收藏 0
点赞 0
评论 0
/**
* <p>getNodeId</p>
*
* @return a {@link java.lang.String} object.
*/
@XmlID
@XmlAttribute(name="id", required=true)
@Transient
public String getNodeId() {
if (getId() != null) {
return getId().toString();
}
return null;
}
ElementInfoImpl.java 文件源码
项目:openjdk-icedtea7
阅读 23
收藏 0
点赞 0
评论 0
private ID calcId() {
// TODO: share code with PropertyInfoImpl
if(reader().hasMethodAnnotation(XmlID.class,method)) {
return ID.ID;
} else
if(reader().hasMethodAnnotation(XmlIDREF.class,method)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
PropertyInfoImpl.java 文件源码
项目:openjdk-icedtea7
阅读 26
收藏 0
点赞 0
评论 0
private ID calcId() {
if(seed.hasAnnotation(XmlID.class)) {
// check the type
if(!getIndividualType().equals(nav().ref(String.class)))
parent.builder.reportError(new IllegalAnnotationException(
Messages.ID_MUST_BE_STRING.format(getName()), seed )
);
return ID.ID;
} else
if(seed.hasAnnotation(XmlIDREF.class)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
BeanGenerator.java 文件源码
项目:openjdk-icedtea7
阅读 22
收藏 0
点赞 0
评论 0
/**
* Generates {@link XmlJavaTypeAdapter} from {@link PropertyInfo} if necessary.
* Also generates other per-property annotations
* (such as {@link XmlID}, {@link XmlIDREF}, and {@link XmlMimeType} if necessary.
*/
public final void generateAdapterIfNecessary(CPropertyInfo prop, JAnnotatable field) {
CAdapter adapter = prop.getAdapter();
if (adapter != null) {
if (adapter.getAdapterIfKnown() == SwaRefAdapter.class) {
field.annotate(XmlAttachmentRef.class);
} else {
// [RESULT]
// @XmlJavaTypeAdapter( Foo.class )
XmlJavaTypeAdapterWriter xjtw = field.annotate2(XmlJavaTypeAdapterWriter.class);
xjtw.value(adapter.adapterType.toType(this, EXPOSED));
}
}
switch (prop.id()) {
case ID:
field.annotate(XmlID.class);
break;
case IDREF:
field.annotate(XmlIDREF.class);
break;
}
if (prop.getExpectedMimeType() != null) {
field.annotate2(XmlMimeTypeWriter.class).value(prop.getExpectedMimeType().toString());
}
}
Person.java 文件源码
项目:termitaria
阅读 32
收藏 0
点赞 0
评论 0
@XmlID
public String getXmlID() {
if (xmlID == null) {
xmlID = Integer.toString(personId);
}
return xmlID;
}
Organisation.java 文件源码
项目:termitaria
阅读 26
收藏 0
点赞 0
评论 0
@XmlID
public String getXmlID() {
if (xmlID == null) {
xmlID = Integer.toString(organisationId);
}
return xmlID;
}