Package com.hp.hpl.jena.ontology

Examples of com.hp.hpl.jena.ontology.OntModel.createTypedLiteral()


                    // associate metadata of annotation type
                    annotationDefResource.addProperty(hasName,
                            model.createTypedLiteral(annotationType.getName()));
                    annotationDefResource.addProperty(hasDescription,
                            model.createTypedLiteral(annotationType
                                    .getDescription()));
                    annotationDefResource.addProperty(hasType, model
                            .createTypedLiteral(annotationType
                                    .getAnnotationDefinitionType()
                                    .getDisplayValue()));
View Full Code Here


                    annotationDefResource.addProperty(hasName,
                            model.createTypedLiteral(annotationType.getName()));
                    annotationDefResource.addProperty(hasDescription,
                            model.createTypedLiteral(annotationType
                                    .getDescription()));
                    annotationDefResource.addProperty(hasType, model
                            .createTypedLiteral(annotationType
                                    .getAnnotationDefinitionType()
                                    .getDisplayValue()));
                    annotationDefResource
                            .addProperty(hasUsage, model
View Full Code Here

                    annotationDefResource.addProperty(hasType, model
                            .createTypedLiteral(annotationType
                                    .getAnnotationDefinitionType()
                                    .getDisplayValue()));
                    annotationDefResource
                            .addProperty(hasUsage, model
                                    .createTypedLiteral(annotationType
                                            .getUsage()));

                    String patternDomain = domain.get(0);
View Full Code Here

                    String patternDomain = domain.get(0);

                    // associate annotation to the domain pattern
                    annotationDefResource.addProperty(hasPattern,
                            model.createTypedLiteral(patternDomain));
                    break;
                case URL:
                    if (annotationType.getUrl() == null) {
                        throw new IllegalStateException(
                                "Expecting non-null URL for external annotation");
View Full Code Here

                    // associate annotation to the URL where the domain is defined
                    annotationDefResource =
                            model.createResource(annotationType.getUrl());
                    annotationDefResource.addProperty(hasName,
                            model.createTypedLiteral(annotationType.getName()));
                    annotationDefResource.addProperty(hasURL,
                            model.createTypedLiteral(annotationType.getUrl()));
                    break;
                default:
                    throw new UnsupportedOperationException(
View Full Code Here

                    annotationDefResource =
                            model.createResource(annotationType.getUrl());
                    annotationDefResource.addProperty(hasName,
                            model.createTypedLiteral(annotationType.getName()));
                    annotationDefResource.addProperty(hasURL,
                            model.createTypedLiteral(annotationType.getUrl()));
                    break;
                default:
                    throw new UnsupportedOperationException(
                            "Annotation definition type not supported: "
                                    + annotationType
View Full Code Here

            // node hasFunction Function
            kamNodeResource.addProperty(hasFunction, functionResource);

            // node hasId "1"^^xsd:int
            kamNodeResource.addLiteral(hasId,
                    model.createTypedLiteral(kamNode.getId()));

            // node hasLabel "p(EG:207)"^^xsd:string
            kamNodeResource.addLiteral(hasLabel,
                    model.createTypedLiteral(kamNode.getLabel()));
View Full Code Here

            kamNodeResource.addLiteral(hasId,
                    model.createTypedLiteral(kamNode.getId()));

            // node hasLabel "p(EG:207)"^^xsd:string
            kamNodeResource.addLiteral(hasLabel,
                    model.createTypedLiteral(kamNode.getLabel()));

            // hold on to kam node resources
            kamNodeResources.put(kamNode, kamNodeResource);

            // handle terms for this KAMNode
View Full Code Here

                Resource termResource = model.createResource(new AnonId(UUID
                        .randomUUID().toString()));

                termResource.addProperty(RDF.type, Term);
                termResource.addProperty(hasId,
                        model.createTypedLiteral(term.getId()));
                termResource.addProperty(hasLabel,
                        model.createTypedLiteral(term.getLabel()));
                termResource.addProperty(hasFunction,
                        resourceForFunction(kamNode.getFunctionType()));
View Full Code Here

                termResource.addProperty(RDF.type, Term);
                termResource.addProperty(hasId,
                        model.createTypedLiteral(term.getId()));
                termResource.addProperty(hasLabel,
                        model.createTypedLiteral(term.getLabel()));
                termResource.addProperty(hasFunction,
                        resourceForFunction(kamNode.getFunctionType()));

                RDFList argumentres = model.createList();
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.