Package org.apache.stanbol.cmsadapter.servicesapi.repository

Examples of org.apache.stanbol.cmsadapter.servicesapi.repository.RepositoryAccess


        if (engine.getBridgeDefinitions() != null) {
            BridgeDefinitions bridgeDefinitions = engine.getBridgeDefinitions();
            DObjectAdapter adapter = engine.getDObjectAdapter();

            List<InstanceBridge> instanceBridges = MappingModelParser.getInstanceBridges(bridgeDefinitions);
            RepositoryAccess accessor = engine.getRepositoryAccess();
            Object session = engine.getSession();
            boolean emptyList = (cmsObjects == null || cmsObjects.size() == 0);

            for (InstanceBridge ib : instanceBridges) {
                // cms objects will be null in the case of initial bridge execution or update of bridge
                // definitions
                if (emptyList) {
                    try {
                        List<CMSObject> retrievedObjects = accessor.getNodeByPath(ib.getQuery(), session);
                        cmsObjects = new ArrayList<DObject>();
                        for (CMSObject o : retrievedObjects) {
                            cmsObjects.add(adapter.wrapAsDObject(o));
                        }
                    } catch (RepositoryAccessException e) {
View Full Code Here

TOP

Related Classes of org.apache.stanbol.cmsadapter.servicesapi.repository.RepositoryAccess

Copyright © 2018 www.massapicom. 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.