Class XmlReader.FileDescription
- java.lang.Object
-
- org.apache.sling.jcr.contentloader.internal.readers.XmlReader.FileDescription
-
- Enclosing class:
- XmlReader
protected static final class XmlReader.FileDescription extends Object
Represents a reference to a file that is to be loaded into the repository. The file is referenced by an XML element named<nt:file>
, with the attributessrc
,mimeType
andlastModified
.
Example:<nt:file src="../../image.png" mimeType="image/png" lastModified="1977-06-01T07:00:00+0100" />
The date format forlastModified
isyyyy-MM-dd'T'HH:mm:ssZ
. ThelastModified
attribute is optional. If missing, the last modified date reported by the filesystem will be used.
-
-
Field Summary
Fields Modifier and Type Field Description static DateFormat
DATE_FORMAT
static XmlReader.FileDescription
SHARED
-
Constructor Summary
Constructors Modifier Constructor Description protected
FileDescription()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
void
create(ContentCreator creator)
Long
getLastModified()
String
getMimeType()
URL
getUrl()
void
setBaseLocation(URL xmlLocation)
void
setValues(XmlReader.AttributeMap attributes)
-
-
-
Field Detail
-
SHARED
public static XmlReader.FileDescription SHARED
-
DATE_FORMAT
public static final DateFormat DATE_FORMAT
-
-
Method Detail
-
setValues
public void setValues(XmlReader.AttributeMap attributes) throws MalformedURLException, ParseException
- Throws:
MalformedURLException
ParseException
-
create
public void create(ContentCreator creator) throws javax.jcr.RepositoryException, IOException
- Throws:
javax.jcr.RepositoryException
IOException
-
getUrl
public URL getUrl()
-
getMimeType
public String getMimeType()
-
getLastModified
public Long getLastModified()
-
clear
public void clear()
-
setBaseLocation
public void setBaseLocation(URL xmlLocation)
-
-