📄 xml.po
字号:
msgid ""msgstr """Project-Id-Version: PACKAGE VERSION\n""Report-Msgid-Bugs-To: http://bugs.kde.org\n""POT-Creation-Date: 2008-08-14 15:28+0000\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <LL@li.org>\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n"#. Tag: title#: xml.xml:29#, no-c-formatmsgid "XML Mapping"msgstr "Mapping XML"#. Tag: emphasis#: xml.xml:31#, no-c-formatmsgid """Note that this is an experimental feature in Hibernate 3.0 and is under ""extremely active development."msgstr """Notez que cette fonctionnalité est expérimentale dans Hibernate 3.0 et est ""en développement extrêmement actif."#. Tag: title#: xml.xml:37#, no-c-formatmsgid "Working with XML data"msgstr "Travailler avec des données XML"#. Tag: para#: xml.xml:39#, no-c-formatmsgid """Hibernate lets you work with persistent XML data in much the same way you ""work with persistent POJOs. A parsed XML tree can be thought of as just ""another way to represent the relational data at the object level, instead of ""POJOs."msgstr """Hibernate vous laisse travailler avec des données XML persistantes de la ""même manière que vous travaillez avec des POJOs persistants. Un arbre XML ""peut être vu comme une autre manière de représenter les données ""relationnelles au niveau objet, à la place des POJOs."#. Tag: para#: xml.xml:46#, no-c-formatmsgid """Hibernate supports dom4j as API for manipulating XML trees. You can write ""queries that retrieve dom4j trees from the database and have any ""modification you make to the tree automatically synchronized to the ""database. You can even take an XML document, parse it using dom4j, and write ""it to the database with any of Hibernate's basic operations: <literal>persist""(), saveOrUpdate(), merge(), delete(), replicate()</literal> (merging is not ""yet supported)."msgstr """Hibernate supporte dom4j en tant qu'API pour la manipulation des arbres XML. ""Vous pouvez écrire des requêtes qui récupèrent des arbres dom4j à partie de ""la base de données, et avoir toutes les modifications que vous faites sur ""l'arbre automatiquement synchronisées dans la base de données. Vous pouvez ""même prendre un document XML, l'analyser en utilisant dom4j, et l'écrire ""dans la base de données via les opérations basiques d'Hibernate : ""<literal>persist(), saveOrUpdate(), merge(), delete(), replicate()</literal> ""(merge() n'est pas encore supporté)."#. Tag: para#: xml.xml:56#, no-c-formatmsgid """This feature has many applications including data import/export, ""externalization of entity data via JMS or SOAP and XSLT-based reporting."msgstr """Cette fonctionnalité a plusieurs applications dont l'import/export de ""données, l'externalisation d'entités via JMS ou SOAP et les rapports XSLT."#. Tag: para#: xml.xml:61#, no-c-formatmsgid """A single mapping may be used to simultaneously map properties of a class and ""nodes of an XML document to the database, or, if there is no class to map, ""it may be used to map just the XML."msgstr """Un simple mapping peut être utilisé pour simultanément mapper les propriétés ""d'une classe et les noeuds d'un document XML vers la base de données, ou, si ""il n'y a pas de classe à mapper, il peut être utilisé juste pour mapper le ""XML."#. Tag: title#: xml.xml:68#, no-c-formatmsgid "Specifying XML and class mapping together"msgstr "Spécifier le mapping XML et le mapping d'une classe ensemble"#. Tag: para#: xml.xml:70#, no-c-formatmsgid "Here is an example of mapping a POJO and XML simultaneously:"msgstr "Voici un exemple de mapping d'un POJO et du XML simultanément :"#. Tag: programlisting#: xml.xml:74#, no-c-formatmsgid """<![CDATA[<class name=\"Account\" \n"" table=\"ACCOUNTS\" \n"" node=\"account\">\n"" \n"" <id name=\"accountId\" \n"" column=\"ACCOUNT_ID\" \n"" node=\"@id\"/>\n"" \n"" <many-to-one name=\"customer\" \n"" column=\"CUSTOMER_ID\" \n"" node=\"customer/@id\" \n"" embed-xml=\"false\"/>\n"" \n"" <property name=\"balance\" \n"" column=\"BALANCE\" \n"" node=\"balance\"/>\n"" \n"" ...\n"" \n""</class>]]>"msgstr ""#. Tag: title#: xml.xml:78#, no-c-formatmsgid "Specifying only an XML mapping"msgstr "Spécifier seulement un mapping XML"#. Tag: para#: xml.xml:80#, no-c-formatmsgid "Here is an example where there is no POJO class:"msgstr "Voici un exemple dans lequel il n'y a pas de class POJO :"#. Tag: programlisting#: xml.xml:84#, no-c-formatmsgid """<![CDATA[<class entity-name=\"Account\" \n"" table=\"ACCOUNTS\" \n"" node=\"account\">\n"" \n"" <id name=\"id\" \n"" column=\"ACCOUNT_ID\" \n"" node=\"@id\" \n"" type=\"string\"/>\n"" \n"" <many-to-one name=\"customerId\" \n"" column=\"CUSTOMER_ID\" \n"" node=\"customer/@id\" \n"" embed-xml=\"false\" \n"" entity-name=\"Customer\"/>\n"" \n"" <property name=\"balance\" \n"" column=\"BALANCE\" \n"" node=\"balance\" \n"" type=\"big_decimal\"/>\n"" \n"" ...\n"" \n""</class>]]>"msgstr ""#. Tag: para#: xml.xml:86#, no-c-formatmsgid """This mapping allows you to access the data as a dom4j tree, or as a graph of ""property name/value pairs (java <literal>Map</literal>s). The property names ""are purely logical constructs that may be referred to in HQL queries."msgstr """Ce mapping vous permet d'accéder aux données comme un arbre dom4j, ou comme ""un graphe de paire nom de propriété/valeur (<literal>Map</literal>s java). ""Les noms des propriétés sont des constructions purement logiques qui peuvent ""être référées des dans requêtes HQL."#. Tag: title#: xml.xml:97#, no-c-formatmsgid "XML mapping metadata"msgstr "Métadonnées du mapping XML"#. Tag: para#: xml.xml:99#, no-c-formatmsgid """Many Hibernate mapping elements accept the <literal>node</literal> ""attribute. This let's you specify the name of an XML attribute or element ""that holds the property or entity data. The format of the <literal>node</""literal> attribute must be one of the following:"msgstr """Plusieurs éléments du mapping Hibernate acceptent l'attribut <literal>node</""literal>. Ceci vous permet de spécifier le nom d'un attribut XML ou d'un ""élément qui contient la propriété ou les données de l'entité. Le format de ""l'attribut <literal>node</literal> doit être un des suivants :"#. Tag: para#: xml.xml:108#, no-c-formatmsgid "<literal>\"element-name\"</literal> - map to the named XML element"msgstr "<literal>\"element-name\"</literal> - mappe vers l'élément XML nommé"#. Tag: para#: xml.xml:111#, no-c-formatmsgid "<literal>\"@attribute-name\"</literal> - map to the named XML attribute"msgstr """<literal>\"@attribute-name\"</literal> - mappe vers l'attribut XML nommé"#. Tag: para#: xml.xml:114#, no-c-formatmsgid "<literal>\".\"</literal> - map to the parent element"msgstr "<literal>\".\"</literal> - mappe vers le parent de l'élément"#. Tag: para#: xml.xml:117#, no-c-formatmsgid """<literal>\"element-name/@attribute-name\"</literal> - map to the named ""attribute of the named element"msgstr """<literal>\"element-name/@attribute-name\"</literal> - mappe vers l'élément ""nommé de l'attribut nommé"#. Tag: para#: xml.xml:124#, no-c-formatmsgid """For collections and single valued associations, there is an additional ""<literal>embed-xml</literal> attribute. If <literal>embed-xml=\"true\"</""literal>, the default, the XML tree for the associated entity (or collection ""of value type) will be embedded directly in the XML tree for the entity that ""owns the association. Otherwise, if <literal>embed-xml=\"false\"</literal>, ""then only the referenced identifier value will appear in the XML for single ""point associations and collections will simply not appear at all."msgstr """Pour des collections et de simples associations valuées, il y a un attribut ""<literal>embed-xml</literal> supplémentaire. Si <literal>embed-xml=\"true\"</""literal>, qui est la valeur par défaut, l'arbre XML pour l'entité associée ""(ou la collection des types de valeurs) sera embarquée directement dans ""l'arbre XML pour l'entité qui possède l'association. Sinon, si ""<literal>embed-xml=\"false\"</literal>, alors seule la valeur de ""l'identifiant référencé apparaîtra dans le XML pour de simples associations ""de points, et les collections n'appraîtront simplement pas."#. Tag: para#: xml.xml:134#, no-c-formatmsgid """You should be careful not to leave <literal>embed-xml=\"true\"</literal> for ""too many associations, since XML does not deal well with circularity!"msgstr """Vous devriez faire attention à ne pas laisser <literal>embed-xml=\"true\"</""literal> pour trop d'associations, puisque XML ne traite pas bien les liens ""circurlaires."#. Tag: programlisting#: xml.xml:139#, no-c-formatmsgid """<![CDATA[<class name=\"Customer\" \n"" table=\"CUSTOMER\" \n"" node=\"customer\">\n"" \n"" <id name=\"id\" \n"" column=\"CUST_ID\" \n"" node=\"@id\"/>\n"" \n"" <map name=\"accounts\" \n"" node=\".\" \n"" embed-xml=\"true\">\n"" <key column=\"CUSTOMER_ID\" \n"" not-null=\"true\"/>\n"" <map-key column=\"SHORT_DESC\" \n"" node=\"@short-desc\" \n"" type=\"string\"/>\n"" <one-to-many entity-name=\"Account\"\n"" embed-xml=\"false\" \n"" node=\"account\"/>\n"" </map>\n"" \n"" <component name=\"name\" \n"" node=\"name\">\n"" <property name=\"firstName\" \n"" node=\"first-name\"/>\n"" <property name=\"initial\" \n"" node=\"initial\"/>\n"" <property name=\"lastName\" \n"" node=\"last-name\"/>\n"" </component>\n"" \n"" ...\n"" \n""</class>]]>"msgstr ""#. Tag: para#: xml.xml:141#, no-c-formatmsgid """in this case, we have decided to embed the collection of account ids, but ""not the actual account data. The following HQL query:"msgstr """dans ce cas, nous avons décidé d'embarquer la collection d'identifiants de ""compte, mais pas les données actuelles du compte. La requête HQL suivante :"#. Tag: programlisting#: xml.xml:146#, no-c-formatmsgid """<![CDATA[from Customer c left join fetch c.accounts where c.lastName like :""lastName]]>"msgstr ""#. Tag: para#: xml.xml:148#, no-c-formatmsgid "Would return datasets such as this:"msgstr "devrait retourner l'ensemble de données suivant :"#. Tag: programlisting#: xml.xml:152#, no-c-formatmsgid """<![CDATA[<customer id=\"123456789\">\n"" <account short-desc=\"Savings\">987632567</account>\n"" <account short-desc=\"Credit Card\">985612323</account>\n"" <name>\n"" <first-name>Gavin</first-name>\n"" <initial>A</initial>\n"" <last-name>King</last-name>\n"" </name>\n"" ...\n""</customer>]]>"msgstr ""#. Tag: para#: xml.xml:154#, no-c-formatmsgid """If you set <literal>embed-xml=\"true\"</literal> on the <literal><one-to-""many></literal> mapping, the data might look more like this:"msgstr """Si vous positionnez <literal>embed-xml=\"true\"</literal> sur le mapping ""<literal><one-to-many></literal>, les données pourraient ressembler ""plus à ça :"#. Tag: programlisting#: xml.xml:159#, no-c-formatmsgid """<![CDATA[<customer id=\"123456789\">\n"" <account id=\"987632567\" short-desc=\"Savings\">\n"" <customer id=\"123456789\"/>\n"" <balance>100.29</balance>\n"" </account>\n"" <account id=\"985612323\" short-desc=\"Credit Card\">\n"" <customer id=\"123456789\"/>\n"" <balance>-2370.34</balance>\n"" </account>\n"" <name>\n"" <first-name>Gavin</first-name>\n"" <initial>A</initial>\n"" <last-name>King</last-name>\n"" </name>\n"" ...\n""</customer>]]>"msgstr ""#. Tag: title#: xml.xml:165#, no-c-formatmsgid "Manipulating XML data"msgstr "Manipuler des données XML"#. Tag: para#: xml.xml:167#, no-c-formatmsgid """Let's rearead and update XML documents in the application. We do this by ""obtaining a dom4j session:"msgstr """Relisons et mettons à jour des documents XML dans l'application. Nous ""faisons ça en obtenant une session dom4j :"#. Tag: programlisting#: xml.xml:172#, no-c-formatmsgid """<![CDATA[Document doc = ....;\n"" \n""Session session = factory.openSession();\n""Session dom4jSession = session.getSession(EntityMode.DOM4J);\n""Transaction tx = session.beginTransaction();\n""\n""List results = dom4jSession\n"" .createQuery(\"from Customer c left join fetch c.accounts where c.""lastName like :lastName\")\n"" .list();\n""for ( int i=0; i<results.size(); i++ ) {\n"" //add the customer data to the XML document\n"" Element customer = (Element) results.get(i);\n"" doc.add(customer);\n""}\n""\n""tx.commit();\n""session.close();]]>"msgstr ""#. Tag: programlisting#: xml.xml:174#, no-c-formatmsgid """<![CDATA[Session session = factory.openSession();\n""Session dom4jSession = session.getSession(EntityMode.DOM4J);\n""Transaction tx = session.beginTransaction();\n""\n""Element cust = (Element) dom4jSession.get(\"Customer\", customerId);\n""for ( int i=0; i<results.size(); i++ ) {\n"" Element customer = (Element) results.get(i);\n"" //change the customer name in the XML and database\n"" Element name = customer.element(\"name\");\n"" name.element(\"first-name\").setText(firstName);\n"" name.element(\"initial\").setText(initial);\n"" name.element(\"last-name\").setText(lastName);\n""}\n""\n""tx.commit();\n""session.close();]]>"msgstr ""#. Tag: para#: xml.xml:176#, no-c-formatmsgid """It is extremely useful to combine this feature with Hibernate's ""<literal>replicate()</literal> operation to implement XML-based data import/""export."msgstr """Il est extrêmement utile de combiner cette fonctionnalité avec l'opération ""<literal>replicate()</literal> d'Hibernate pour implémenter des imports/""exports de données XML."
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -