/** * @return {@link QValueFactoryImpl#getInstance()}. * @throws RepositoryException if an error occurs. */ public QValueFactory getQValueFactory() throws RepositoryException { return QValueFactoryImpl.getInstance(); }
/** * Add a {@link PropertyType#STRING} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(String value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value, PropertyType.STRING)); }
/** * Add a {@link PropertyType#PATH} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(Path value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#DECIMAL} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(BigDecimal value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#DOUBLE} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(double value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#NAME} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(Name value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#BINARY} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(byte[] value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#BINARY} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(InputStream value) throws RepositoryException, IOException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#BINARY} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(File value) throws RepositoryException, IOException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#DATE} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(Calendar value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#PATH} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(Path value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#STRING} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(String value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value, PropertyType.STRING)); }
/** * Add a {@link PropertyType#DECIMAL} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(BigDecimal value) throws RepositoryException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
/** * Add a {@link PropertyType#BINARY} value to this property. * * @param value * @return <code>this</code> * @throws RepositoryException * @throws IllegalStateException if the type of the value does not match the type of this property */ public PropertyInfoBuilder addValue(InputStream value) throws RepositoryException, IOException { return addValue(QValueFactoryImpl.getInstance().create(value)); }
@Override public void addDefaultValues(String value) throws RepositoryException { builder.addDefaultValue(ValueFormat.getQValue(value, getRequiredType(), resolver, QValueFactoryImpl.getInstance())); }
/** * Write one QNodeTypeDefinition to this writer * * @param ntd node type definition * @throws IOException if an I/O error occurs */ public void write(QNodeTypeDefinition ntd) throws IOException { NodeTypeDefinition def = new NodeTypeDefinitionImpl(ntd, npResolver, new ValueFactoryQImpl(QValueFactoryImpl.getInstance(), npResolver)); super.write(def); }
/** * Write one QNodeTypeDefinition to this writer * * @param ntd node type definition * @throws IOException if an I/O error occurs */ public void write(QNodeTypeDefinition ntd) throws IOException { NodeTypeDefinition def = new NodeTypeDefinitionImpl(ntd, npResolver, new ValueFactoryQImpl(QValueFactoryImpl.getInstance(), npResolver)); super.write(def); }
protected Map<String, QValue[]> getDescriptors() throws RepositoryException { Map<String, QValue[]> descriptorKeys = new HashMap<String, QValue[]>(); QValueFactory qvf = QValueFactoryImpl.getInstance(); descriptorKeys.put(Repository.REP_NAME_DESC, new QValue[] {qvf.create("Mock Repository", PropertyType.STRING)}); descriptorKeys.put(Repository.REP_VENDOR_DESC, new QValue[] {qvf.create("Apache Software Foundation", PropertyType.STRING)}); descriptorKeys.put(Repository.REP_VENDOR_URL_DESC, new QValue[] {qvf.create("http://www.apache.org/", PropertyType.STRING)}); descriptorKeys.put(Repository.REP_VERSION_DESC, new QValue[] {qvf.create("2.0", PropertyType.STRING)}); descriptorKeys.put(Repository.SPEC_NAME_DESC, new QValue[] {qvf.create("Content Repository API for Java(TM) Technology Specification", PropertyType.STRING)}); descriptorKeys.put(Repository.SPEC_VERSION_DESC, new QValue[] {qvf.create("2.0", PropertyType.STRING)}); return descriptorKeys; }
protected RepositoryService createService(String uri) throws RepositoryException { IdFactory idFactory = IdFactoryImpl.getInstance(); NameFactory nFactory = NameFactoryImpl.getInstance(); PathFactory pFactory = PathFactoryImpl.getInstance(); QValueFactory vFactory = QValueFactoryImpl.getInstance(); return new RepositoryServiceImpl(uri, idFactory, nFactory, pFactory, vFactory); }
@Override public RepositoryService getRepositoryService() throws RepositoryException { if (service == null) { String uri = getProperty(PROP_REPOSITORY_URI); IdFactory idFactory = IdFactoryImpl.getInstance(); NameFactory nFactory = NameFactoryImpl.getInstance(); PathFactory pFactory = PathFactoryImpl.getInstance(); QValueFactory vFactory = QValueFactoryImpl.getInstance(); service = new RepositoryServiceImpl(uri, idFactory, nFactory, pFactory, vFactory); } return service; }