[ http://jira.jboss.com/jira/browse/DNA-28?page=comments#action_12416072 ]
Randall Hauch commented on DNA-28:
----------------------------------
You are right in that the sequencers should have access to the path of the node being sequenced, and that path may contain the filename (especially if the node being sequenced is an nt:content node on an nt:file). See DNA-113.
However, since the filename may not exist in the path (if something other than nt:file structure is used), the first priority should be to determine the mime-type from the content.
> Create a sequencer to set the MIME type by processing the file contents
> -----------------------------------------------------------------------
>
> Key: DNA-28
> URL: http://jira.jboss.com/jira/browse/DNA-28
> Project: DNA
> Issue Type: Feature Request
> Components: Sequencers
> Reporter: Randall Hauch
> Priority: Minor
> Fix For: Future Releases
>
>
> This sequencer would process the file contents and set the jcr:mimeType property. One approach might be to do it based upon the file extension. Another might be to process the file content. A third would be to do both and to determine the best MIME type by using simple logic (e.g., weights) to determine if they conflict.
> Some techniques include JMimeMagic (see http://marvinlee.wordpress.com/2007/10/24/check-uploaded-file-mime-type-w...); those summarized http://www.rgagnon.com/javadetails/java-0487.html; and even what's built into the JDK (http://www.simongbrown.com/blog/2003/12/09/getting_mime_types_with_java_n...).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[ http://jira.jboss.com/jira/browse/DNA-28?page=comments#action_12415954 ]
Michael Trezzi commented on DNA-28:
-----------------------------------
Problem I see with sequencers is that they don't get anything close to a filename so guessing mimetype based on file extension is quite hard. That leads to other problems as without file extension, all e.g. OpenOffice documents are application/zip, all source files all text/plain, etc.
Is there any other way how to get the currently sequenced node reference to search for other info?
> Create a sequencer to set the MIME type by processing the file contents
> -----------------------------------------------------------------------
>
> Key: DNA-28
> URL: http://jira.jboss.com/jira/browse/DNA-28
> Project: DNA
> Issue Type: Feature Request
> Components: Sequencers
> Reporter: Randall Hauch
> Priority: Minor
> Fix For: Future Releases
>
>
> This sequencer would process the file contents and set the jcr:mimeType property. One approach might be to do it based upon the file extension. Another might be to process the file content. A third would be to do both and to determine the best MIME type by using simple logic (e.g., weights) to determine if they conflict.
> Some techniques include JMimeMagic (see http://marvinlee.wordpress.com/2007/10/24/check-uploaded-file-mime-type-w...); those summarized http://www.rgagnon.com/javadetails/java-0487.html; and even what's built into the JDK (http://www.simongbrown.com/blog/2003/12/09/getting_mime_types_with_java_n...).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
BasicPath.equals(...) should be improved and corrected
------------------------------------------------------
Key: DNA-80
URL: http://jira.jboss.com/jira/browse/DNA-80
Project: DNA
Issue Type: Bug
Components: SPI
Affects Versions: 0.2
Reporter: Randall Hauch
Fix For: 0.2
The BasicPath.equals(...) implementation currently only considers the List<Segment> value when comparing two paths. This is not correct, as two paths could have the same segments, but if one of them is absolute and the other is relative, the paths should not be considered equal.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Create Eclipse code formatter profile, store in SVN, and document on wiki
-------------------------------------------------------------------------
Key: DNA-99
URL: http://jira.jboss.com/jira/browse/DNA-99
Project: DNA
Issue Type: Task
Reporter: Randall Hauch
Assigned To: Johnny Verhaeg
Fix For: 0.2
We need to get our code formatter and preferences documented and stored so that all developers can use it. It needs to go into SVN, and it also needs to be documented.
See the Seam profile file for reference: http://anonsvn.jboss.org/repos/seam/trunk/eclipse-code-formatter-profile.xml
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Federate schema information from LDAP directories
-------------------------------------------------
Key: DNA-106
URL: http://jira.jboss.com/jira/browse/DNA-106
Project: DNA
Issue Type: Feature Request
Components: Connectors
Reporter: Greg Haber
Priority: Minor
Create a connector for the federation engine that contributes and exposes the schema information for an LDAP directory (probably via JNDI, as it provides standard classes/methods for retrieving schema information - see http://java.sun.com/products/jndi/tutorial/ldap/schema/jndi.html) into the federated repository. As with relational sources, one choice would be whether to import (and copy) the schema structure, or to provide access to it in real time. Since in practice this information rarely changes for a given directory importing is probably more acceptable here than for relational sources.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Most of the project .classpath files are inconsistent with the Maven structure
------------------------------------------------------------------------------
Key: DNA-112
URL: http://jira.jboss.com/jira/browse/DNA-112
Project: DNA
Issue Type: Bug
Components: Common
Affects Versions: 0.1
Reporter: Johnny Verhaeg
Assigned To: Johnny Verhaeg
Priority: Minor
Fix For: 0.2
Each project should be setup to allow for different output folders, with the folder for src/main/java and src/main/resources set to target/classes, and with the folder for src/test/java and src/test/resources set to target/test-classes.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira