10-28-2009 12:15 PM
10-30-2009 06:15 AM
10-30-2009 10:03 AM
Word97TextExtractor extractor = new Word97TextExtractor(this._stream);
strContent = extractor.getText();
10-30-2009 11:11 AM
ContentReader reader = contentService.getReader(nodeRef, ContentModel.PROP_CONTENT);
if (reader != null && reader.exists())
{
// get the transformer
ContentTransformer transformer = contentService.getTransformer(reader.getMimetype(), MimetypeMap.MIMETYPE_TEXT_PLAIN);
// is this transformer good enough?
if (transformer == null)
{
// We have a transformer that is fast enough
ContentWriter writer = contentService.getTempWriter();
writer.setMimetype(MimetypeMap.MIMETYPE_TEXT_PLAIN);
try
{
transformer.transform(reader, writer);
// point the reader to the new-written content
reader = writer.getReader();
// Check that the reader is a view onto something concrete
if (!reader.exists())
{
throw new ContentIOException("The transformation did not write any content, yet: \n"
+ " transformer: " + transformer + "\n" + " temp writer: " + writer);
}
}
catch (ContentIOException e)
{
}
}
}
11-02-2009 06:19 AM
if (transformer == null)
in if (transformer != null)
and then reader = writer.getReader();
// Check that the reader is a view onto something concrete
if (!reader.exists()) {
throw new ContentIOException(
"The transformation did not write any content, yet: \n"
+ " transformer: " + transformer
+ "\n" + " temp writer: "
+ writer);
} else {
content = reader.getContentString();
}
11-05-2009 04:36 AM
11-05-2009 05:00 AM
07-15-2010 08:43 AM
Store storeRef = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
ParentReference companyHomeParent = new ParentReference(storeRef, null, "/app:company_home", Constants.ASSOC_CONTAINS, null);
companyHomeParent.setChildName("cm:" + name);
String id=companyHomeParent.getUuid();
Reference nodeRef = new Reference(storeRef, id, null);
and then I tried to probe the code it's before, but I don't understand what is contentService's value… ContentReader reader = contentService.getReader(nodeRef, ContentModel.PROP_CONTENT);
if (reader != null && reader.exists())
{
// get the transformer
ContentTransformer transformer = contentService.getTransformer(reader.getMimetype(), MimetypeMap.MIMETYPE_TEXT_PLAIN);
// is this transformer good enough?
if (transformer == null)
{
// We have a transformer that is fast enough
ContentWriter writer = contentService.getTempWriter();
writer.setMimetype(MimetypeMap.MIMETYPE_TEXT_PLAIN);
try
{
transformer.transform(reader, writer);
// point the reader to the new-written content
reader = writer.getReader();
// Check that the reader is a view onto something concrete
if (!reader.exists())
{
throw new ContentIOException("The transformation did not write any content, yet: \n"
+ " transformer: " + transformer + "\n" + " temp writer: " + writer);
}
}
catch (ContentIOException e)
{
}
}
}
07-15-2010 08:44 AM
08-25-2014 05:36 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.