Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void allResolveCsvExtension() {

@Test
public void allResolveDocxExtension() {
assertAllResolveFromFileName("something.docx", MediaType.APPLICATION_OPENXML_WORDPROCESSING, new String[] {"docx"}, StorageType.XML);
assertAllResolveFromFileName("something.docx", MediaType.APPLICATION_OPENXML_WORDPROCESSING, new String[] {"docx"}, StorageType.BINARY);
}

@Test
Expand Down Expand Up @@ -170,17 +170,17 @@ public void allResolveNcxExtension() {

@Test
public void allResolveOdtExtension() {
assertAllResolveFromFileName("something.odt", MediaType.APPLICATION_OPENDOCUMENT_TEXT, new String[] {"odt"}, StorageType.XML);
assertAllResolveFromFileName("something.odt", MediaType.APPLICATION_OPENDOCUMENT_TEXT, new String[] {"odt"}, StorageType.BINARY);
}

@Test
public void allResolveOdpExtension() {
assertAllResolveFromFileName("something.odp", MediaType.APPLICATION_OPENDOCUMENT_PRESENTATION, new String[] {"odp"}, StorageType.XML);
assertAllResolveFromFileName("something.odp", MediaType.APPLICATION_OPENDOCUMENT_PRESENTATION, new String[] {"odp"}, StorageType.BINARY);
}

@Test
public void allResolveOdsExtension() {
assertAllResolveFromFileName("something.ods", MediaType.APPLICATION_OPENDOCUMENT_SPREADSHEET, new String[] {"ods"}, StorageType.XML);
assertAllResolveFromFileName("something.ods", MediaType.APPLICATION_OPENDOCUMENT_SPREADSHEET, new String[] {"ods"}, StorageType.BINARY);
}

@Test
Expand All @@ -195,7 +195,7 @@ public void allResolvePngExtension() {

@Test
public void allResolvePptxExtension() {
assertAllResolveFromFileName("something.pptx", MediaType.APPLICATION_OPENXML_PRESENTATION, new String[] {"pptx"}, StorageType.XML);
assertAllResolveFromFileName("something.pptx", MediaType.APPLICATION_OPENXML_PRESENTATION, new String[] {"pptx"}, StorageType.BINARY);
}

@Test
Expand Down Expand Up @@ -240,7 +240,7 @@ public void allResolveXhtmlExtension() {

@Test
public void allResolveXlsxExtension() {
assertAllResolveFromFileName("something.xlsx", MediaType.APPLICATION_OPENXML_SPREADSHEET, new String[] {"xlsx"}, StorageType.XML);
assertAllResolveFromFileName("something.xlsx", MediaType.APPLICATION_OPENXML_SPREADSHEET, new String[] {"xlsx"}, StorageType.BINARY);
}

@Test
Expand All @@ -265,7 +265,7 @@ public void allResolveCsvIdentifier() {

@Test
public void allResolveDocxIdentifier() {
assertAllResolveFromIdentifier(MediaType.APPLICATION_OPENXML_WORDPROCESSING, new String[] {"docx"}, StorageType.XML);
assertAllResolveFromIdentifier(MediaType.APPLICATION_OPENXML_WORDPROCESSING, new String[] {"docx"}, StorageType.BINARY);
}

@Test
Expand Down Expand Up @@ -335,17 +335,17 @@ public void allResolveNcxIdentifier() {

@Test
public void allResolveOdtIdentifier() {
assertAllResolveFromIdentifier(MediaType.APPLICATION_OPENDOCUMENT_TEXT, new String[] {"odt"}, StorageType.XML);
assertAllResolveFromIdentifier(MediaType.APPLICATION_OPENDOCUMENT_TEXT, new String[] {"odt"}, StorageType.BINARY);
}

@Test
public void allResolveOdpIdentifier() {
assertAllResolveFromIdentifier(MediaType.APPLICATION_OPENDOCUMENT_PRESENTATION, new String[] {"odp"}, StorageType.XML);
assertAllResolveFromIdentifier(MediaType.APPLICATION_OPENDOCUMENT_PRESENTATION, new String[] {"odp"}, StorageType.BINARY);
}

@Test
public void allResolveOdsIdentifier() {
assertAllResolveFromIdentifier(MediaType.APPLICATION_OPENDOCUMENT_SPREADSHEET, new String[] {"ods"}, StorageType.XML);
assertAllResolveFromIdentifier(MediaType.APPLICATION_OPENDOCUMENT_SPREADSHEET, new String[] {"ods"}, StorageType.BINARY);
}

@Test
Expand All @@ -360,7 +360,7 @@ public void allResolvePngIdentifier() {

@Test
public void allResolvePptxIdentifier() {
assertAllResolveFromIdentifier(MediaType.APPLICATION_OPENXML_PRESENTATION, new String[] {"pptx"}, StorageType.XML);
assertAllResolveFromIdentifier(MediaType.APPLICATION_OPENXML_PRESENTATION, new String[] {"pptx"}, StorageType.BINARY);
}

@Test
Expand Down Expand Up @@ -400,7 +400,7 @@ public void allResolveXhtmlIdentifier() {

@Test
public void allResolveXlsxIdentifier() {
assertAllResolveFromIdentifier(MediaType.APPLICATION_OPENXML_SPREADSHEET, new String[] {"xlsx"}, StorageType.XML);
assertAllResolveFromIdentifier(MediaType.APPLICATION_OPENXML_SPREADSHEET, new String[] {"xlsx"}, StorageType.BINARY);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,13 @@
<storage type="XML">
<media-type match="full">application/xml</media-type>
<media-type match="full">text/xml</media-type>

<!-- NOTE(AR) OpenDocument files, and Office Open XML files are Zip files, and must therefore be stored as binary documents until we add Zip view support. -->
<!--
<media-type match="starts-with">application/vnd.oasis.opendocument.</media-type>
<media-type match="starts-with">application/vnd.openxmlformats-</media-type>
-->

<media-type match="pattern">[^+]+\+xml$</media-type>
</storage>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,18 @@
<storage type="XML">
<media-type match="full">application/xml</media-type>
<media-type match="full">text/xml</media-type>

<!-- NOTE(AR) OpenDocument files, and Office Open XML files are Zip files, and must therefore be stored as binary documents until we add Zip view support. -->
<!--
<media-type match="starts-with">application/vnd.oasis.opendocument.</media-type>
<media-type match="starts-with">application/vnd.openxmlformats-</media-type>
-->

<media-type match="pattern">[^+]+\+xml$</media-type>

<!-- NOTE(AR) This is for backwards compatibility with eXist-db, it should likely be removed in future as it is not really correct -->
<media-type match="full">text/html</media-type>

</storage>

</media-type-mappings>
</media-type-mappings>