Examples of XLink


Examples of org.apache.sis.xml.XLink

     * not test if an explicit {@code xlink:href} identifier exists - this check must be done by
     * the caller <strong>before</strong> to invoke this method, by invoking one of the getter
     * methods defined in the {@link IdentifierMapAdapter} super-class.
     */
    private String getHRef() {
        final XLink link = super.getSpecialized(IdentifierSpace.XLINK);
        if (link != null) {
            final URI href = link.getHRef();
            if (href != null) {
                return href.toString();
            }
        }
        return null;
View Full Code Here

Examples of org.apache.sis.xml.XLink

     * cases where the {@code href} is parsable as a {@link URI}, and use the value associated
     * to the {@code HREF} key only as a fallback when the string can not be parsed.
     */
    private URI setHRef(final URI href) {
        URI old = super.putSpecialized(IdentifierSpace.HREF, null);
        XLink link = super.getSpecialized(IdentifierSpace.XLINK);
        if (link != null) {
            if (old == null) {
                old = link.getHRef();
            }
            link.setHRef(href);
        } else if (href != null) {
            link = new XLink();
            link.setHRef(href);
            super.putSpecialized(IdentifierSpace.XLINK, link);
        }
        return old;
    }
View Full Code Here

Examples of org.apache.sis.xml.XLink

        if (super.containsKey(authority)) {
            return true;
        }
        switch (specialCase(authority)) {
            case NonMarshalledAuthority.HREF: {
                final XLink link = super.getSpecialized(IdentifierSpace.XLINK);
                return (link != null) && (link.getHRef() != null);
            }
        }
        return false;
    }
View Full Code Here

Examples of org.apache.sis.xml.XLink

    public <T> T getSpecialized(final IdentifierSpace<T> authority) {
        T value = super.getSpecialized(authority);
        if (value == null) {
            switch (specialCase(authority)) {
                case NonMarshalledAuthority.HREF: {
                    final XLink link = super.getSpecialized(IdentifierSpace.XLINK);
                    if (link != null) {
                        value = (T) link.getHRef();
                    }
                    break;
                }
            }
        }
View Full Code Here

Examples of org.apache.sis.xml.XLink

             *
             * We do not try to parse UUID or XLink objects from String because it should be the job of
             * org.apache.sis.internal.jaxb.IdentifierMapWithSpecialCases.put(Citation, String).
             */
            final IdentifierMap map = ((IdentifiedObject) value).getIdentifierMap();
            XLink  link = map.getSpecialized(IdentifierSpace.XLINK);
            UUID   uuid = map.getSpecialized(IdentifierSpace.UUID);
            if (uuid != null || link != null) {
                final Context           context  = Context.current();
                final ReferenceResolver resolver = Context.resolver(context);
                final Class<BoundType>  type     = getBoundType();
View Full Code Here

Examples of org.apache.sis.xml.XLink

    private XLink xlink(final boolean create) {
        final ObjectReference ref = reference(create);
        if (ref == null) {
            return null;
        }
        XLink xlink = ref.xlink;
        if (create && xlink == null) {
            ref.xlink = xlink = new XLink();
            xlink.setType(XLink.Type.SIMPLE); // The "simple" type is fixed in the "gco" schema.
        }
        return xlink;
    }
View Full Code Here

Examples of org.apache.sis.xml.XLink

     * @return the current value, or {@code null} if none.
     * @category xlink
     */
    @XmlAttribute(name = "href", namespace = Namespaces.XLINK)
    public final String getHRef() {
        final XLink link = xlink(false);
        return (link != null) ? toString(link.getHRef()) : null;
    }
View Full Code Here

Examples of org.apache.sis.xml.XLink

     * @return the current value, or {@code null} if none.
     * @category xlink
     */
    @XmlAttribute(name = "role", namespace = Namespaces.XLINK)
    public final String getRole() {
        final XLink link = xlink(false);
        return (link != null) ? toString(link.getRole()) : null;
    }
View Full Code Here

Examples of org.apache.sis.xml.XLink

     * @return the current value, or {@code null} if none.
     * @category xlink
     */
    @XmlAttribute(name = "arcrole", namespace = Namespaces.XLINK)
    public final String getArcRole() {
        final XLink link = xlink(false);
        return (link != null) ? toString(link.getArcRole()) : null;
    }
View Full Code Here

Examples of org.apache.sis.xml.XLink

     * @return the current value, or {@code null} if none.
     * @category xlink
     */
    @XmlAttribute(name = "title", namespace = Namespaces.XLINK)
    public final String getTitle() {
        final XLink link = xlink(false);
        return (link != null) ? StringAdapter.toString(link.getTitle()) : null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.