Examples of asLiteral()


Examples of com.hp.hpl.jena.rdf.model.RDFNode.asLiteral()

            RDFNode langNode = getSingularProperty(literalGenerator, DMRM.literalLanguage);
            if (langNode != null)
            {
                if (langNode.isLiteral())
                {
                    languageTag = langNode.asLiteral().getLexicalForm();
                } else {
                    log.warn("Found a property 'literalLanguage', but its "
                            + "object is not a literal! Ignoring it.");
                }
            }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asLiteral()

            {
                boolean useDSpaceLang = false;
                if (dspaceLangNode.isLiteral())
                {
                    try {
                        useDSpaceLang = dspaceLangNode.asLiteral().getBoolean();
                    }
                    catch (Exception ex)
                    {
                        /*
                         * nothing to do here.
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asLiteral()

                        + "Ignoring this result.");
                return null;
            }

            String matcher = matcherNode.asLiteral().getLexicalForm();
            String replacement = replacementNode.asLiteral().getLexicalForm();
            try
            {
                Pattern pattern = Pattern.compile(matcher);
                String modifiedValue = pattern.matcher(value).replaceAll(replacement);
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asLiteral()

        {
            log.error("A 'pattern' property of a ValueProcessor is not a "
                    + "Literal! Skipping this result.");
            return null;
        }
        String pattern = patternNode.asLiteral().getLexicalForm();
        String result = pattern.replace("$DSpaceValue", value);
        log.debug("Found pattern " + pattern + ".\n"
                + "Created result: " + result);
        return result;
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asLiteral()

        {
            log.error("Property 'metadataName' is not a literal, ignoring mapping"
                    + uri + ".");
            return null;
        }
        String name = nameNode.asLiteral().getLexicalForm();
        log.debug("Found mapping name '" + name + "'.");
       
        // Parse the property condition, if it exists.
        RDFNode conditionNode;
        try
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asLiteral()

        Pattern condition = null;
        if (conditionNode != null)
        {
            if (conditionNode.isLiteral())
            {
                regex = conditionNode.asLiteral().getLexicalForm();
                log.debug("Found property condition '" + regex + "'.");
            } else {
                log.error("Property 'condition' is not a literal, ignoring "
                        + "mapping" + uri + ".");
                return null;
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asLiteral()

          continue;
        }

        if( m_OWLEntities.containsDatatypeRole( p ) ) {
          if (o.isLiteral() ) {
            Literal literal = o.asLiteral();
            String datatypeURI = literal.getDatatypeURI();

            if( datatypeURI != null && !datatypeURI.equals( "" ) ) {
              Resource datatype = ResourceFactory.createResource( datatypeURI );
              if( !m_OWLEntities.containsDatatype( datatype ) ) {
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asLiteral()

          m_OWLEntities.assumeIndividual( s );         
        }
        else {
          m_OWLEntities.assumeIndividual( s );
          if( o.isLiteral() ) {
            m_OWLEntities.addLiteralAsIndividual( o.asLiteral() );
          }
          else {
            m_OWLEntities.assumeIndividual( o );
          }
        }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asLiteral()

          continue;
        }

        if( m_OWLEntities.containsDatatypeRole( p ) ) {
          if (o.isLiteral() ) {
            Literal literal = o.asLiteral();
            String datatypeURI = literal.getDatatypeURI();

            if( datatypeURI != null && !datatypeURI.equals( "" ) ) {
              Resource datatype = ResourceFactory.createResource( datatypeURI );
              if( !m_OWLEntities.containsDatatype( datatype ) ) {
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asLiteral()

          m_OWLEntities.assumeIndividual( s );         
        }
        else {
          m_OWLEntities.assumeIndividual( s );
          if( o.isLiteral() ) {
            m_OWLEntities.addLiteralAsIndividual( o.asLiteral() );
          }
          else {
            m_OWLEntities.assumeIndividual( o );
          }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.