Package org.apache.sis.xml

Examples of org.apache.sis.xml.XLink


                reference = reason.toString();
            }
        }
        if (metadata instanceof IdentifiedObject) {
            final IdentifierMap map = ((IdentifiedObject) metadata).getIdentifierMap();
            XLink  link = map.getSpecialized(IdentifierSpace.XLINK);
            UUID   uuid = map.getSpecialized(IdentifierSpace.UUID);
            String anyUUID = (uuid != null) ? uuid.toString() : map.get(IdentifierSpace.UUID);
            if (anyUUID != null || link != null) {
                final Context           context  = Context.current();
                final ReferenceResolver resolver = Context.resolver(context);
View Full Code Here


    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

     * @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

     * @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

     * @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

     * @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

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

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

         */
        if (!(value instanceof Anchor)) {
            final String key = CharSequences.trimWhitespaces(value.toString());
            if (key != null && !key.isEmpty()) {
                final Context context = Context.current();
                final XLink linkage = Context.resolver(context).anchor(context, value, key);
                if (linkage != null) {
                    if (linkage instanceof Anchor) {
                        value = (Anchor) linkage;
                    } else {
                        value = new Anchor(linkage, key);
View Full Code Here

        if (string == null || string.isEmpty()) {
            return null;
        }
        CharSequence value = string;
        final Context context = Context.current();
        final XLink linkage = Context.resolver(context).anchor(context, object, string);
        if (linkage != null) {
            if (linkage instanceof Anchor) {
                value = (Anchor) linkage;
            } else {
                value = new Anchor(linkage, string);
View Full Code Here

TOP

Related Classes of org.apache.sis.xml.XLink

Copyright © 2018 www.massapicom. 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.