public ChainExecution(Graph graph, BlankNodeOrIRI node) { super(null,graph,node); BlankNodeOrIRI ep = ExecutionMetadataHelper.getExecutionPlanNode(graph, node); if(ep != null){ chainName = EnhancementEngineHelper.getString(graph, ep, ExecutionPlan.CHAIN); } else { chainName = null; } }
/** * Replaces all current values of the property for the resource * with the parsed values * @param graph the graph * @param resource the resource * @param property the property * @param value the value */ public static void set(Graph graph, BlankNodeOrIRI resource, IRI property, Collection<RDFTerm> values){ set(graph,resource,property,values,null); }
@Override public int canEnhance(ContentItem ci) throws EngineException { if (ContentItemHelper.getBlob(ci, SUPPORTED_MIMETYPES) != null) { return ENHANCE_ASYNC; } return CANNOT_ENHANCE; }
@Override public Float getEntityRanking() { return EnhancementEngineHelper.get(data, uri, entityRanking, Float.class, lf); } /**
public ExecutionNode(Graph executionPlan, BlankNodeOrIRI node) { this.node = node; this.ep = executionPlan; this.optional = ExecutionPlanHelper.isOptional(ep, node); this.engineName = ExecutionPlanHelper.getEngine(ep, node); }
@Override public int compare(EnhancementEngine engine1, EnhancementEngine engine2) { Integer order1 = getEngineOrder(engine1); Integer order2 = getEngineOrder(engine2); //start with the highest number finish with the lowest ... return order1 == order2?0:order1<order2?1:-1; }
@Override public boolean hasMoreElements() { return retrieveNext(); }
public int canEnhance(ContentItem ci) throws EngineException { if(ContentItemHelper.getBlob(ci, SUPPORTED_MIMTYPES) != null){ return ENHANCE_ASYNC; //Langid now supports async processing } else { return CANNOT_ENHANCE; } }
public ChainExecution(Graph graph, BlankNodeOrIRI node) { super(null,graph,node); BlankNodeOrIRI ep = ExecutionMetadataHelper.getExecutionPlanNode(graph, node); if(ep != null){ chainName = EnhancementEngineHelper.getString(graph, ep, ExecutionPlan.CHAIN); } else { chainName = null; } }
/** * Getter for the started dateTime of an 'em:Execution' * @param graph the graph * @param execution the execution instance * @return the time or <code>null</code> if not present */ public static Date getStarted(Graph graph, BlankNodeOrIRI execution){ return get(graph, execution, ExecutionMetadata.STARTED, Date.class, lf); } /**
public ExecutionNode(Graph executionPlan, BlankNodeOrIRI node) { this.node = node; this.ep = executionPlan; this.optional = ExecutionPlanHelper.isOptional(ep, node); this.engineName = ExecutionPlanHelper.getEngine(ep, node); }
@Override public int compare(EnhancementEngine engine1, EnhancementEngine engine2) { Integer order1 = getEngineOrder(engine1); Integer order2 = getEngineOrder(engine2); //start with the highest number finish with the lowest ... return order1 == order2?0:order1<order2?1:-1; }
/** * States whether can enhance the provided ContentItem. */ @Override public int canEnhance(ContentItem contentItem) throws EngineException { if(getBlob(contentItem, supportedMimeTypes) != null){ return ENHANCE_ASYNC; } else { return CANNOT_ENHANCE; } }
/** * Getter for the completed dateTime of an 'em:Execution' * @param graph the graph * @param execution the execution instance * @return the time or <code>null</code> if not present */ public static Date getCompleted(Graph graph, BlankNodeOrIRI execution){ return get(graph, execution, ExecutionMetadata.COMPLETED, Date.class, lf); } }
public ExecutionNode(Graph executionPlan, BlankNodeOrIRI node) { this.node = node; this.ep = executionPlan; this.optional = ExecutionPlanHelper.isOptional(ep, node); this.engineName = ExecutionPlanHelper.getEngine(ep, node); } /**
@Override public int canEnhance(ContentItem ci) throws EngineException { if(ContentItemHelper.getBlob(ci, SUPPORTED_MIMETYPES) != null){ return ENHANCE_ASYNC; //KeywordLinking now supports async processing } else { return CANNOT_ENHANCE; } }
/** * Getter for the completed dateTime of an 'em:Execution' * @param graph the graph * @param execution the execution instance * @return the time or <code>null</code> if not present */ public static Date getCompleted(Graph graph, BlankNodeOrIRI execution){ return get(graph, execution, ExecutionMetadata.COMPLETED, Date.class, lf); } }
@Override public int canEnhance(ContentItem ci) throws EngineException { if (ContentItemHelper.getBlob(ci, SUPPORTED_MIMETYPES) != null) { return ENHANCE_ASYNC; } return CANNOT_ENHANCE; }
/** * Getter for the started dateTime of an 'em:Execution' * @param graph the graph * @param execution the execution instance * @return the time or <code>null</code> if not present */ public static Date getStarted(Graph graph, BlankNodeOrIRI execution){ return get(graph, execution, ExecutionMetadata.STARTED, Date.class, lf); } /**
public int canEnhance(ContentItem ci) { if(ContentItemHelper.getBlob(ci, SUPPORTED_MIMETYPES) != null){ return ENHANCE_ASYNC; //the ZEMANTA engine now supports async processing! } else { return CANNOT_ENHANCE; } }