Examples of newRecordType()


Examples of org.lilyproject.repository.api.TypeManager.newRecordType()

        try {
            recordType1 = typeManager.getRecordTypeByName(RECORDTYPE1, 1L);
            System.out.println("[KeepDataTest] RecordType already exists: " + recordType1);
        } catch (RecordTypeNotFoundException e) {
            System.out.println("[KeepDataTest] RecordType does not exist yet. Create it: " + recordType1);
            recordType1 = typeManager.newRecordType(RECORDTYPE1);
            recordType1.addFieldTypeEntry(typeManager.newFieldTypeEntry(fieldType1.getId(), false));
            typeManager.createRecordType(recordType1);
        }

        // Add index
View Full Code Here

Examples of org.lilyproject.repository.api.TypeManager.newRecordType()

        namespaces = NamespacesConverter.fromContextJson(node, namespaces);

        TypeManager typeManager = repository.getTypeManager();
        QName name = QNameConverter.fromJson(getString(node, "name"), namespaces);

        RecordType recordType = typeManager.newRecordType(name);

        String id = getString(node, "id", null);
        if (id != null) {
            recordType.setId(new SchemaIdImpl(id));
        }
View Full Code Here

Examples of org.lilyproject.repository.api.TypeManager.newRecordType()

        repository = lilyClient.getRepository();
        // Create schema
        TypeManager typeManager = repository.getTypeManager();
        FieldType fieldType1 = typeManager.createFieldType(typeManager.newFieldType(typeManager.getValueType("STRING"),
                FIELD1, Scope.NON_VERSIONED));
        RecordType recordType1 = typeManager.newRecordType(RECORDTYPE1);
        recordType1.addFieldTypeEntry(typeManager.newFieldTypeEntry(fieldType1.getId(), false));
        typeManager.createRecordType(recordType1);

        // Add index
        String indexName = "testIndex";
View Full Code Here

Examples of org.lilyproject.repository.api.TypeManager.newRecordType()

        QName fieldName = new QName("ns", "f1");
        FieldType fieldType = typeMgr.newFieldType(typeMgr.getValueType("STRING"), fieldName, Scope.NON_VERSIONED);
        fieldType = typeMgr.createFieldType(fieldType);

        QName typeName = new QName("ns", "rt1");
        RecordType recordType = typeMgr.newRecordType(typeName);
        recordType.addFieldTypeEntry(fieldType.getId(), false);
        recordType = typeMgr.createRecordType(recordType);

        Record record = repository.newRecord();
        record.setRecordType(typeName);
View Full Code Here

Examples of org.lilyproject.repository.api.TypeManager.newRecordType()

        QName field2 = new QName("ns", "f2");
        FieldType fieldType2 = typeMgr.newFieldType(typeMgr.getValueType("STRING"), field2, Scope.NON_VERSIONED);
        fieldType2 = typeMgr.createFieldType(fieldType2);

        QName typeName = new QName("ns", "rt1");
        RecordType recordType = typeMgr.newRecordType(typeName);
        recordType.addFieldTypeEntry(fieldType1.getId(), false);
        recordType.addFieldTypeEntry(fieldType2.getId(), false);
        recordType = typeMgr.createRecordType(recordType);

        DecoratingRepositoryManager repositoryMgr = (DecoratingRepositoryManager)lilyProxy.getLilyServerProxy()
View Full Code Here

Examples of org.lilyproject.repository.api.TypeManager.newRecordType()

        TypeManager typeManager = repository.getTypeManager();
        ValueType blobType = typeManager.getValueType("BLOB");
        FieldType blobFieldType = typeManager.newFieldType(blobType, new QName(NS, "data"), Scope.VERSIONED);
        blobFieldType = typeManager.createFieldType(blobFieldType);

        RecordType recordType = typeManager.newRecordType(new QName(NS, "file"));
        recordType.addFieldTypeEntry(blobFieldType.getId(), true);
        recordType = typeManager.createRecordType(recordType);


        // Upload a blob that, based upon the current default config, should end up in HBase
View Full Code Here

Examples of org.lilyproject.repository.api.TypeManager.newRecordType()

        // Create a field type and record type
        TypeManager typeManager = repository.getTypeManager();
        FieldType fieldType = typeManager.newFieldType("STRING", new QName(NS, "scanfield"), Scope.VERSIONED);
        fieldType = typeManager.createFieldType(fieldType);

        RecordType recordType = typeManager.newRecordType(new QName(NS, "scanrt"));
        recordType.addFieldTypeEntry(fieldType.getId(), true);
        recordType = typeManager.createRecordType(recordType);

        // Create some records
        for (int i = 0; i < 10; i++) {
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.