/** * Sets a human-readable string with a short description for the arc. * * @param title a human-readable string with a short description for the arc, or {@code null} if none. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitely set}. * and that type does not allow the {@code "title"} attribute. * * @category semantic */ public void setTitle(final InternationalString title) throws IllegalStateException { canWrite(0x10, "title", title); this.title = title; }
/** * Sets the desired presentation of the ending resource on traversal from the starting resource. * * @param show the desired presentation of the ending resource, or {@code null} if unspecified. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitely set}. * and that type does not allow the {@code "show"} attribute. * * @category behavior */ public void setShow(final Show show) throws IllegalStateException { canWrite(0x20, "show", show); this.show = show; }
/** * Sets an identification of the target of a {@code from} or {@code to} attribute. * * @param label an identification of the target of a {@code from} or {@code to} attribute, or {@code null}. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitely set}. * and that type does not allow the {@code "label"} attribute. * * @category traversal */ public void setLabel(final String label) throws IllegalStateException { canWrite(0x80, "label", label); this.label = label; }
/** * Sets the starting resource. The value must correspond to the same value for some * {@code label} attribute. * * @param from the starting resource, or {@code null}. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitely set}. * and that type does not allow the {@code "from"} attribute. * * @category traversal */ public void setFrom(final String from) throws IllegalStateException { canWrite(0x100, "from", from); this.from = from; }
/** * Sets the ending resource. The value must correspond to the same value for some * {@code label} attribute. * * @param to the ending resource, or {@code null}. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitely set}. * and that type does not allow the {@code "to"} attribute. * * @category traversal */ public void setTo(final String to) throws IllegalStateException { canWrite(0x200, "to", to); this.to = to; }
/** * Sets the URN to a resources. * * @param href a URN to a resources, or {@code null} if none. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitely set}. * and that type does not allow the {@code "href"} attribute. * * @category locator */ public void setHRef(final URI href) throws IllegalStateException { canWrite(0x2, "href", href); this.href = href; }
/** * Sets a URI reference for some description of the arc role. * * @param arcrole a URI reference for some description of the arc role, or {@code null} if none. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitely set}. * and that type does not allow the {@code "arcrole"} attribute. * * @category semantic */ public void setArcRole(final URI arcrole) throws IllegalStateException { canWrite(0x8, "arcrole", arcrole); this.arcrole = arcrole; }
/** * Sets an identification of the target of a {@code from} or {@code to} attribute. * * @param label an identification of the target of a {@code from} or {@code to} attribute, or {@code null}. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitly set}. * and that type does not allow the {@code "label"} attribute. * * @category traversal */ public void setLabel(final String label) throws IllegalStateException { canWrite(0x80, "label", label); this.label = label; }
/** * Sets the URI reference for some description of the arc role. * * @param role a URI reference for some description of the arc role, or {@code null} if none. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitely set}. * and that type does not allow the {@code "role"} attribute. * * @category semantic */ public void setRole(final URI role) throws IllegalStateException { canWrite(0x4, "role", role); this.role = role; }
/** * Sets the desired presentation of the ending resource on traversal from the starting resource. * * @param show the desired presentation of the ending resource, or {@code null} if unspecified. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitly set}. * and that type does not allow the {@code "show"} attribute. * * @category behavior */ public void setShow(final Show show) throws IllegalStateException { canWrite(0x20, "show", show); this.show = show; }
/** * Sets the desired timing of traversal from the starting resource to the ending resource. * * @param actuate the desired timing of traversal from the starting resource to the ending resource, * or {@code null} if unspecified. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitely set}. * and that type does not allow the {@code "actuate"} attribute. * * @category behavior */ public void setActuate(final Actuate actuate) throws IllegalStateException { canWrite(0x40, "actuate", actuate); this.actuate = actuate; }
/** * Sets the URN to a resources. * * @param href a URN to a resources, or {@code null} if none. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitly set}. * and that type does not allow the {@code "href"} attribute. * * @category locator */ public void setHRef(final URI href) throws IllegalStateException { canWrite(0x2, "href", href); this.href = href; }
/** * Sets the URI reference for some description of the arc role. * * @param role a URI reference for some description of the arc role, or {@code null} if none. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitly set}. * and that type does not allow the {@code "role"} attribute. * * @category semantic */ public void setRole(final URI role) throws IllegalStateException { canWrite(0x4, "role", role); this.role = role; }
/** * Sets a URI reference for some description of the arc role. * * @param arcrole a URI reference for some description of the arc role, or {@code null} if none. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitly set}. * and that type does not allow the {@code "arcrole"} attribute. * * @category semantic */ public void setArcRole(final URI arcrole) throws IllegalStateException { canWrite(0x8, "arcrole", arcrole); this.arcrole = arcrole; }
/** * Sets a human-readable string with a short description for the arc. * * @param title a human-readable string with a short description for the arc, or {@code null} if none. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitly set}. * and that type does not allow the {@code "title"} attribute. * * @category semantic */ public void setTitle(final InternationalString title) throws IllegalStateException { canWrite(0x10, "title", title); this.title = title; }
/** * Sets the desired timing of traversal from the starting resource to the ending resource. * * @param actuate the desired timing of traversal from the starting resource to the ending resource, * or {@code null} if unspecified. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitly set}. * and that type does not allow the {@code "actuate"} attribute. * * @category behavior */ public void setActuate(final Actuate actuate) throws IllegalStateException { canWrite(0x40, "actuate", actuate); this.actuate = actuate; }
/** * Sets the starting resource. The value must correspond to the same value for some * {@code label} attribute. * * @param from the starting resource, or {@code null}. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitly set}. * and that type does not allow the {@code "from"} attribute. * * @category traversal */ public void setFrom(final String from) throws IllegalStateException { canWrite(0x100, "from", from); this.from = from; }
/** * Sets the ending resource. The value must correspond to the same value for some * {@code label} attribute. * * @param to the ending resource, or {@code null}. * @throws UnsupportedOperationException if this {@code xlink} is unmodifiable. * @throws IllegalStateException if the link type {@linkplain #setType has been explicitly set}. * and that type does not allow the {@code "to"} attribute. * * @category traversal */ public void setTo(final String to) throws IllegalStateException { canWrite(0x200, "to", to); this.to = to; }
/** * Sets the type of link. Any value different than {@link org.apache.sis.xml.XLink.Type#AUTO * Type.AUTO} (including {@code null}) will overwrite the value inferred automatically by * {@link #getType()}. A {@code AUTO} value will enable automatic type detection. * * @param type the new type of link, or {@code null} if none. */ public void setType(final Type type) { canWrite(0x1, "type", "type"); // We want a non-null value in all cases. if (type != null && (fieldMask() & ~type.fieldMask) != 0) { throw new IllegalStateException(Errors.format(Errors.Keys.InconsistentAttribute_2, "type", type.identifier())); } this.type = type; }
/** * Sets the type of link. Any value different than {@link org.apache.sis.xml.XLink.Type#AUTO * Type.AUTO} (including {@code null}) will overwrite the value inferred automatically by * {@link #getType()}. A {@code AUTO} value will enable automatic type detection. * * @param type the new type of link, or {@code null} if none. */ public void setType(final Type type) { canWrite(0x1, "type", "type"); // We want a non-null value in all cases. if (type != null && (fieldMask() & ~type.fieldMask) != 0) { throw new IllegalStateException(Errors.format(Errors.Keys.InconsistentAttribute_2, "type", type.identifier())); } this.type = type; }