Package org.apache.stanbol.entityhub.servicesapi.yard

Examples of org.apache.stanbol.entityhub.servicesapi.yard.Yard


        return InMemoryValueFactory.getInstance().createRepresentation(id);
    }

    @Override
    public QueryResultList<Representation> find(FieldQuery query) throws YardException, IllegalArgumentException {
        Yard yard = getCacheYard();
        if (yard == null) {
            throw new YardException(String.format("The Yard %s for this cache is currently not available", yardId));
        } else {
            return yard.find(query);
        }
    }
View Full Code Here


        }
    }

    @Override
    public QueryResultList<String> findReferences(FieldQuery query) throws YardException, IllegalArgumentException {
        Yard yard = getCacheYard();
        if (yard == null) {
            throw new YardException(String.format("The Yard %s for this cache is currently not available", yardId));
        } else {
            return yard.findReferences(query);
        }
    }
View Full Code Here

        }
    }

    @Override
    public QueryResultList<Representation> findRepresentation(FieldQuery query) throws YardException, IllegalArgumentException {
        Yard yard = getCacheYard();
        if (yard == null) {
            throw new YardException(String.format("The Yard %s for this cache is currently not available", yardId));
        } else {
            return yard.findRepresentation(query);
        }
    }
View Full Code Here

        return yardId + " Cache";
    }

    @Override
    public FieldQueryFactory getQueryFactory() {
        Yard yard = getCacheYard();
        if (yard == null) {
            return DefaultQueryFactory.getInstance();
        } else {
            return yard.getQueryFactory();
        }
    }
View Full Code Here

        }
    }

    @Override
    public Representation getRepresentation(String id) throws YardException, IllegalArgumentException {
        Yard yard = getCacheYard();
        if (yard == null) {
            throw new YardException(String.format("The Yard %s for this cache is currently not available", yardId));
        } else {
            return yard.getRepresentation(id);
        }
    }
View Full Code Here

        }
    }

    @Override
    public ValueFactory getValueFactory() {
        Yard yard = getCacheYard();
        if (yard == null) {
            return InMemoryValueFactory.getInstance();
        } else {
            return yard.getValueFactory();
        }
    }
View Full Code Here

        }
    }

    @Override
    public boolean isRepresentation(String id) throws YardException, IllegalArgumentException {
        Yard yard = getCacheYard();
        if (yard == null) {
            throw new YardException(String.format("The Yard %s for this cache is currently not available", yardId));
        } else {
            return yard.isRepresentation(id);
        }
    }
View Full Code Here

        }
    }

    @Override
    public void remove(String id) throws IllegalArgumentException, YardException {
        Yard yard = getCacheYard();
        if (yard == null) {
            throw new YardException(String.format("The Yard %s for this cache is currently not available", yardId));
        } else {
            yard.remove(id);
        }
    }
View Full Code Here

        return additionalMapper == null ? null : additionalMapper.clone();
    }

    @Override
    public void setAdditionalMappings(FieldMapper fieldMapper) throws YardException {
        Yard yard = getCacheYard();
        if (yard == null) {
            throw new YardException(String.format("The Yard %s for this cache is currently not available", yardId));
        } else {
            setAdditionalMappings(yard, fieldMapper);
        }
View Full Code Here

        assertFalse("The Name of the Yard MUST NOT be an empty String", getYard().getName().isEmpty());
    }

    @Test
    public void testDefaultCreate() throws YardException {
        Yard yard = getYard();
        Representation test = yard.create();
        assertNotNull(test);
        Representation test2 = yard.create();
        assertNotNull(test2);
        assertNotSame(test, test2);
        assertFalse("Two Representation created with create() MUST NOT be equals", test.equals(test2));
    }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.entityhub.servicesapi.yard.Yard

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.