Closed reckart closed 9 years ago
This is how ResourceCollectionReaderBase does it.
String qualifier = aQualifier != null ? "#"+aQualifier : "";
// Set the document metadata
DocumentMetaData docMetaData = new DocumentMetaData(aCas.getJCas());
docMetaData.setDocumentTitle(new File(aResource.getPath()).getName());
docMetaData.setDocumentUri(aResource.getResolvedUri().toString()+qualifier);
docMetaData.setDocumentId(aResource.getPath()+qualifier);
if (aResource.getBase() != null) {
docMetaData.setDocumentBaseUri(aResource.getResolvedBase());
docMetaData.setCollectionId(aResource.getResolvedBase()+qualifier);
}
It also looks strange here that the qualifier is added to the collectionId as well
as to the documentId. It should only be added to the documentId I think.
And FileSetCollectionReaderBase should be changed to use "path" as the collectionId
I suppose.
Changing this could break existing user code though.
Original issue reported on code.google.com by richard.eckart
on 2012-04-12 10:20:03
Removed qualifier from collectionId" /Users/bluefire/UKP/Workspaces/dkpro
---
Committed revision 648.
Original issue reported on code.google.com by richard.eckart
on 2012-05-12 12:56:26
Original issue reported on code.google.com by
richard.eckart
on 2012-04-12 10:16:50