Package org.culturegraph.registry

Examples of org.culturegraph.registry.PropertyRecord


    mappings.put("016", "xbib://identifierAuthority");
    mappings.put("035 $a", "xbib://identifierAuthorityEKI");
    mappings.put("100 $0", "dc:creator");
    mappings.put("245 $a", "dc:title");
    mappings.put("502 $o", "xbib://identifierUniversityScript");
    PropertyRecord propertyRecord = marcImporter
        .newPropertyRecord(marcRecord);
    assertEquals(4, propertyRecord.size());
    logger.info(propertyRecord);
  }
View Full Code Here


    marcImporter.importMarcXmlFromFile(new File(
        "test/input/A2010titmrc_1.xml"));
    logger.info(dao);
    assertEquals(162, dao.size());
       
    PropertyRecord firstRecord = dao.get("urn:nbn:de:eki:cg010014055");
    assertNotNull(firstRecord);
    assertEquals("urn:nbn:de:eki:cg010014055", firstRecord.getId());
       
  }
View Full Code Here

    }
  }
 
  public void testFindDublicates() throws UnknownHostException, MongoException {
    MongoDao dao = MongoDao.Factory.newTestMongoDao();
    PropertyRecord propertyRecord = new PropertyRecord();
    propertyRecord.add(new Property<Object>("ID2", "010014454"));

    Collection<PropertyRecord> result = dao.findDublicates(propertyRecord);
    logger.info("" + result.size());
  }
View Full Code Here

   *
   * @param dbObject
   * @return
   */
  public PropertyRecord newPropertyRecord(DBObject dbObject) {
    PropertyRecord ret = new PropertyRecord();
    ret.setId((String) dbObject.get("_id"));
    ret.setLastModified((Date) dbObject.get("lastModified"));
    List<DBObject> properties = (List<DBObject>) dbObject.get("properties");
    for (DBObject property : properties) {
      Property<Object> prop = new Property<Object>();
      prop.setName((String) property.get("name"));
      Object value = property.get("value");
View Full Code Here

      throw new IllegalStateException("propertyRecordDao not set!");
    }
    MarcXmlReader marcXmlReader = new MarcXmlReader(in);
    while (marcXmlReader.hasNext()) {
      Record record = marcXmlReader.next();
      PropertyRecord propertyRecord = newPropertyRecord(record);

      propertyRecordDao.registerEntity(propertyRecord, null);
    }
  }
View Full Code Here

   *
   * @param marcRecord
   * @return PropertyRecord
   */
  public PropertyRecord newPropertyRecord(Record marcRecord) {
    PropertyRecord ret = new PropertyRecord();

    /*
     * extract properties from control fields
     * 001=ID
     * 003=Code of organization
View Full Code Here

TOP

Related Classes of org.culturegraph.registry.PropertyRecord

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.