Java 类javax.xml.bind.annotation.XmlIDREF 实例源码

项目:OpenJSharp    文件:ElementInfoImpl.java   
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;
    }
}
项目:OpenJSharp    文件:PropertyInfoImpl.java   
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;
    }
}
项目:OpenJSharp    文件:BeanGenerator.java   
/**
 * 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());
    }
}
项目:openjdk-jdk10    文件:BeanGenerator.java   
/**
 * 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());
    }
}
项目:openjdk-jdk10    文件:ElementInfoImpl.java   
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;
    }
}
项目:openjdk-jdk10    文件:PropertyInfoImpl.java   
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;
    }
}
项目:openjdk9    文件:BeanGenerator.java   
/**
 * 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());
    }
}
项目:openjdk9    文件:ElementInfoImpl.java   
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;
    }
}
项目:openjdk9    文件:PropertyInfoImpl.java   
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;
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:ElementInfoImpl.java   
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;
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:PropertyInfoImpl.java   
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;
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:BeanGenerator.java   
/**
 * 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());
    }
}
项目:infobip-open-jdk-8    文件:ElementInfoImpl.java   
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;
    }
}
项目:infobip-open-jdk-8    文件:PropertyInfoImpl.java   
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;
    }
}
项目:infobip-open-jdk-8    文件:BeanGenerator.java   
/**
 * 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());
    }
}
项目:HomeAutomation    文件:Room.java   
@XmlIDREF
public List<Light> getLights() {
    if (lights==null) {
        lights=new ArrayList<Light>();
    }

    return lights;
}
项目:cxf-plus    文件:ElementInfoImpl.java   
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;
    }
}
项目:cxf-plus    文件:PropertyInfoImpl.java   
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;
    }
}
项目:OLD-OpenJDK8    文件:ElementInfoImpl.java   
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;
    }
}
项目:OLD-OpenJDK8    文件:PropertyInfoImpl.java   
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;
    }
}
项目:OLD-OpenJDK8    文件:BeanGenerator.java   
/**
 * 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());
    }
}
项目:opennmszh    文件:OnmsStpInterface.java   
@ManyToOne(optional=false, fetch=FetchType.LAZY)
@JoinColumn(name="nodeId")
@XmlElement(name="nodeId")
@XmlIDREF
public OnmsNode getNode() {
    return m_node;
}
项目:opennmszh    文件:OnmsIpInterface.java   
/**
 * <p>getNode</p>
 *
 * @return a {@link org.opennms.netmgt.model.OnmsNode} object.
 */
@ManyToOne(optional=false, fetch=FetchType.LAZY)
@JoinColumn(name="nodeId")
@XmlElement(name="nodeId")
@XmlIDREF
public OnmsNode getNode() {
    return m_node;
}
项目:opennmszh    文件:OnmsSnmpInterface.java   
/**
 * <p>getNode</p>
 *
 * @return a {@link org.opennms.netmgt.model.OnmsNode} object.
 */
@XmlIDREF
@ManyToOne(optional = false, fetch = FetchType.LAZY)
@JoinColumn(name = "nodeId")
@XmlElement(name="nodeId")
public OnmsNode getNode() {
    return m_node;
}
项目:opennmszh    文件:OnmsEvent.java   
/**
 * <p>getNode</p>
 *
 * @return a {@link org.opennms.netmgt.model.OnmsNode} object.
 */
@XmlIDREF
@XmlElement(name="nodeId")
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="nodeId")
public OnmsNode getNode() {
    return m_node;
}
项目:opennmszh    文件:OnmsLinkState.java   
/**
 * <p>getDataLinkInterface</p>
 *
 * @return a {@link org.opennms.netmgt.model.DataLinkInterface} object.
 */
@XmlIDREF
@OneToOne(fetch=FetchType.LAZY)
@JoinColumn(name="datalinkinterfaceid")
public DataLinkInterface getDataLinkInterface() {
    return m_dataLinkInterface;
}
项目:opennmszh    文件:OnmsIpRouteInterface.java   
@ManyToOne(optional=false, fetch=FetchType.LAZY)
@JoinColumn(name="nodeId")
@XmlElement(name="nodeId")
@XmlIDREF
public OnmsNode getNode() {
    return m_node;
}
项目:opennmszh    文件:OnmsStpNode.java   
@ManyToOne(optional=false, fetch=FetchType.LAZY)
@JoinColumn(name="nodeId")
@XmlElement(name="nodeId")
@XmlIDREF
public OnmsNode getNode() {
    return m_node;
}
项目:opennmszh    文件:OnmsAtInterface.java   
@ManyToOne(optional=false, fetch=FetchType.LAZY)
@JoinColumn(name="nodeId")
@XmlElement(name="nodeId")
@XmlIDREF
public OnmsNode getNode() {
    return m_node;
}
项目:opennmszh    文件:OnmsMonitoredService.java   
/**
 * <p>getIpInterface</p>
 *
 * @return a {@link org.opennms.netmgt.model.OnmsIpInterface} object.
 */
@XmlIDREF
@XmlElement(name="ipInterfaceId")
@ManyToOne(optional=false, fetch=FetchType.LAZY)
@JoinColumn(name="ipInterfaceId")
public OnmsIpInterface getIpInterface() {
    return m_ipInterface;
}
项目:opennmszh    文件:OnmsAssetRecord.java   
/**
 * The node this asset information belongs to.
 *
 * @return a {@link org.opennms.netmgt.model.OnmsNode} object.
 */
@XmlIDREF
@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "nodeId")
public OnmsNode getNode() {
    return m_node;
}
项目:opennmszh    文件:OnmsVlan.java   
/**
 * <p>getNode</p>
 *
 * @return a {@link org.opennms.netmgt.model.OnmsNode} object.
 */
@ManyToOne(optional=false, fetch=FetchType.LAZY)
@JoinColumn(name="nodeId")
@XmlElement(name="nodeId")
@XmlIDREF
public OnmsNode getNode() {
    return m_node;
}
项目:opennmszh    文件:OnmsMapElement.java   
/**
 * <p>Getter for the field <code>map</code>.</p>
 *
 * @return a {@link org.opennms.netmgt.model.OnmsMap} object.
 */
@ManyToOne(optional=false, fetch=FetchType.LAZY)
@JoinColumn(name="mapId")
@XmlIDREF
public OnmsMap getMap() {
    return map;
}
项目:openjdk-icedtea7    文件:ElementInfoImpl.java   
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;
    }
}
项目:openjdk-icedtea7    文件:PropertyInfoImpl.java   
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;
    }
}
项目:openjdk-icedtea7    文件:BeanGenerator.java   
/**
 * 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());
    }
}
项目:OpenNMS    文件:OnmsStpInterface.java   
@ManyToOne(optional=false, fetch=FetchType.LAZY)
@JoinColumn(name="nodeId")
@XmlElement(name="nodeId")
@XmlIDREF
public OnmsNode getNode() {
    return m_node;
}
项目:OpenNMS    文件:OnmsIpInterface.java   
/**
 * <p>getNode</p>
 *
 * @return a {@link org.opennms.netmgt.model.OnmsNode} object.
 */
@ManyToOne(optional=false, fetch=FetchType.LAZY)
@JoinColumn(name="nodeId")
@XmlElement(name="nodeId")
@XmlIDREF
public OnmsNode getNode() {
    return m_node;
}
项目:OpenNMS    文件:OnmsSnmpInterface.java   
/**
 * <p>getNode</p>
 *
 * @return a {@link org.opennms.netmgt.model.OnmsNode} object.
 */
@XmlIDREF
@ManyToOne(optional = false, fetch = FetchType.LAZY)
@JoinColumn(name = "nodeId")
@XmlElement(name="nodeId")
public OnmsNode getNode() {
    return m_node;
}
项目:OpenNMS    文件:OnmsEvent.java   
/**
 * <p>getNode</p>
 *
 * @return a {@link org.opennms.netmgt.model.OnmsNode} object.
 */
@XmlIDREF
@XmlElement(name="nodeId")
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="nodeId")
public OnmsNode getNode() {
    return m_node;
}