public long getLength() { Long length = getAttributeValue(LENGTH); return length == null ? -1 : length; }
/** * Sets the HTTP etag for the referenced content. A value of {@code null} * indicates it is unknown. * * @param etag HTTP etag value */ public void setEtag(String etag) { setAttributeValue(ETAG, etag); } }
@Override public boolean startElement(XmlWriter xw, Element parent, Element e, ElementMetadata<?, ?> metadata) throws IOException { if (!(e instanceof OutOfLineContent)) { return super.startElement(xw, parent, e, metadata); } OutOfLineContent content = (OutOfLineContent) e; ContentType type = content.getMimeType(); URI src = content.getSrc(); generateEnclosure(xw, type == null ? null : type.getMediaType(), src == null ? null : src.toString(), content.getLength()); return false; }
/** * Gets the external URI associated with this out-of-line content. * * @deprecated Use {@link #getSrc()} instead. * * @return external URI */ @Deprecated public String getUri() { URI uri = getSrc(); if (uri == null) { return null; } return uri.toString(); }
/** * Specifies the external URI. * * @deprecated Use {@link #setSrc(URI)} instead. * * @param v external URI */ @Deprecated public void setUri(String v) { try { setSrc(v == null ? null : new URI(v)); } catch (URISyntaxException e) { throw new RuntimeException(e); } }
OutOfLineContent.registerMetadata(registry);
@Override public boolean startElement(XmlWriter xw, Element parent, Element e, ElementMetadata<?, ?> metadata) throws IOException { if (!(e instanceof OutOfLineContent)) { return super.startElement(xw, parent, e, metadata); } OutOfLineContent content = (OutOfLineContent) e; ContentType type = content.getMimeType(); URI src = content.getSrc(); generateEnclosure(xw, type == null ? null : type.getMediaType(), src == null ? null : src.toString(), content.getLength()); return false; }
/** * Gets the external URI associated with this out-of-line content. * * @deprecated Use {@link #getSrc()} instead. * * @return external URI */ @Deprecated public String getUri() { URI uri = getSrc(); if (uri == null) { return null; } return uri.toString(); }
/** * Specifies the external URI. * * @deprecated Use {@link #setSrc(URI)} instead. * * @param v external URI */ @Deprecated public void setUri(String v) { try { setSrc(v == null ? null : new URI(v)); } catch (URISyntaxException e) { throw new RuntimeException(e); } }
OutOfLineContent.registerMetadata(registry);
@Override public boolean startElement(XmlWriter xw, Element parent, Element e, ElementMetadata<?, ?> metadata) throws IOException { if (!(e instanceof OutOfLineContent)) { return super.startElement(xw, parent, e, metadata); } OutOfLineContent content = (OutOfLineContent) e; ContentType type = content.getMimeType(); URI src = content.getSrc(); generateEnclosure(xw, type == null ? null : type.getMediaType(), src == null ? null : src.toString(), content.getLength()); return false; }
/** * Sets the HTTP etag for the referenced content. A value of {@code null} * indicates it is unknown. * * @param etag HTTP etag value */ public void setEtag(String etag) { setAttributeValue(ETAG, etag); } }
public long getLength() { Long length = getAttributeValue(LENGTH); return length == null ? -1 : length; }
/** * Gets the external URI associated with this out-of-line content. * * @deprecated Use {@link #getSrc()} instead. * * @return external URI */ @Deprecated public String getUri() { URI uri = getSrc(); if (uri == null) { return null; } return uri.toString(); }
/** * Specifies the external URI. * * @deprecated Use {@link #setSrc(URI)} instead. * * @param v external URI */ @Deprecated public void setUri(String v) { try { setSrc(v == null ? null : new URI(v)); } catch (URISyntaxException e) { throw new RuntimeException(e); } }
OutOfLineContent.registerMetadata(registry);
/** * Sets the HTTP etag for the referenced content. A value of {@code null} * indicates it is unknown. * * @param etag HTTP etag value */ public void setEtag(String etag) { setAttributeValue(ETAG, etag); } }
/** * Returns the HTTP etag for the referenced content or {@code null} if * unknown. */ public String getEtag() { return getAttributeValue(ETAG); }
/** Specifies the external URI. */ public void setSrc(URI v) { setAttributeValue(SRC, v); }
/** * Returns the HTTP etag for the referenced content or {@code null} if * unknown. */ public String getEtag() { return getAttributeValue(ETAG); }