Package org.apache.stanbol.enhancer.servicesapi

Examples of org.apache.stanbol.enhancer.servicesapi.InvalidContentException


        }
        String text;
        try {
            text = ContentItemHelper.getText(contentPart.getValue());
        } catch (IOException e) {
            throw new InvalidContentException(String.format(
                "Unable to extract " + " textual content from ContentPart %s of ContentItem %s!",
                contentPart.getKey(), ci.getUri()), e);
        }
        if (text.trim().isEmpty()) {
            log.warn(
View Full Code Here


        }
        String text;
        try {
            text = ContentItemHelper.getText(contentPart.getValue());
        } catch (IOException e) {
            throw new InvalidContentException(this, ci, e);
        }

        MGraph calaisModel = getCalaisAnalysis(text, contentPart.getValue().getMimeType());
        if (calaisModel != null) {
            //Acquire a write lock on the ContentItem when adding the enhancements
View Full Code Here

    }
    String text;
    try {
      text = ContentItemHelper.getText(contentPart.getValue());
    } catch (IOException e) {
      throw new InvalidContentException(this, ci, e);
    }
    if (text.trim().length() == 0) {
      log.info("No text contained in ContentPart {} of ContentItem {}",
          contentPart.getKey(),ci.getUri());
      return;
View Full Code Here

                    + "EnhancementJobManager!");
            }
            try {
                text = ContentItemHelper.getText(contentPart.getValue());
            } catch (IOException e) {
                throw new InvalidContentException(this, ci, e);
            }
            if (text.trim().length() == 0) {
                // TODO: make the length of the data a field of the ContentItem
                // interface to be able to filter out empty items in the canEnhance
                // method
View Full Code Here

    }
    String text = "";
    try {
      text = ContentItemHelper.getText(contentPart.getValue());
    } catch (IOException e) {
      throw new InvalidContentException(this, ci, e);
    }
    if (text.trim().length() == 0) {
      log.info("No text contained in ContentPart {" + contentPart.getKey() + "} of ContentItem {" + ci.getUri() + "}");
      return;
    }
View Full Code Here

        }
        String text;
        try {
            text = ContentItemHelper.getText(contentPart.getValue());
        } catch (IOException e) {
            throw new InvalidContentException(this, ci, e);
        }
        if (text.trim().length() == 0) {
            log.warn("ContentPart {} of ContentItem {} does not contain any text to enhance",
                contentPart.getKey(),ci.getUri());
            return;
View Full Code Here

    }
    String text;
    try {
      text = ContentItemHelper.getText(contentPart.getValue());
    } catch (IOException e) {
      throw new InvalidContentException(this, ci, e);
    }
    if (text.trim().length() == 0) {
      log.info("No text contained in ContentPart {" + contentPart.getKey() + "} of ContentItem {" + ci.getUri() + "}");
      return;
    }
View Full Code Here

        }
        String text;
        try {
            text = ContentItemHelper.getText(contentPart.getValue());
        } catch (IOException e) {
            throw new InvalidContentException(this, ci, e);
        }
        JCas jcas;
        try {
            logger.info("Processing text with UIMA AE...");
            jcas = processText(text);
View Full Code Here

        }
        String text;
        try {
            text = ContentItemHelper.getText(contentPart.getValue());
        } catch (IOException e) {
            throw new InvalidContentException(String.format("Unable to extract "
                +" text from ContentPart %s of ContentItem %s!",
                contentPart.getKey(),ci.getUri()),e);
        }
        if (text.trim().length() == 0) {
            // TODO: make the length of the data a field of the ContentItem
View Full Code Here

    }
    String text = "";
    try {
      text = ContentItemHelper.getText(contentPart.getValue());
    } catch (IOException e) {
      throw new InvalidContentException(this, ci, e);
    }
    if (text.trim().length() == 0) {
      log.info("No text contained in ContentPart {"+contentPart.getKey()+"} of ContentItem {"+ci.getUri()+"}");
      return;
    }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.enhancer.servicesapi.InvalidContentException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.