Examples of DcModule


Examples of com.rometools.rome.feed.module.DCModule

     */
    @Override
    public Module parse(final Element dcRoot, final Locale locale) {

        boolean foundSomething = false;
        final DCModule dcm = new DCModuleImpl();

        final List<Element> titles = dcRoot.getChildren("title", getDCNamespace());
        if (!titles.isEmpty()) {
            foundSomething = true;
            dcm.setTitles(parseElementList(titles));
        }

        final List<Element> creators = dcRoot.getChildren("creator", getDCNamespace());
        if (!creators.isEmpty()) {
            foundSomething = true;
            dcm.setCreators(parseElementList(creators));
        }

        final List<Element> subjects = dcRoot.getChildren("subject", getDCNamespace());
        if (!subjects.isEmpty()) {
            foundSomething = true;
            dcm.setSubjects(parseSubjects(subjects));
        }

        final List<Element> descriptions = dcRoot.getChildren("description", getDCNamespace());
        if (!descriptions.isEmpty()) {
            foundSomething = true;
            dcm.setDescriptions(parseElementList(descriptions));
        }

        final List<Element> publishers = dcRoot.getChildren("publisher", getDCNamespace());
        if (!publishers.isEmpty()) {
            foundSomething = true;
            dcm.setPublishers(parseElementList(publishers));
        }

        final List<Element> contributors = dcRoot.getChildren("contributor", getDCNamespace());
        if (!contributors.isEmpty()) {
            foundSomething = true;
            dcm.setContributors(parseElementList(contributors));
        }

        final List<Element> dates = dcRoot.getChildren("date", getDCNamespace());
        if (!dates.isEmpty()) {
            foundSomething = true;
            dcm.setDates(parseElementListDate(dates, locale));
        }

        final List<Element> types = dcRoot.getChildren("type", getDCNamespace());
        if (!types.isEmpty()) {
            foundSomething = true;
            dcm.setTypes(parseElementList(types));
        }

        final List<Element> formats = dcRoot.getChildren("format", getDCNamespace());
        if (!formats.isEmpty()) {
            foundSomething = true;
            dcm.setFormats(parseElementList(formats));
        }

        final List<Element> identifiers = dcRoot.getChildren("identifier", getDCNamespace());
        if (!identifiers.isEmpty()) {
            foundSomething = true;
            dcm.setIdentifiers(parseElementList(identifiers));
        }

        final List<Element> sources = dcRoot.getChildren("source", getDCNamespace());
        if (!sources.isEmpty()) {
            foundSomething = true;
            dcm.setSources(parseElementList(sources));
        }

        final List<Element> languages = dcRoot.getChildren("language", getDCNamespace());
        if (!languages.isEmpty()) {
            foundSomething = true;
            dcm.setLanguages(parseElementList(languages));
        }

        final List<Element> relations = dcRoot.getChildren("relation", getDCNamespace());
        if (!relations.isEmpty()) {
            foundSomething = true;
            dcm.setRelations(parseElementList(relations));
        }

        final List<Element> coverages = dcRoot.getChildren("coverage", getDCNamespace());
        if (!coverages.isEmpty()) {
            foundSomething = true;
            dcm.setCoverages(parseElementList(coverages));
        }

        final List<Element> rights = dcRoot.getChildren("rights", getDCNamespace());
        if (!rights.isEmpty()) {
            foundSomething = true;
            dcm.setRightsList(parseElementList(rights));
        }

        if (foundSomething) {
            return dcm;
        } else {
View Full Code Here

Examples of com.sun.syndication.feed.module.DCModule

       
        newEntry.setTitle(romeEntry.getTitle());
        newEntry.setPermalink(romeEntry.getLink());
       
        // Play some games to get the author
        DCModule entrydc = (DCModule)romeEntry.getModule(DCModule.URI);
        if (romeEntry.getAuthor() != null) {
            newEntry.setAuthor(romeEntry.getAuthor());
        } else {
            newEntry.setAuthor(entrydc.getCreator()); // use <dc:creator>
        }
       
        // Play some games to get the updated date
        if (romeEntry.getUpdatedDate() != null) {
            newEntry.setUpdateTime(new Timestamp(romeEntry.getUpdatedDate().getTime()));
        }
        // TODO: should we set a default update time here?
       
        // And more games getting publish date
        if (romeEntry.getPublishedDate() != null) {
            newEntry.setPubTime(new Timestamp(romeEntry.getPublishedDate().getTime())); // use <pubDate>
        } else if (entrydc != null && entrydc.getDate() != null) {
            newEntry.setPubTime(new Timestamp(entrydc.getDate().getTime())); // use <dc:date>
        } else {
            newEntry.setPubTime(newEntry.getUpdateTime());
        }
       
        // get content and unescape if it is 'text/plain'
View Full Code Here

Examples of net.datacrow.core.modules.DcModule

    public abstract Collection<Picture> getPictures();
   
    private boolean loading = false;
   
    public int[] getFields() {
      DcModule module = DcModules.get(getModule());
      return module.isAbstract() ? new int[] {DcObject._ID} : module.getMinimalFields(getFields(getModule()));
    }
View Full Code Here

Examples of net.datacrow.core.modules.DcModule

    }
   
    public boolean load() {
        int count = getComponentCount();
        if (count == 0 && !loading) {
            DcModule module = DcModules.get(getModule());
           
            if (dco == null) {
                dco = DataManager.getItem(getModule(), key, getFields());
                //this.module = dco.getModule().getIndex();
                if (module.isAbstract())
                    dco.reload();
            }

            loading = true;
            build();
View Full Code Here

Examples of net.datacrow.core.modules.DcModule

   
    @Override
    public void build() {
        setLayout(layout);
 
        DcModule module = DcModules.get(entry.getModule());
        DcField field = module.getField(entry.getField());
        Operator operator = entry.getOperator();
       
       
        JLabel labelAnd = ComponentFactory.getLabel(entry.getAndOr());
        JLabel labelMod = ComponentFactory.getLabel(module.getLabel());
        JLabel labelFld = ComponentFactory.getLabel(field.getLabel());
        JLabel labelOp = ComponentFactory.getLabel(operator.toString());
        JLabel labelVal = ComponentFactory.getLabel(
                entry.getValue() != null ? entry.getValue().toString() : "");
       
View Full Code Here

Examples of net.datacrow.core.modules.DcModule

        if (e.getActionCommand().equals("paste"))
            paste(vc);
    }
   
    private void paste(IViewComponent vc) {
        DcModule module = vc.getModule();
       
        int[] fields = (int[]) vc.getModule().getSetting(DcRepository.ModuleSettings.stTableColumnOrder);
       
        try {
            String text = (String) (clipboard.getContents(this).getTransferData(DataFlavor.stringFlavor));
            StringTokenizer rowTokenizer = new StringTokenizer(text, "\n");
            for (int i = 0; rowTokenizer.hasMoreTokens(); i++) {
                String values = rowTokenizer.nextToken();
                DcObject dco = module.getItem();

                int fldCounter = 0;
                int index = values.indexOf("\t");
                while (index > -1) {
                    String value = values.substring(0, index);
View Full Code Here

Examples of net.datacrow.core.modules.DcModule

       
        return sb.toString();
    }

    private DcField getField(int modIdx, String label) {
        DcModule module = DcModules.get(modIdx);
        for (DcField field : module.getFields()) {
            if (field.getSystemName().equals(label)) {
                return field;
           
            } else if (module.getParent() != null && 
                       module.getParent().getObjectName().equals(label)) {
               
                return field;
            }
        }
        return null;
View Full Code Here

Examples of net.datacrow.core.modules.DcModule

    }
   
    @Override
    public int[] getFields() {
      // only return one field for performance reasons, especially for abstract module children
      DcModule module = DcModules.get(getModule());
      return module.getType() == DcModule._TYPE_PROPERTY_MODULE ?
          new int[] {DcProperty._ID, module.getDisplayFieldIdx(), DcProperty._B_ICON} : new int[] {DcObject._ID, module.getDisplayFieldIdx()};
    }
View Full Code Here

Examples of net.datacrow.core.modules.DcModule

        this.groupingPane = mv.getGroupingPane();
        this.type = type;
        this.vc = vc;
        this.index = index;
       
        DcModule cm = vc.getModule() != null ? vc.getModule().getChild() : null;
        this.childView = cm != null ?
                getType() == _TYPE_SEARCH ? cm.getSearchView().get(index) :
                cm.getInsertView().get(index) : null;
       
        if (childView != null)
            childView.setParentView(this);
               
        vc.addMouseListener(vml);
View Full Code Here

Examples of net.datacrow.core.modules.DcModule

    }   
   
  public void addModules() {
        if (elements != null) elements.clear();
       
        DcModule referencedMod;
        for (DcModule module : DcModules.getAllModules()) {
            try {
               
                if (module.isSelectableInUI() && module.isEnabled()) {
                   
                    List<ModulePanel> c = new ArrayList<ModulePanel>();
                    c.add(new ModulePanel(module, ModulePanel._ICON32));
                   
                    for (DcField field : module.getFields()) {
                        referencedMod = DcModules.getReferencedModule(field);
                        if (    referencedMod.isEnabled() &&
                            referencedMod.getIndex() != module.getIndex() &&
                                referencedMod.getType() != DcModule._TYPE_PROPERTY_MODULE &&
                                referencedMod.getType() != DcModule._TYPE_EXTERNALREFERENCE_MODULE &&
                                referencedMod.getIndex() != DcModules._CONTACTPERSON &&
                                referencedMod.getIndex() != DcModules._CONTAINER) {
                           
                            c.add(new ModulePanel(referencedMod, ModulePanel._ICON16));
                        }
                    }
                    elements.put(module.getIndex(), c);
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.