Skip to end of banner
Go to start of banner

Instrukcja hurtowego importowania autorów

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Hurtowy import autorów jest przydatny w przypadku, gdy chcemy zaimportować większą liczbę rekordów do systemu bez potrzeby ręcznego wypełniania formularza dodawania nowego rekordu.

W tym celu należy wygenerować pojedynczy plik XML o schemacie zgodnym z polami przedstawionymi w pliku XSD. W poniższej instrukcji zawarto niezbędne informacje jak utworzyć takowy plik a następnie wgrać go do systemu.

Wygenerowanie pliku XML zgodnego z Omegą może zostać przeprowadzone w dowolnym języku programowania lub technologii.

Wygenerowanie pliku XML

Główny schemat typu author wygląda następująco (ograniczony do podstawowych pól przydatnych przy imporcie):

<?xml version="1.0" encoding="UTF-8" ?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://ii.pw.edu.pl/lib" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.1" xmlns:tns="http://ii.pw.edu.pl/lib" xmlns:fw="http://ii.pw.edu.pl/lib/framework" jaxb:extensionBindingPrefixes="fw" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc">
    <include schemaLocation="affiliation.xsd" />
    <include schemaLocation="authorprofile.xsd" />
    <include schemaLocation="term.xsd" />
    <include schemaLocation="field.xsd" />
    <include schemaLocation="authordiscipline.xsd"/> 

    <complexType name="author">
        <element name="id" type="ID"></element>
        <element name="recordStatus" minOccurs="0" default="completed">
            <simpleType>
                <restriction base="string">
                    <enumeration value="partial"></enumeration>
                    <enumeration value="completed"></enumeration>
                    <enumeration value="verified"></enumeration>
                </restriction>
            </simpleType>
        </element>
        <element name="active" type="boolean" />
        <element name="status" fw:required="true" default="ZEWNETRZNY">
            <simpleType>
                <restriction base="string">
                    <enumeration value="PRACOWNIK"></enumeration>
                    <enumeration value="DOKTORANT"></enumeration>
                    <enumeration value="PRACOWNIK-DOKTORANT"></enumeration>
                    <enumeration value="DYPLOMANT"></enumeration>
                    <enumeration value="EMERYT"></enumeration>
                    <enumeration value="GOSC"></enumeration>
                    <enumeration value="ZEWNETRZNY"></enumeration>
                    <enumeration value="NIEZYJACY"></enumeration>
                </restriction>
            </simpleType>
        </element>
        <element name="belonging2N" type="boolean" />
        <element name="name" type="string" fw:defaultFormatter="true" fw:required="true">
            <simpleType>
                <restriction base="string">
                    <minLength value="2"></minLength>
                    <maxLength value="1024"></maxLength>
                </restriction>
            </simpleType>
        </element>
        <element name="surname" type="string" fw:defaultFormatter="true" fw:required="true">
            <annotation>
                <appinfo>
                    <fw:unique required="false" />
                </appinfo>
            </annotation>
            <simpleType>
                <restriction base="string">
                    <minLength value="2"></minLength>
                    <maxLength value="1024"></maxLength>
                </restriction>
            </simpleType>
        </element>
        <element name="otherName" type="string" minOccurs="0" maxOccurs="unbounded" />
        <element name="email" type="string">
            <annotation>
                <appinfo>
                    <fw:unique required="true" />
                </appinfo>
            </annotation>
            <simpleType>
                <restriction base="string">
                    <pattern value="^[A-Za-z0-9!#$%'*-/=?^_`{|}~\+]+(\.[A-Za-z0-9!#$%'*-/=?^_`{|}~\+]+)*@[A-Za-z0-9!#$%'*-/=?^_`{|}~\+]+(\.[A-Za-z0-9!#$%'*-/=?^_`{|}~\+]+)*(\.[A-Za-z]{2,})$" id="email"></pattern>
                </restriction>
            </simpleType>
        </element>
        <element name="otherEmail" type="string" minOccurs="0" maxOccurs="unbounded"></element>
        <element ref="tns:affiliation" fw:defaultFormatter="true" tns:editable="false"></element>
        <element type="tns:authordiscipline" name="activityDiscipline" minOccurs="0" maxOccurs="unbounded" tns:suggest="false" />
        <element type="tns:term" name="staffGroup" tns:editable="false" />
        <element ref="tns:authorprofile" fw:defaultFormatter="true" tns:selectable="false">
            <annotation>
                <appinfo>
                    <fw:maxNest value="1" />
                </appinfo>
            </annotation>
        </element>
        <element ref="tns:field" minOccurs="0" maxOccurs="unbounded"></element>

    </complexType>

    <element name="author" type="tns:author"></element>
</schema>

Należy zadbać o wypełnienie pól dla których atrybut required jest true.

Szczegółowe informacje o dostępnych polach w typie author

Pole

Opis

Przykładowa wartość

id

Wymagane do aktualizacji istniejących rekordów - dla nowych system automatycznie generuje.

recordStatus

Ustala kompletność rekordu - domyślnie jest kompletny

completed

active

Czy autor ma się pokazywać w wyszukiwarce pracowników Omegi (wersja publiczna)

false

status

Aktualny status (status zatrudnienia) autora. Wartość ze słownika dostępnego w schemacie.

ZEWNETRZNY

belonging2N

name

surname

otherName

email

otherEmail

affiliation

activityDiscipline

staffGroup

authorprofile

field

  • No labels