Examples of VCardBuilder


Examples of net.fortuna.ical4j.vcard.VCardBuilder

    }
    public static void main(String[] args) throws Exception {
     VcardIndexingSource instance = new VcardIndexingSource();
    
     instance.prefix = "http://test.org/";
     VCardBuilder parser = new VCardBuilder(new InputStreamReader(new FileInputStream(new File(args[0])), "utf8"));
     Map<EntityType,Map<String,Set<String>>> entityMap = new EnumMap<EntityType,Map<String,Set<String>>>(EntityType.class);
     entityMap.put(EntityType.organization, new HashMap<String,Set<String>>());
     entityMap.put(EntityType.person,  new HashMap<String,Set<String>>());
     for(VCard vcard : parser.buildAll()){
         instance.processVcard(vcard,OntologyMappings.schemaOrgMappings,entityMap);
     }
    }
View Full Code Here

Examples of net.fortuna.ical4j.vcard.VCardBuilder

                r = new InputStreamReader(new FileInputStream(file), DEFAULT_CHARSET);
            } catch (FileNotFoundException e) {
                throw new IllegalStateException("vcard import file "+file+
                    "not found - maybe deleted during import?",e);
            }
            VCardBuilder parser = new VCardBuilder(r);
            try {
                return parser.buildAll().iterator();
            } catch (IOException e) {
                throw new IllegalStateException("Unable to read vcard file "+file,e);
            } catch (ParserException e) {
                throw new IllegalStateException("Unable to parse vcard file "+file,e);
            }
View Full Code Here

Examples of net.fortuna.ical4j.vcard.VCardBuilder

    public void parse(InputStream in, String baseURI) throws IOException, RDFParseException, RDFHandlerException {
        Preconditions.checkNotNull(baseURI);

        setBaseURI(baseURI);
        try {
            for(VCard card : new VCardBuilder(in).buildAll()) {
                parseVCard(card);
            }
        } catch (ParserException e) {
            throw new RDFParseException(e);
        }
View Full Code Here

Examples of net.fortuna.ical4j.vcard.VCardBuilder

    public void parse(Reader reader, String baseURI) throws IOException, RDFParseException, RDFHandlerException {
        Preconditions.checkNotNull(baseURI);

        setBaseURI(baseURI);
        try {
            for(VCard card : new VCardBuilder(reader).buildAll()) {
                parseVCard(card);
            }
        } catch (ParserException e) {
            throw new RDFParseException(e);
        }
View Full Code Here

Examples of net.fortuna.ical4j.vcard.VCardBuilder

        try {
          final File file = upload.writeToTempFile();
          final List<AddressDO> newAddresses = new ArrayList<AddressDO>();

          final FileInputStream fis = new FileInputStream(file);
          final VCardBuilder builder = new VCardBuilder(fis);

          AddressDO newAddress = null;
          for (final VCard card : builder.buildAll()) {
            newAddress = new AddressDO();

            // //// SET BASE DATA
            if (card.getProperty(net.fortuna.ical4j.vcard.Property.Id.N) != null) {
              setName(card.getProperty(net.fortuna.ical4j.vcard.Property.Id.N), newAddress);
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.