Examples of OWLEntity


Examples of org.semanticweb.owlapi.model.OWLEntity

        individualsByURI = new WeakHashMap<IRI, WeakReference<? extends OWLEntity>>();
        annotationPropertiesByURI = new WeakHashMap<IRI, WeakReference<? extends OWLEntity>>();
    }

    private OWLEntity unwrap(Map<IRI, WeakReference<? extends OWLEntity>> map, IRI iri, BuildableObjects type) {
        OWLEntity toReturn = null;
        while (toReturn == null) {
            WeakReference<? extends OWLEntity> r = safeRead(map, iri, type);
            if (r == null || r.get() == null) {
                toReturn = type.build(factory, iri);
                r = new WeakReference<OWLEntity>(toReturn);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

                Optional<FreshEntitySuggestion> suggestion = getSuggestion(query, type, auxiliaryType);
                if (suggestion.isPresent()) {
                    result.add(suggestion.get());
                }
            }
            OWLEntity entity = DataFactory.getFreshOWLEntity(type, query);
            OWLEntityData entityData = DataFactory.getOWLEntityData(entity, query);
            result.add(new EntitySuggestion(entityData, formatSuggestText(query, type)));
        }
        return result;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

        return "<span class=\"new-keyword\">New</span> <span style=\"font-weight: bold;\">" + allowedType.getPrintName() + "</span> named " + query;
    }

    private Optional<FreshEntitySuggestion> getSuggestion(String query, EntityType<?> type, Optional<OWLEntityData> auxiliaryType) {
        // TODO: If query starts with a lowercase letter, suggest individual first?
        OWLEntity entity = DataFactory.getFreshOWLEntity(type, query);
        OWLEntityData entityData = DataFactory.getOWLEntityData(entity, query);
        if(auxiliaryType.isPresent()) {
            AuxiliaryTypeHandler auxiliaryTypeHandler = AuxiliaryTypeHandler.get(auxiliaryType.get());
            if(auxiliaryTypeHandler.isApplicableTo(type)) {
                Set<OWLAxiom> augmentingAxioms = auxiliaryTypeHandler.getAdditionalAxioms(entity);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

    @Override
    public Collection<OWLEntity> getInvalidationKeys(LookupEntitiesAction action, LookupEntitiesResult result) {
        List<OWLEntity> entities = new ArrayList<OWLEntity>();
        for(EntityLookupResult res : result.getEntityLookupResults()) {
            OWLEntity entity = res.getOWLEntityData().getEntity();
            entities.add(entity);
        }
        return entities;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

            usageView.clearData();
        }
    }

    private void showUsageForEntity(final OWLEntityData entityData) {
        final OWLEntity entity = entityData.getEntity();
        final GetUsageAction action = new GetUsageAction(entity, getProjectId(), Optional.of(usageView.getUsageFilter()));
        DispatchServiceManager.get().execute(action, new AsyncCallback<GetUsageResult>() {
            @Override
            public void onFailure(Throwable caught) {
                MessageBox.alert("There was a problem retrieving the usage for the selected entity");
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

            }
        }



        OWLEntity property1 = o1.getProperty();
        OWLEntity property2 = o2.getProperty();
        if(property1.isOWLAnnotationProperty()) {
            if (property2.isOWLAnnotationProperty()) {
                OWLAnnotationProperty annoProp1 = (OWLAnnotationProperty) property1;
                OWLAnnotationProperty annoProp2 = (OWLAnnotationProperty) property2;
                return annotationPropertyComparator.compare(annoProp1, annoProp2);
            }
            else {
                return BEFORE;
            }
        }
        else if(property2.isOWLAnnotationProperty()) {
            return AFTER;
        }
        final RenderingManager rm = project.getRenderingManager();
        String prop1BrowserText = rm.getBrowserText(property1);
        String prop2BrowserText = rm.getBrowserText(property2);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

    @Override
    public List<EntitySuggestion> getSuggestions(String query, List<EntityType<?>> suggestedTypes) {
        List<EntitySuggestion> suggestions = Lists.newArrayList();
        for(EntityType<?> allowedType : suggestedTypes) {
                OWLEntity entity = DataFactory.getFreshOWLEntity(allowedType, query);
                OWLEntityData entityData = DataFactory.getOWLEntityData(entity, query);
                suggestions.add(new EntitySuggestion(entityData, formatSuggestText(query, allowedType)));
        }
        return suggestions;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

    }

    private Multimap<OWLEntity, OWLObject> createMultimap(Set<PropertyValue> propertyValues) {
        Multimap<OWLEntity, OWLObject> fromPropertyValues = HashMultimap.create();
        for(PropertyValue propertyValue : propertyValues) {
            OWLEntity property = propertyValue.getProperty();
            OWLObject value = propertyValue.getValue();
            fromPropertyValues.put(property, value);
        }
        return fromPropertyValues;
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

     * @return The fresh entity.  Not {@code null}.
     */
    @Override
    @SuppressWarnings("unchecked")
    public <E extends OWLEntity> E getFreshEntity(String browserText, EntityType<E> type) {
        OWLEntity entity = entitiesTable.get(browserText, type);
        if(entity != null) {
            return (E) entity;
        }
        UserId userId = Application.get().getUserId();
        E freshEntity = DataFactory.getFreshOWLEntity(type, browserText);
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLEntity

        }

        List<String> nextItems = new ArrayList<String>();
        if(property.isPresent()) {
            OWLPrimitiveData primitiveData = property.get();
            final OWLEntity prop = (OWLEntity) primitiveData.getObject();
            boolean freshEntity = DataFactory.isFreshEntity(prop);
            if(freshEntity) {
                for(ColumnType columnType : ColumnType.values()) {
                    nextItems.add(columnType.getDisplayName());
                }
            }
            else {
                for(ColumnType columnType : ColumnType.values()) {
                    if (columnType.isPropertyType(prop.getEntityType())) {
                        nextItems.add(columnType.getDisplayName());
                    }
                }
            }
        }
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.