Package com.sdltridion.contentmanager.r6

Examples of com.sdltridion.contentmanager.r6.SchemaData


    System.out.println("Current user: '" + currentUser.getTitle() + "' '" + currentUser.getDescription() + "' " +
        currentUser.getId());

    System.out.println("Publication objects:");
    PublicationsFilterData filter = new PublicationsFilterData();
    ArrayOfIdentifiableObjectData systemWideList = client.getSystemWideList(filter);
    for (IdentifiableObjectData iod : systemWideList.getIdentifiableObjectData()) {
      PublicationData publication = (PublicationData) iod;
      System.out.println("\t" + publication.getTitle());
    }

    System.out.println("Publications XML:");
View Full Code Here


    System.out.println("Publication objects:");
    PublicationsFilterData filter = new PublicationsFilterData();
    ArrayOfIdentifiableObjectData systemWideList = client.getSystemWideList(filter);
    for (IdentifiableObjectData iod : systemWideList.getIdentifiableObjectData()) {
      PublicationData publication = (PublicationData) iod;
      System.out.println("\t" + publication.getTitle());
    }

    System.out.println("Publications XML:");
    GetSystemWideListXmlResult resultXml = client.getSystemWideListXml(filter);
    Element element = (Element) resultXml.getAny();
View Full Code Here

    UserData currentUser = client.getCurrentUser();
    System.out.println("Current user: '" + currentUser.getTitle() + "' '" + currentUser.getDescription() + "' " +
        currentUser.getId());

    System.out.println("Publication objects:");
    PublicationsFilterData filter = new PublicationsFilterData();
    ArrayOfIdentifiableObjectData systemWideList = client.getSystemWideList(filter);
    for (IdentifiableObjectData iod : systemWideList.getIdentifiableObjectData()) {
      PublicationData publication = (PublicationData) iod;
      System.out.println("\t" + publication.getTitle());
    }
View Full Code Here

    System.out.println(String.format("Client initialized in %.3fs", duration / 1000.0));
    duration = System.currentTimeMillis();

    System.out.println("Api version: " + client.getApiVersion());

    UserData currentUser = client.getCurrentUser();
    System.out.println("Current user: '" + currentUser.getTitle() + "' '" + currentUser.getDescription() + "' " +
        currentUser.getId());

    System.out.println("Publication objects:");
    PublicationsFilterData filter = new PublicationsFilterData();
    ArrayOfIdentifiableObjectData systemWideList = client.getSystemWideList(filter);
    for (IdentifiableObjectData iod : systemWideList.getIdentifiableObjectData()) {
View Full Code Here

            SimpleFeature sf = context.getCurrentFeature();
            Placemark pm = (Placemark) feature;

            // create the extended data, and encode any non null, non geometric attribute
            ExtendedData exd = pm.createAndSetExtendedData();
            SchemaData schemaData = exd.createAndAddSchemaData();
            schemaData.setSchemaUrl("#" + context.getCurrentFeatureType().getTypeName() + "_" + context.getCurrentLayerIndex());
            for (AttributeDescriptor ad : sf.getFeatureType().getAttributeDescriptors()) {
                // skip geometry attributes
                if (ad instanceof GeometryDescriptor) {
                    continue;
                }

                Object value = sf.getAttribute(ad.getLocalName());
                if (value == null) {
                    continue;
                }

                // make an exception for dates
                String kmlValue;
                if (value instanceof Date) {
                    try {
                        kmlValue = DATE_CONVERTER.convert(value, String.class);
                    } catch (Exception e) {
                        throw new ServiceException("Failed to convert date into string while "
                                + "generating extended data section", e);
                    }
                } else {
                    kmlValue = Converters.convert(value, String.class);
                }

                SimpleData sd = schemaData.createAndAddSimpleData(ad.getLocalName());
                sd.setValue(kmlValue);
            }
           
            return pm;
        }
View Full Code Here

TOP

Related Classes of com.sdltridion.contentmanager.r6.SchemaData

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.