Package com.hp.hpl.jena.ontology

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


                        model.createTypedLiteral(doc.getLicenseInfo()));
            }

            if (doc.getName() != null) {
                docResource.addProperty(hasName,
                        model.createTypedLiteral(doc.getName()));
            }

            if (doc.getVersion() != null) {
                docResource.addProperty(hasVersion,
                        model.createTypedLiteral(doc.getVersion()));
View Full Code Here


                        model.createTypedLiteral(doc.getName()));
            }

            if (doc.getVersion() != null) {
                docResource.addProperty(hasVersion,
                        model.createTypedLiteral(doc.getVersion()));
            }

            List<Namespace> namespaces = doc.getNamespaces();
            for (Namespace namespace : namespaces) {
                // add namespace resource by it's URL
View Full Code Here

                        .getResourceLocation());
                namespaceResource.addProperty(RDF.type, Namespace);

                // associate prefix and resource location
                namespaceResource.addProperty(hasPrefix,
                        model.createTypedLiteral(namespace.getPrefix()));
                namespaceResource.addProperty(hasResourceLocation,
                        model.createTypedLiteral(namespace
                                .getResourceLocation()));

                // associate document with namespace as a defines relationship
View Full Code Here

                // associate prefix and resource location
                namespaceResource.addProperty(hasPrefix,
                        model.createTypedLiteral(namespace.getPrefix()));
                namespaceResource.addProperty(hasResourceLocation,
                        model.createTypedLiteral(namespace
                                .getResourceLocation()));

                // associate document with namespace as a defines relationship
                docResource.addProperty(defines, namespaceResource);
            }
View Full Code Here

                                    .createResource(new AnonId(UUID
                                            .randomUUID().toString()));

                    // associate metadata of annotation type
                    annotationDefResource.addProperty(hasName,
                            model.createTypedLiteral(annotationType.getName()));
                    if (StringUtils.isNotBlank(annotationType.getDescription())) {
                        annotationDefResource.addProperty(hasDescription, model
                                .createTypedLiteral(annotationType
                                        .getDescription()));
                    }
View Full Code Here

                    // associate metadata of annotation type
                    annotationDefResource.addProperty(hasName,
                            model.createTypedLiteral(annotationType.getName()));
                    if (StringUtils.isNotBlank(annotationType.getDescription())) {
                        annotationDefResource.addProperty(hasDescription, model
                                .createTypedLiteral(annotationType
                                        .getDescription()));
                    }
                    annotationDefResource.addProperty(hasType, model
                            .createTypedLiteral(annotationType
View Full Code Here

                    if (StringUtils.isNotBlank(annotationType.getDescription())) {
                        annotationDefResource.addProperty(hasDescription, model
                                .createTypedLiteral(annotationType
                                        .getDescription()));
                    }
                    annotationDefResource.addProperty(hasType, model
                            .createTypedLiteral(annotationType
                                    .getAnnotationDefinitionType()
                                    .getDisplayValue()));

                    if (StringUtils.isNotBlank(annotationType.getDescription())) {
View Full Code Here

                            .createTypedLiteral(annotationType
                                    .getAnnotationDefinitionType()
                                    .getDisplayValue()));

                    if (StringUtils.isNotBlank(annotationType.getDescription())) {
                        annotationDefResource.addProperty(hasUsage, model
                                .createTypedLiteral(annotationType.getUsage()));
                    }

                    // read list domain for internal list annotation
                    List<String> domain =
View Full Code Here

                            itemResources[i] = model
                                    .createResource(new AnonId(UUID
                                            .randomUUID().toString()));
                            itemResources[i].addProperty(RDF.type, RDF.List);
                            itemResources[i].addProperty(RDF.first,
                                    model.createTypedLiteral(domainValues[i]));
                        }

                        // iterate item resources to link them
                        for (int i = 0; i < itemResources.length; i++) {
                            if ((i + 1) < itemResources.length) {
View Full Code Here

                                    .createResource(new AnonId(UUID
                                            .randomUUID().toString()));

                    // 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
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.