Examples of ResourceSelector


Examples of ch.entwine.weblounge.common.repository.ResourceSelector

   * @throws IllegalStateException
   */
  @Test
  public void testListResources() throws ContentRepositoryException,
  IllegalStateException, IOException {
    ResourceSelector selector = new ResourceSelectorImpl(site);
    Collection<String> uris = new ArrayList<String>();
    for (Resource<?> r : pages) {
      uris.add(r.getURI().getIdentifier());
    }
    uris.add(jpeg.getURI().getIdentifier());
View Full Code Here

Examples of ch.entwine.weblounge.common.repository.ResourceSelector

      long revisionCount = 0;
      ResourceURI previousURI = null;

      // Add all known resource types to the index
      for (ResourceSerializer<?, ?> serializer : getSerializers()) {
        ResourceSelector selector = new ResourceSelectorImpl(site).withTypes(serializer.getType());
        for (ResourceURI uri : list(selector)) {

          // Load the resource
          Resource<?> resource = null;
          InputStream is = null;
View Full Code Here

Examples of ch.entwine.weblounge.common.repository.ResourceSelector

      return 0;
    }

    long resourceCount = 0;
    long resourceVersionCount = 0;
    ResourceSelector selector = new ResourceSelectorImpl(site).withTypes(resourceType);

    // Ask for all existing resources of the current type and index them
    for (ResourceURI uri : list(selector)) {
      try {
        Resource<?> resource = null;
View Full Code Here

Examples of com.eclipsesource.jshint.ui.internal.preferences.ResourceSelector

  @Override
  public boolean performOk() {
    try {
      if( storePreferences() ) {
        boolean enabled = new ResourceSelector( getResource().getProject() ).allowVisitProject();
        setBuilderEnabled( enabled );
        triggerRebuild();
      }
    } catch( CoreException exception ) {
      String message = "Failed to store settings";
View Full Code Here

Examples of com.eclipsesource.jshint.ui.internal.preferences.ResourceSelector

  private final IProgressMonitor monitor;

  public JSHintBuilderVisitor( IProject project, IProgressMonitor monitor ) throws CoreException {
    Preferences node = PreferencesFactory.getProjectPreferences( project );
    new EnablementPreferences( node );
    selector = new ResourceSelector( project );
    checker = selector.allowVisitProject() ? createJSHint( project ) : null;
    this.monitor = monitor;
  }
View Full Code Here

Examples of es.urjc.escet.semium.jenaextensions.ResourceSelector

                   
                    while(!resourceIsUnique){
                        String tmpValue = value.replace("@newID@",Long.toString(++lastID));
                        res = model.createResource(tmpValue);
                        //Check if Namespace is already in use:
                        ResourceSelector rSel = new ResourceSelector(res);
                        StmtIterator stmtIt = model.listStatements(rSel);
                        if(!stmtIt.hasNext())
                            resourceIsUnique = true;
                    }
                } else{
                    res = model.createResource(value);
                    ResourceSelector rSel = new ResourceSelector(res);
                    StmtIterator stmtIt = model.listStatements(rSel);
                    if(stmtIt.hasNext())
                        //Resource exist, cancel operation
                        throw new ImporterException("Resource '" + value + "' already exists");
                }
View Full Code Here

Examples of es.urjc.escet.semium.jenaextensions.ResourceSelector

   
    public static void deleteStatements(Model model, Resource res){
        StmtIterator stmtIterator = null;
       
        //Delete all statements, that contain the resource in their subject
        ResourceSelector resSelector = new ResourceSelector(res);
        stmtIterator = model.listStatements(resSelector);
        model.remove(stmtIterator);
       
        //Delete all statements, that contain the resource in their object
        StatementSelector stmtSelector = new StatementSelector(null,null,res);
View Full Code Here

Examples of org.apache.tools.ant.types.resources.selectors.ResourceSelector

     * @return the filters resources
     * @since Ant 1.6
     */
    protected Resource[] selectFileResources(Resource[] orig) {
        return selectResources(orig,
                               new ResourceSelector() {
                                   public boolean isSelected(Resource r) {
                                       if (!r.isDirectory()) {
                                           return true;
                                       } else if (doFilesonly) {
                                           logWhenWriting("Ignoring directory "
View Full Code Here

Examples of org.apache.tools.ant.types.resources.selectors.ResourceSelector

     * @return the filters resources
     * @since Ant 1.8.0
     */
    protected Resource[] selectDirectoryResources(Resource[] orig) {
        return selectResources(orig,
                               new ResourceSelector() {
                                   public boolean isSelected(Resource r) {
                                       return r.isDirectory();
                                   }
                               });
    }
View Full Code Here

Examples of org.apache.tools.ant.types.resources.selectors.ResourceSelector

        logFuture(logTo, source, granularity);
        ResourceSelectorProvider p =
            new ResourceSelectorProvider() {
                public ResourceSelector
                    getTargetSelectorForSource(final Resource sr) {
                    return new ResourceSelector() {
                        public boolean isSelected(Resource target) {
                            /* Extra I/O, probably wasted:
                               if (target.isDirectory()) {
                               return false;
                               }
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.