Ontology not getting data from imported ontology - owl-api

I have an ontology and I use the OWL API to import another ontology,
OWLImportsDeclaration importDeclaraton = Factory.getOWLImportsDeclaration(IRI.create("file:/path/to/ontology.owl"));
ontology.getOWLOntologyManager().applyChange(new AddImport(ontology, importDeclaraton));
The new ontology contain some abox assertions in it, however, when I query the ontology for its abox axioms, there is nothing in it.
returns []

At the moment the OWL API does not seem to load imports on the fly, i.e., when a new import is added programmatically - it will attach the imported ontology if that ontology is already loaded, but it will not load a new ontology when the import is added.
I think this is a bug - there should at least be an option to load ontologies used in imports at the time the import is created. I'll add an issue for this.
Updates will be available here.


CommerceTools Initial Load

What is the best way to import >5 million records of customer into commerce tools?
I only need it to load initial load but I don't need any sync services between external sources and commercetools multiple times
process of finding delta can be done outside.
I went through the import API documentation https://docs.commercetools.com/import-export/
#option 1: Impex UI, I believe its node backed application. Does it uses Import API?
#option 2: Project Sync. It uses Import API and abstract batching, http request etc
#option 3: Import API SDK. It abstract http request
With large dataset to import for initial load, it sounds like #2 Project sync would be better choice since it has batching. It looks like it calculates delta before syncing to commercetools which I dont need since I want to use it for initial load.
Which option should i use?
The Import API is a good choice for customers and order imports as the import api will resolve customer references on the orders by key.
You can also consider using the API directly using the sdk of your choice.
Does that help?
Best Regards

ApplicationModule definition class code is blank in ADF

When i select Generate Application Module class and click OK, The AMImpl.java class is generated without any code. what might be the reason for this?
It's because all the code is in the base class.
What do you expect to be in the class?
When you define to create the class, you can choose what will be created (all based on the time you create the class).
Then all methods you write will end up in this class and can be exposed to the client.
Use is described here.
Per the docs:
The base classes of the ADF Business Components framework may be
extended to incorporate custom code with all types of components in
the framework and to extend the ADF Business Components framework
When used without customization, your business component is completely defined by its XML document and it will be fully functional
without custom Java code or even a Java class file for the component.
If you have no need to extend the built-in functionality of a
component in ADF Business Components, and no need to write any custom
code to handle its built-in events, you can use the component in this
XML-only fashion. However, when you do extend base classes of the ADF
Business Components framework, you can still work with XML documents
in JDeveloper.
Once you have created framework extension classes, any new business component you create can be based on your customized
framework class instead of the base one. And, you can always update
the definitions of existing components to use the new framework
extension class as well.
Best practice is to create your own set of custom framework extension classes so you have hook points for creating common code for your custom ADF BC EOs and VOs

How can I efficiently restrict a non-CMS page view to a user group in wagtail with 'permissions_required' hook?

I have an app within my wagtail site which uses several pages constructed in views.py (here because they contain complex-ish processing of forms and data and do not need any CMS functionality). One of these views, I want to restrict to users of a specific group.
For other pages, I use a #logon required mixin, which works fine. I can write some code which uses something like def has_group(user, group_name):
return user.groups.filter(name=group_name).exists(), but this seems messy when wagtail has a nice built in permissions model. Therefore, I am trying to use the following hook in wagtail_hook.py:
from django.contrib.auth.models import Permission
from wagtail.core import hooks
def view_committee_page():
return Permission.objects.filter(codename="view_committee_page")
This isn't showing up in wagtail admin under group object permissions as I believe it should.
My understanding is only based on the odd example I've found using Wagtail v1.X. The documentation is vague on this specific hook: https://docs.wagtail.io/en/v2.5.1/reference/hooks.html#register-permissions
The only modification I've made to the examples I've seen (eg. here: Wagtail set additional permissions for MyPage ) is to update wagtail.wagtailcore to wagtail.core as per 2.0 release notes.
I know my wagtail_hooks.py file is being picked up correctly as I have another hook in there working as expected.
Am I missing something? Is there a more up to date way to solve this problem?
How about creating your own function with the decorator:
in watail_hooks.py there is a function called check_view_restrictions() so you could do something similar to this?
You would also need to set the permissions on your Page model.
from wagtail.core.models import Page
class MyPage(Page):
class Meta:
permissions = (("page_view_only", "Can view my pages"),)
Then use the hook in wagtail_hooks.py
from django.contrib.auth.models import Permission
from wagtail.core import hooks
def page_view_only():
return Permission.objects.filter(codename="page_view_only")
There should be a new permission available in the admin Group settings.

Protégé import from http://w3id.org/XXX

I am having problems importing two ontologies in Protégé. These ontologies are stored in the following links Onto1 and Onto2 and are also in the W3ID.ORG URL re-direction service (Onto1Redirection and Onto2Redirection).
I tried to import both of them using Protege's Direct Import => Add => Import an ontology contained in a document located on the web option. I tried introducing both the original OWL file's and the redirection URL.
However, after saving the ontology and loading it, imports are not correctly done (i.e. one or the other is not imported).
Any guidance in this matter will be appreciated.

AppEngine Bulkloader generate data during import

I imported a CSV into the datastore and want to generate a field StringListProperty with a custom action during import (e.g. index generation, doing some calculations). I tried to override the put() method of my model like it is described in question Override save, put, get, etc... methods in Google App Engine, but during bulkloader import this has no effect.
look into google.appengine.ext.bulkload.bulkloader_wizard, there isn't a default transformer for list of str/unicode. You have to make your own.