Package org.apache.clerezza.rdf.core

Examples of org.apache.clerezza.rdf.core.Literal


  public static UriRef createEntityAnnotation(CandidateResource resource,
      EnhancementEngine engine, ContentItem ci, UriRef textAnnotation) {
    UriRef entityAnnotation = EnhancementEngineHelper
        .createEntityEnhancement(ci, engine);
    MGraph model = ci.getMetadata();
    Literal label = new PlainLiteralImpl(resource.label,
        new Language("en"));
    model.add(new TripleImpl(entityAnnotation, DC_RELATION,
        textAnnotation));
    model.add(new TripleImpl(entityAnnotation,
        ENHANCER_ENTITY_LABEL, label));
View Full Code Here


      EnhancementEngine engine, ContentItem ci,
      UriRef textAnnotation, Language language) {
    MGraph model = ci.getMetadata();
    UriRef entityAnnotation = EnhancementEngineHelper
        .createEntityEnhancement(ci, engine);
    Literal label = new PlainLiteralImpl(annotation.surfaceForm.name,
        language);
    model.add(new TripleImpl(entityAnnotation, DC_RELATION,
        textAnnotation));
    model.add(new TripleImpl(entityAnnotation,
        ENHANCER_ENTITY_LABEL, label));
View Full Code Here

        addTriple(convertNonLiteral(subj), new UriRef(pred), convertNonLiteral(obj));
    }

    @Override
    public final void addPlainLiteral(String subj, String pred, String content, String lang) {
        Literal lit;
        if (lang == null || lang.equals("")) {
            lit = new PlainLiteralImpl(content);
        } else {
            lit = new PlainLiteralImpl(content, new Language(lang));
        }
View Full Code Here

TOP

Related Classes of org.apache.clerezza.rdf.core.Literal

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.