Examples of createSchema()


Examples of nexj.core.persistence.sql.SQLSchemaManager.createSchema()

                  {
                     s_logger.debug(
                        "Creating the schema of data source \"" + dataSource.getName() + '"');
                  }

                  manager.createSchema(schema);

                  if (s_logger.isDebugEnabled())
                  {
                     s_logger.debug("Schema created");
                  }
View Full Code Here

Examples of org.codehaus.stax2.validation.XMLValidationSchemaFactory.createSchema()

      // create a validator for the package.xml
      XMLValidationSchemaFactory validationSchemaFactory = XMLValidationSchemaFactory
            .newInstance(XMLValidationSchema.SCHEMA_ID_W3C_SCHEMA);
      // TODO: Is this good enough to get hold of package.xsd? Need to think about this.
      URL packageXsd = Thread.currentThread().getContextClassLoader().getResource("package.xsd");
      XMLValidationSchema schema = validationSchemaFactory.createSchema(packageXsd);;
      // enable validation (note: validation will happen during parse)
      xmlStreamReader.validateAgainst(schema);

      // parse the xml
      PackageType pkgMetadata = null;
View Full Code Here

Examples of org.datanucleus.store.schema.SchemaAwareStoreManager.createSchema()

    private void createSchema(final Map<String, String> props, final Set<String> classesToBePersisted) {
        final JDOPersistenceManagerFactory jdopmf = (JDOPersistenceManagerFactory)persistenceManagerFactory;
        final NucleusContext nucleusContext = jdopmf.getNucleusContext();
        final SchemaAwareStoreManager storeManager = (SchemaAwareStoreManager) nucleusContext.getStoreManager();
        storeManager.createSchema(classesToBePersisted, asProperties(props));
    }


    private static Properties asProperties(Map<String, String> props) {
        Properties properties = new Properties();
View Full Code Here

Examples of org.datanucleus.store.schema.SchemaAwareStoreManager.createSchema()

   
    private void createSchema(final Map<String, String> props, final Set<String> classesToBePersisted) {
        final JDOPersistenceManagerFactory jdopmf = (JDOPersistenceManagerFactory)persistenceManagerFactory;
        final NucleusContext nucleusContext = jdopmf.getNucleusContext();
        final SchemaAwareStoreManager storeManager = (SchemaAwareStoreManager) nucleusContext.getStoreManager();
        storeManager.createSchema(classesToBePersisted, asProperties(props));
    }

    private static Set<String> catalogClassesToBePersisted(Collection<ObjectSpecification> objectSpecs) {
        Set<String> classNames = Sets.newTreeSet();
        for (final ObjectSpecification spec : objectSpecs) {
View Full Code Here

Examples of org.eclipse.xsd.util.XSDPrototypicalSchema.createSchema()

     * @param schemaElemement the w3c Element that is the root of an XML schema.
     * i.e. this element is the one written like so: "<xs:schema ..> ... </xs:schema>"
     */
    public void setSchema(Element schemaElemement) throws YSyntaxException {
        XSDPrototypicalSchema proto = XSDPrototypicalSchema.getInstance();
        _schema = proto.createSchema(schemaElemement);

        if (_schema.getTargetNamespace() != null) {
            throw new YSyntaxException("YAWL does not support schemas with target namespaces.");
        }
    }
View Full Code Here

Examples of org.exolab.castor.xml.schema.util.XMLInstance2Schema.createSchema()

        try {
            XMLInstance2Schema schemaGenerator = new XMLInstance2Schema();
            if (_defaultGroupingAsAll) {
                schemaGenerator.setDefaultGroupingAsAll();
            }
            Schema schema = schemaGenerator.createSchema(filePath);
            String outputFileName = outputFilePath;
            if (outputFileName == null) {
                outputFileName = deriveOutputFilePath(filePath);
            }
           FileWriter dstWriter = new FileWriter(outputFileName);
View Full Code Here

Examples of org.geotools.data.DataStore.createSchema()

        File tmp = File.createTempFile(layers[0].getName() + "_" + layers[1].getName() + "_diff", ".shp"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        DataStore ds = dsfac.createDataStore(tmp.toURL());
        final SimpleFeatureType newSchema = FeatureTypes.newFeatureType(
                fromLayer.getSchema().getAttributeDescriptors().toArray(
                        new AttributeDescriptor[0]), "diff"); //$NON-NLS-1$
        ds.createSchema(newSchema);
       
        final FeatureSource<SimpleFeatureType, SimpleFeature> fromSource = fromLayer.getResource(FeatureSource.class, monitor);
        final FeatureSource<SimpleFeatureType, SimpleFeature> diffSource = diffLayer.getResource(FeatureSource.class, monitor);
        if (isGeometryCollection(fromSource.getSchema().getGeometryDescriptor())) {
            MessageDialog.openError(display.getActiveShell(), Messages.differenceOp_inputError, fromLayer.getName() + Messages.differenceOp_multiGeoms);
View Full Code Here

Examples of org.geotools.data.DataStore.createSchema()

            throws Exception {
        final IService service = (IService) target;
        final DataStore ds = service.resolve(DataStore.class, monitor);
        if (!(ds instanceof ShapefileDataStore)) {
            try {
                ds.createSchema(null);
            } catch (UnsupportedOperationException e) {
                if (testing) {
                    error = true;
                    return;
                } else {
View Full Code Here

Examples of org.geotools.data.DataStore.createSchema()

        try {

            if (ds instanceof ShapefileDataStore) {
                createShapefile(display, monitor, featureType[0], service.getIdentifier());
            } else {
                ds.createSchema(featureType[0]);
                long start=System.currentTimeMillis();
                while( !Arrays.asList(ds.getTypeNames()).contains(featureType[0].getName().getLocalPart() ) && start+5000>System.currentTimeMillis()){
                    Thread.sleep(300);
                }
                       
View Full Code Here

Examples of org.geotools.data.DataStore.createSchema()

        Map<String, Serializable> params = new HashMap<String, Serializable>();
        params.put(ShapefileDataStoreFactory.URLP.key, file.toURI().toURL());
        params.put(ShapefileDataStoreFactory.CREATE_SPATIAL_INDEX.key, true);
       
        DataStore ds = factory.createDataStore(params);
        ds.createSchema(type);
        List<IService> service = CatalogPlugin.getDefault().getServiceFactory().createService(
                file.toURI().toURL());
        for( IService service2 : service ) {
            try {
                if (service2.resolve(DataStore.class, monitor) instanceof ShapefileDataStore)
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.